refactor: update source location restriction to use default_location_src_ids instead of allowed_source_location_ids
This commit is contained in:
parent
02d027b104
commit
1bc628c4ed
@ -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 []
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user