处理由客供料入库单生成的质检单没有批次序列号问题
This commit is contained in:
@@ -40,6 +40,14 @@ class QualityCheck(models.Model):
|
||||
operation_id = fields.Many2one('mrp.routing.workcenter', '作业', store=True, compute='_compute_operation_id')
|
||||
is_inspect = fields.Boolean('需送检', related='point_id.is_inspect')
|
||||
|
||||
lot_name = fields.Char('批次/序列号 名称', compute='_compute_lot_name', store=True)
|
||||
|
||||
@api.depends('move_line_id', 'move_line_id.lot_name')
|
||||
def _compute_lot_name(self):
|
||||
for qc in self:
|
||||
if qc.move_line_id:
|
||||
qc.lot_name = qc.move_line_id.lot_name
|
||||
|
||||
@api.depends('point_id.operation_id')
|
||||
def _compute_operation_id(self):
|
||||
for qc in self:
|
||||
|
||||
Reference in New Issue
Block a user