Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/优化最新版报废

# Conflicts:
#	sf_manufacturing/security/ir.model.access.csv
This commit is contained in:
jinling.yang
2024-07-17 19:32:21 +08:00
6 changed files with 47 additions and 51 deletions

View File

@@ -56,7 +56,8 @@ class MrpProduction(models.Model):
reprogramming_num = fields.Integer('重新编程次数', default=0)
work_state = fields.Char('业务状态')
programming_state = fields.Selection(
[('编程中', '编程中'), ('已编程', '已编程'), ('已编程未下发', '已编程未下发')], string='编程状态',
[('编程中', '编程中'), ('已编程', '已编程'), ('已编程未下发', '已编程未下发'), ('已下发', '已下发')],
string='编程状态',
tracking=True)
glb_file = fields.Binary("glb模型文件")
production_line_id = fields.Many2one('sf.production.line', string='生产线', tracking=True)
@@ -127,7 +128,8 @@ class MrpProduction(models.Model):
production.state = 'pending_cam'
if production.state == 'progress':
if all(wo_state not in ('progress', 'done') for wo_state in production.workorder_ids.mapped('state')):
if all(wo_state not in ('progress', 'done', 'rework') for wo_state in
production.workorder_ids.mapped('state')):
production.state = 'pending_cam'
# if production.state == 'pending_cam':
# if all(wo_state in 'done' for wo_state in production.workorder_ids.mapped('state')):