refactor: update source location restriction to use default_location_src_ids instead of allowed_source_location_ids

This commit is contained in:
Suherdy Yacob 2026-04-03 17:36:22 +07:00
parent 02d027b104
commit 1bc628c4ed

View File

@ -28,8 +28,8 @@ class StockLocation(models.Model):
# 3. Retrieve allowed locations from the picking type
picking_type = self.env['stock.picking.type'].browse(picking_type_id)
if picking_type.exists() and picking_type.allowed_source_location_ids:
return picking_type.allowed_source_location_ids.ids
if picking_type.exists() and picking_type.default_location_src_ids:
return picking_type.default_location_src_ids.ids
return []