[FIX] intrastat_product : properly initialize notedict before calling _get_weight_and_supplunits

fixes OCA/intrastat-extrastat#224
This commit is contained in:
Guillaume MASSON
2023-08-16 17:15:14 +02:00
parent c4085595c5
commit d77920849f

View File

@@ -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: