19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:28 +01:00
parent ff721d030e
commit 7721452493
1826 changed files with 124775 additions and 274114 deletions

View file

@ -8,7 +8,6 @@ class ResCompany(models.Model):
_inherit = 'res.company'
l10n_fr_closing_sequence_id = fields.Many2one('ir.sequence', 'Sequence to use to build sale closings', readonly=True)
siret = fields.Char(related='partner_id.siret', string='SIRET', size=14, readonly=False)
ape = fields.Char(string='APE')
is_france_country = fields.Boolean(
compute="_compute_is_france_country",
@ -26,14 +25,10 @@ class ResCompany(models.Model):
"""
return ['FR', 'MF', 'MQ', 'NC', 'PF', 'RE', 'GF', 'GP', 'TF', 'BL', 'PM', 'YT', 'WF'] # These codes correspond to France and DOM-TOM.
@api.model
def _get_unalterable_country(self):
return self._get_france_country_codes()
def _is_accounting_unalterable(self):
if not self.vat and not self.country_id:
return False
return self.country_id and self.country_id.code in self._get_unalterable_country()
return self.country_id and self.country_id.code in self._get_france_country_codes()
@api.model_create_multi
def create(self, vals_list):
@ -64,7 +59,7 @@ class ResCompany(models.Model):
for seq_field in sequence_fields:
if not company[seq_field]:
vals = {
'name': _('Securisation of %s - %s') % (seq_field, company.name),
'name': _('Securisation of %(field)s - %(company)s', field=seq_field, company=company.name),
'code': 'FRSECURE%s-%s' % (company.id, seq_field),
'implementation': 'no_gap',
'prefix': '',