From 723b6427131568a1aa2cd41809487c403fd9c24a Mon Sep 17 00:00:00 2001 From: JF Aubert Date: Fri, 4 Mar 2022 07:55:01 +0000 Subject: [PATCH] [FIX] mrp: fix _split_productions overloading add missing _set_consumed_qty parameter in _split_productions overloading fix typo in cancel_remaining_qty parameter closes odoo/odoo#85824 Task: 2783912 X-original-commit: 1071e74d58c14c3a32c4d19669b0dd8426b14f1a Related: odoo/enterprise#24995 Signed-off-by: Arnold Moyaux --- addons/mrp/models/mrp_production.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mrp/models/mrp_production.py b/addons/mrp/models/mrp_production.py index 1ed1f207d9d..078ec57ce5a 100644 --- a/addons/mrp/models/mrp_production.py +++ b/addons/mrp/models/mrp_production.py @@ -1493,7 +1493,7 @@ class MrpProduction(models.Model): 'orderpoint_id': self.orderpoint_id.id, } - def _split_productions(self, amounts=False, cancel_remaning_qty=False, set_consumed_qty=False): + def _split_productions(self, amounts=False, cancel_remaining_qty=False, set_consumed_qty=False): """ Splits productions into productions smaller quantities to produce, i.e. creates its backorders. @@ -1515,7 +1515,7 @@ class MrpProduction(models.Model): amounts[production] = _default_amounts(production) continue total_amount = sum(mo_amounts) - if total_amount < production.product_qty and not cancel_remaning_qty: + if total_amount < production.product_qty and not cancel_remaining_qty: amounts[production].append(production.product_qty - total_amount) elif total_amount > production.product_qty or production.state in ['done', 'cancel']: raise UserError(_("Unable to split with more than the quantity to produce."))