Accept Merge Request #711: (feature/制造代码优化 -> develop)

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

Created By: @马广威
Accepted By: @马广威
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/711
This commit is contained in:
马广威
2023-12-07 11:28:22 +08:00
committed by Coding
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):