Skip to content

Commit

Permalink
fix unit tests - keep product_origin_country_id on top of new product…
Browse files Browse the repository at this point in the history
…_origin_country_code to avoid breaking the localisation modules
  • Loading branch information
luc-demeyer committed Apr 10, 2022
1 parent e49bac5 commit 8487f1c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions intrastat_product/models/intrastat_product_declaration.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,9 @@ def _gather_invoices(self, notedict):
total_inv_product_cc += amount_company_currency

if inv_intrastat_line:
product_origin_country = (
inv_intrastat_line.product_origin_country_id
)
product_origin_country_code = (
inv_intrastat_line.product_origin_country_code
)
Expand All @@ -745,6 +748,7 @@ def _gather_invoices(self, notedict):
"amount_company_currency": amount_company_currency,
"amount_accessory_cost_company_currency": 0.0,
"transaction_id": intrastat_transaction.id,
"product_origin_country_id": product_origin_country.id or False,
"product_origin_country_code": product_origin_country_code,
"region_id": region and region.id or False,
"vat": vat,
Expand Down Expand Up @@ -868,6 +872,7 @@ def _prepare_grouped_fields(self, computation_line, fields_to_sum):
"transport_id": computation_line.transport_id.id,
"region_id": computation_line.region_id.id,
"parent_id": computation_line.parent_id.id,
"product_origin_country_id": computation_line.product_origin_country_id.id,
"product_origin_country_code": computation_line.product_origin_country_code,
"amount_company_currency": 0.0,
"vat": computation_line.vat,
Expand Down

0 comments on commit 8487f1c

Please sign in to comment.