From 85d57d2e3838280c64ce0f2570fe703a7b7357dd Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Tue, 9 Nov 2021 21:34:18 +0100 Subject: [PATCH] cherry-pick of https://github.com/OCA/intrastat-extrastat/pull/151 --- intrastat_product/models/account_move.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/intrastat_product/models/account_move.py b/intrastat_product/models/account_move.py index 564f1e9..f916aa4 100644 --- a/intrastat_product/models/account_move.py +++ b/intrastat_product/models/account_move.py @@ -119,7 +119,9 @@ class AccountMoveLine(models.Model): intrastat_line = self.move_id.intrastat_line_ids.filtered( lambda r: r.invoice_line_id == rec ) - rec.hs_code_id = intrastat_line.hs_code_id or rec.get_hs_code_recursively() + rec.hs_code_id = ( + intrastat_line.hs_code_id or rec.product_id.get_hs_code_recursively() + ) class AccountMoveIntrastatLine(models.Model):