Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: LATAM Document

Entity: account.move

Compute Method: _compute_l10n_latam_document_number

Inputs Method Outputs
recs_with_name = self.filtered(lambda x: x.name and x.name != "/")
for rec in recs_with_name:
            name = rec.name
            doc_code_prefix = rec.l10n_latam_document_type_id.doc_code_prefix
            if doc_code_prefix and name:
                name = name.split(" ", 1)[-1]
            rec.l10n_latam_document_number = name
remaining = self - recs_with_name
remaining.l10n_latam_document_number = False

Back to entity