-
- Downloads
[FIX] l10n_latam_invoice_document: Do not restrict additional use cases
If the account.move already has a `l10n_latam_document_number` set on it, the post() method should not try to consume a sequence again by any means. The validation filtering is also done with `l10n_latam_document_number` as this is the field which give the `account.move.name` the desired value; this makes a stronger validation while making it more flexible for other localizations which do not depend on the `account.move.name` to post an invoice.
On vendor invoices it allows to manually assign a `l10n_latam_document_number` and posting it without needing an ir.sequence assigned to the specific consuming a sequence from ir.sequence (and it does not even need to have one) as the value is already in the account.move.
**Context**: Not all latam localizations use the `l10n_latam_document_number` as the move `name`. This is basically for auditing purposes, as some countries (like Dominican Republic, Honduras, etc) do not always have **continuity** in their sequences, requiring to keep Odoo's base behavior on the move.name
closes odoo/odoo#43850
Signed-off-by:
Josse Colpaert <jco@openerp.com>
Please register or sign in to comment