From d77920849fdeb3198662d8a704416d3d1b443f13 Mon Sep 17 00:00:00 2001 From: Guillaume MASSON Date: Wed, 16 Aug 2023 17:15:14 +0200 Subject: [PATCH] [FIX] intrastat_product : properly initialize notedict before calling _get_weight_and_supplunits fixes OCA/intrastat-extrastat#224 --- intrastat_product/models/account_move.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/intrastat_product/models/account_move.py b/intrastat_product/models/account_move.py index c232520..5ae9235 100644 --- a/intrastat_product/models/account_move.py +++ b/intrastat_product/models/account_move.py @@ -79,11 +79,8 @@ class AccountMove(models.Model): def _get_intrastat_line_vals(self, line): vals = {} - notedict = { - "note": "", - "line_nbr": 0, - } decl_model = self.env["intrastat.product.declaration"] + notedict, key2label = decl_model._prepare_notedict() if decl_model._is_product(line): hs_code = line.product_id.get_hs_code_recursively() if not hs_code: