diff --git a/intrastat_base/country_data.xml b/intrastat_base/country_data.xml index 228c0b4..04fb439 100644 --- a/intrastat_base/country_data.xml +++ b/intrastat_base/country_data.xml @@ -2,83 +2,86 @@ + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/intrastat_base/intrastat_common.py b/intrastat_base/intrastat_common.py index 6d7e47b..8320b8a 100644 --- a/intrastat_base/intrastat_common.py +++ b/intrastat_base/intrastat_common.py @@ -60,10 +60,10 @@ class report_intrastat_common(osv.osv_memory): def _check_generate_lines(self, cr, uid, intrastat, context=None): - if not intrastat.company_id.currency_id.code: - raise osv.except_osv(_('Error :'), _("The currency code is not set on the currency '%s'.") %intrastat.company_id.currency_id.name) - if not intrastat.currency_id.code == 'EUR': - raise osv.except_osv(_('Error :'), _("The company currency must be 'EUR', but is currently '%s'.") %intrastat.currency_id.code) + if not intrastat.company_id.country_id: + raise osv.except_osv(_('Error :'), _("The country is not set on the company '%s'.") %intrastat.company_id.name) + if not intrastat.currency_id.name == 'EUR': + raise osv.except_osv(_('Error :'), _("The company currency must be 'EUR', but is currently '%s'.") %intrastat.currency_id.name) return True