diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index 62a63f72..1ce57f85 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -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