Debian Codegraph @

addons/l10n_fr_account/models/res_partner.py

raw
1 from odoo import api, models, _
2
3
4 class ResPartner(models.Model):
5 _inherit = 'res.partner'
6
7 @api.depends('country_id.code', 'ref_company_ids.account_fiscal_country_id.code')
8 def _compute_company_registry_placeholder(self):
9 super()._compute_company_registry_placeholder()
10 for partner in self:
11 country = partner.ref_company_ids[:1].account_fiscal_country_id or partner.country_id
12 if country.code == 'FR':
13 partner.company_registry_placeholder = _('SIRET Number')
14 elif country.code == 'PF':
15 partner.company_registry_placeholder = _('No. Tahiti') # PF adheres to French regulations