调整名称及总数量逻辑

This commit is contained in:
mgw
2025-03-19 15:31:34 +08:00
parent a75e236f1f
commit 1a511b93cf
2 changed files with 14 additions and 3 deletions

View File

@@ -151,7 +151,8 @@ class QualityCheck(models.Model):
if record.picking_id:
total_qty = 0
for move in record.picking_id.move_ids_without_package:
total_qty += int(move.product_uom_qty)
if move.product_id == record.product_id:
total_qty = int(move.product_uom_qty)
record.total_qty = total_qty if total_qty > 0 else ''
else:
record.total_qty = ''