1.优化根据同一个产品,生成的制造订单绑定同一个编程单需求

This commit is contained in:
jinling.yang
2024-05-07 17:33:23 +08:00
parent 7cbe1cb35d
commit fda43deeea
6 changed files with 26 additions and 13 deletions

View File

@@ -1143,6 +1143,7 @@ class WorkPieceDelivery(models.Model):
name = fields.Char('单据编号')
workorder_id = fields.Many2one('mrp.workorder', string='工单', readonly=True)
workorder_state = fields.Selection(related='workorder_id.state', string='工单状态')
rfid_code = fields.Char(related='workorder_id.rfid_code', string='rfid码', store=True)
production_id = fields.Many2one('mrp.production', string='制造订单号', readonly=True)
production_line_id = fields.Many2one('sf.production.line', string='目的生产线')
plan_start_processing_time = fields.Datetime('计划开始加工时间', readonly=True)
@@ -1158,7 +1159,6 @@ class WorkPieceDelivery(models.Model):
status = fields.Selection(
[('待下发', '待下发'), ('待配送', '待配送'), ('已配送', '已配送')], string='状态', default='待下发')
is_cnc_program_down = fields.Boolean('程序是否下发', default=False)
rfid_code = fields.Char('rfid码')
active = fields.Boolean(string="有效", default=True)
@api.model