mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
[10.0][FIX]get_hs_code_recursively on product.template
This commit is contained in:
committed by
Pedro M. Baeza
parent
30bffda00a
commit
eba76446e4
@@ -82,5 +82,5 @@ class AccountInvoiceLine(models.Model):
|
||||
@api.onchange('product_id')
|
||||
def intrastat_product_id_change(self):
|
||||
if self.product_id:
|
||||
hs_code = self.product_id.product_tmpl_id.get_hs_code_recursively()
|
||||
hs_code = self.product_id.get_hs_code_recursively()
|
||||
self.hs_code_id = hs_code and hs_code.id or False
|
||||
|
||||
@@ -512,8 +512,7 @@ class IntrastatProductDeclaration(models.Model):
|
||||
if inv_line.hs_code_id:
|
||||
hs_code = inv_line.hs_code_id
|
||||
elif inv_line.product_id and self._is_product(inv_line):
|
||||
hs_code = inv_line.product_id.product_tmpl_id.\
|
||||
get_hs_code_recursively()
|
||||
hs_code = inv_line.product_id.get_hs_code_recursively()
|
||||
if not hs_code:
|
||||
note = "\n" + _(
|
||||
"Missing H.S. code on product %s. "
|
||||
|
||||
Reference in New Issue
Block a user