From 7f13b7c2dff9e70145275120a4a0e3250bde06cd Mon Sep 17 00:00:00 2001 From: Mourad Date: Mon, 4 Dec 2023 16:00:24 +0100 Subject: [PATCH] [16.0][FIX] fix pre-commit --- l10n_fr_ecotaxe_sale/models/sale_order_line.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/l10n_fr_ecotaxe_sale/models/sale_order_line.py b/l10n_fr_ecotaxe_sale/models/sale_order_line.py index 7c6e33fbd..5d6577ced 100644 --- a/l10n_fr_ecotaxe_sale/models/sale_order_line.py +++ b/l10n_fr_ecotaxe_sale/models/sale_order_line.py @@ -50,13 +50,15 @@ def _onchange_product_ecotaxe_line(self): self.ecotaxe_line_ids = [(5,)] # Remove all ecotaxe classification ecotax_cls_vals = [] for ecotaxeline_prod in self.product_id.ecotaxe_line_product_ids: + classif_id = ecotaxeline_prod.ecotaxe_classification_id.id + forced_amount = ecotaxeline_prod.force_ecotaxe_amount ecotax_cls_vals.append( ( 0, 0, { - "ecotaxe_classification_id": ecotaxeline_prod.ecotaxe_classification_id.id, - "force_ecotaxe_unit": ecotaxeline_prod.force_ecotaxe_amount, + "ecotaxe_classification_id": classif_id, + "force_ecotaxe_unit": forced_amount, }, ) )