在出厂检验报告验证数量时,增加产品的匹配

This commit is contained in:
胡尧
2025-06-06 08:37:38 +08:00
parent 4e1be6f4d5
commit 0b5415dc47

View File

@@ -263,7 +263,7 @@ class QualityCheck(models.Model):
self._check_measure_line()
self._check_check_qty_and_total_qty()
picking_qty = sum(self.picking_id.move_ids.mapped('product_uom_qty'))
picking_qty = sum(self.picking_id.move_ids.filtered(lambda m: m.product_id == self.product_id).mapped('product_uom_qty'))
if not self._check_total_qty(picking_qty):
return {
'type': 'ir.actions.client',