优化物流、计划权限及库存的一些问题

This commit is contained in:
mgw
2023-12-07 10:11:59 +08:00
parent 2cf4958f46
commit 1ccc32cbcb
3 changed files with 39 additions and 25 deletions

View File

@@ -258,10 +258,11 @@ class ShelfLocation(models.Model):
"""
根据货架的所属库区修改货位的所属库区
"""
all_location = self.env['sf.shelf.location'].search([('name', 'ilike', self.name)])
for record in self:
for location in all_location:
location.location_id = record.shelf_location_id.id
if self.name:
all_location = self.env['sf.shelf.location'].search([('name', 'ilike', self.name)])
for record in self:
for location in all_location:
location.location_id = record.shelf_location_id.id
@api.depends('product_sn_id')
def _compute_product_id(self):