Merge branch refs/heads/develop into refs/heads/feature/修改机床参数bug

This commit is contained in:
龚启豪
2024-01-26 11:28:51 +08:00
39 changed files with 829 additions and 242 deletions

View File

@@ -305,8 +305,8 @@ class ShelfLocation(models.Model):
"""
for record in self:
if record.product_sn_id:
record.product_id = record.product_sn_id.product_id
record.location_status = '占用'
record.sudo().product_id = record.product_sn_id.product_id
record.sudo().location_status = '占用'
else:
record.product_id = False
# record.location_status = '空闲'
@@ -318,12 +318,12 @@ class ShelfLocation(models.Model):
:return:
"""
for record in self:
record.hide_shelf = False
record.hide_location = False
record.sudo().hide_shelf = False
record.sudo().hide_location = False
if record.location_type and record.location_type == '货架':
record.hide_shelf = True
record.sudo().hide_shelf = True
elif record.location_type and record.location_type == '货位':
record.hide_location = True
record.sudo().hide_location = True
else:
pass