19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:16 +01:00
parent 89c6e82fe7
commit 1b82c20a58
572 changed files with 43570 additions and 53303 deletions

View file

@ -133,12 +133,10 @@ class AccountMove(models.Model):
l10n_ec_sri_payment_id = fields.Many2one(
comodel_name="l10n_ec.sri.payment",
string="Payment Method (SRI)",
help="Ecuador: Payment Methods Defined by the SRI.",
default=lambda self: self.env['l10n_ec.sri.payment'].search([], limit=1),
)
# NOTE: For backward compatibility, removed in master
def _get_l10n_ec_identification_type(self):
return PartnerIdTypeEc.get_ats_code_for_partner(self.partner_id, self.move_type)
@api.model
def _get_l10n_ec_documents_allowed(self, identification_code):
documents_allowed = self.env['l10n_latam.document.type']
@ -151,7 +149,7 @@ class AccountMove(models.Model):
def _get_l10n_latam_documents_domain(self):
self.ensure_one()
domain = super()._get_l10n_latam_documents_domain()
if self.country_code == 'EC' and self.journal_id.l10n_latam_use_documents:
if self.country_code == 'EC' and self.l10n_latam_use_documents:
if self.debit_origin_id: # show/hide the debit note document type
domain.extend([('internal_type', '=', 'debit_note')])
elif self.move_type in ('out_invoice', 'in_invoice'):
@ -172,7 +170,7 @@ class AccountMove(models.Model):
"""If use documents then will create a new starting sequence using the document type code prefix and the
journal document number with a 8 padding number"""
if (
self.journal_id.l10n_latam_use_documents
self.l10n_latam_use_documents
and self.company_id.country_id.code == "EC"
):
if self.l10n_latam_document_type_id: