[MIG] mrp_production_quant_manual_assign: Migration to 15.0

This commit is contained in:
ThiagoMForgeFlow
2022-10-27 16:23:23 +02:00
parent 85482edef6
commit 797f7a9c18
2 changed files with 5 additions and 3 deletions

View File

@@ -4,7 +4,7 @@
{
"name": "Production - Manual Quant Assignment",
"version": "14.0.1.0.0",
"version": "15.0.1.0.0",
"category": "Manufacturing",
"license": "AGPL-3",
"author": "Quartile Limited, ForgeFlow, Odoo Community Association (OCA)",

View File

@@ -53,8 +53,10 @@ class AssignManualQuants(models.TransientModel):
).mapped("lot_id")
for ml in move.move_line_ids:
if ml.lot_id in lots_to_consume:
ml.qty_done = ml.product_qty
elif float_is_zero(ml.product_qty, precision_digits=precision_digits):
ml.qty_done = ml.product_uom_qty
elif float_is_zero(
ml.product_uom_qty, precision_digits=precision_digits
):
ml.unlink()
else:
ml.qty_done = 0.0