blob: 05ef7b469dff037f143ad3e91d0cb48bc5324403 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
l10n_eu_services_eu_country = fields.Boolean('Is European country?', compute='_compute_l10n_eu_services_european_country')
def refresh_eu_tax_mapping(self):
self.env.companies._map_eu_taxes()
@api.depends('company_id')
def _compute_l10n_eu_services_european_country(self):
european_countries = self.env.ref('base.europe').country_ids
for record in self:
record.l10n_eu_services_eu_country = record.company_id.account_tax_fiscal_country_id in european_countries
|