[14.0][IMP] intrastat_product: Add codes in Excel report as required in some countries

In some countries, the imports are done through Excel imports.

They need the codes only in the columns.
This commit is contained in:
Denis Roussel
2022-03-30 14:27:47 +02:00
committed by Alexis de Lattre
parent 8303f39d8e
commit 8f4d7b56a7
2 changed files with 36 additions and 0 deletions

View File

@@ -984,13 +984,17 @@ class IntrastatProductDeclaration(models.Model):
"""
return [
"hs_code",
"product_origin_country_code",
"product_origin_country",
"src_dest_country_code",
"src_dest_country",
"amount_company_currency",
"transaction_code",
"transaction",
"weight",
"suppl_unit_qty",
"suppl_unit",
"transport_code",
"transport",
"vat",
]

View File

@@ -41,6 +41,14 @@ class IntrastatProductDeclarationXlsx(models.AbstractModel):
},
"width": 36,
},
"product_origin_country_code": {
"header": {"type": "string", "value": self._("Product C/O Code")},
"line": {
"type": "string",
"value": self._render("line.product_origin_country_id.code or ''"),
},
"width": 28,
},
"product_origin_country": {
"header": {"type": "string", "value": self._("Product C/O")},
"line": {
@@ -57,6 +65,17 @@ class IntrastatProductDeclarationXlsx(models.AbstractModel):
},
"width": 14,
},
"src_dest_country_code": {
"header": {
"type": "string",
"value": self._("Country of Origin/Destination"),
},
"line": {
"type": "string",
"value": self._render("line.src_dest_country_id.code"),
},
"width": 28,
},
"src_dest_country": {
"header": {
"type": "string",
@@ -96,6 +115,14 @@ class IntrastatProductDeclarationXlsx(models.AbstractModel):
},
"width": 18,
},
"transaction_code": {
"header": {
"type": "string",
"value": self._("Intrastat Transaction code"),
},
"line": {"value": self._render("line.transaction_id.code")},
"width": 36,
},
"transaction": {
"header": {"type": "string", "value": self._("Intrastat Transaction")},
"line": {"value": self._render("line.transaction_id.display_name")},
@@ -139,6 +166,11 @@ class IntrastatProductDeclarationXlsx(models.AbstractModel):
"line": {"value": self._render("line.incoterm_id.name or ''")},
"width": 14,
},
"transport_code": {
"header": {"type": "string", "value": self._("Transport Mode Code")},
"line": {"value": self._render("line.transport_id.code or ''")},
"width": 14,
},
"transport": {
"header": {"type": "string", "value": self._("Transport Mode")},
"line": {"value": self._render("line.transport_id.name or ''")},