[14.0]Intrastat Brexit support

This commit is contained in:
Luc De Meyer
2021-12-26 13:51:33 +01:00
committed by Alexis de Lattre
parent a2572d4a08
commit 0988223c46
2 changed files with 15 additions and 1 deletions

View File

@@ -23,10 +23,20 @@ class ProductTemplate(models.Model):
"and configure the H.S. code on the product category.",
)
origin_country_id = fields.Many2one(
"res.country",
comodel_name="res.country",
string="Country of Origin",
help="Country of origin of the product i.e. product " "'made in ____'.",
)
origin_state_id = fields.Many2one(
comodel_name="res.country.state",
string="Country State of Origin",
domain="[('country_id', '=?', origin_country_id)]",
help="Country State of origin of the product.\n"
"This field is used for the Intrastat declaration, "
"selecting 'Northern Ireland' will set the code 'XI' "
"for products from the United Kingdom whereas code 'XU' "
"will be used for the other UK states.",
)
class ProductProduct(models.Model):

View File

@@ -20,6 +20,10 @@
name="origin_country_id"
attrs="{'invisible': [('type', '=', 'service')]}"
/>
<field
name="origin_state_id"
attrs="{'invisible': [('type', '=', 'service')]}"
/>
</field>
</field>
</record>