From f94a47a614ca33ed9cd0ef0d5bf959e78aae80a5 Mon Sep 17 00:00:00 2001 From: luc-demeyer Date: Tue, 29 Aug 2017 18:32:48 +0200 Subject: [PATCH] rename invoice src_dest_country_code --- intrastat_product/models/account_invoice.py | 2 +- intrastat_product/views/account_invoice.xml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/intrastat_product/models/account_invoice.py b/intrastat_product/models/account_invoice.py index 96b7068..4a69418 100644 --- a/intrastat_product/models/account_invoice.py +++ b/intrastat_product/models/account_invoice.py @@ -24,7 +24,7 @@ class AccountInvoice(models.Model): src_dest_country_id = fields.Many2one( 'res.country', string='Origin/Destination Country', ondelete='restrict') - src_dest_country_code = fields.Char( + company_country_code = fields.Char( related='company_id.country_id.code', readonly=True) src_dest_region_id = fields.Many2one( 'intrastat.region', string='Origin/Destination Region', diff --git a/intrastat_product/views/account_invoice.xml b/intrastat_product/views/account_invoice.xml index fae7050..10fbc87 100644 --- a/intrastat_product/views/account_invoice.xml +++ b/intrastat_product/views/account_invoice.xml @@ -18,9 +18,9 @@ attrs="{'invisible': [('intrastat', '!=', 'extended')]}" widget="selection"/> - + + attrs="{'invisible': [('company_country_code', 'not in', ['BE'])]}"/> @@ -44,9 +44,9 @@ attrs="{'invisible': [('intrastat', '!=', 'extended')]}" widget="selection"/> - + + attrs="{'invisible': [('company_country_code', 'not in', ['BE'])]}"/>