Odoo18-Base/addons/l10n_fr/models/res_partner.py

19 lines
531 B
Python
Raw Permalink Normal View History

2025-03-10 10:52:11 +07:00
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, api, _
class ResPartner(models.Model):
_inherit = 'res.partner'
siret = fields.Char(string='SIRET', size=14)
def _deduce_country_code(self):
if self.siret:
return 'FR'
return super()._deduce_country_code()
def _peppol_eas_endpoint_depends(self):
# extends account_edi_ubl_cii
return super()._peppol_eas_endpoint_depends() + ['siret']