odoo/enterprise#68940
Created by fw-bot
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- ci/l10n: (runtime 3724s)
- label
- odoo-dev:saas-17.1-16.0-opw-3993305-credit_note_document_ecuador-yosa-8i2o-fw
- head
- f8a07ab650dd44a11c22763cb4dc2870155045d9
- merged
- 1 year ago by Bugfix, Yolann Sabaux (yosa)
odoo/odoo | odoo/enterprise | |
---|---|---|
16.0 | #174950 | #67589 |
17.0 | #177597 | #68775 |
saas-17.1 | #177954 | #68940 |
saas-17.2 | #177974 | #68949 |
saas-17.4 | #178315 | #69117 |
18.0 | #181450 | #70673 |
saas-18.1 | #191668 | #76129 |
saas-18.2 | #197975 | #79484 |
saas-18.3 | ||
saas-18.4 | ||
19.0 | ||
master | #178433 | #69158 |
[FW][FIX] l10n_latam_invoice_document: prevent blocking foreign document number
Steps to reproduce:
[l10n_ec]
- Create a credit note from the Bill journal
- Set a foreign customer
- Set a customized document number
Issue:
An error will be raised saying that the format is not correct
But, as defined by VBE, "If a Credit Note is created from a Vendor Bill and the partner_id != "EC", [we should] allow the user to allocate any number without following the EC format."
Solution:
When we call _format_document_number
we don't have any information about the initial move. Instead of using a context or adding new fields, we add a hook in which we can specify
certain conditions to bypass the document check/formatting for localisations.
We had to add partner_id
to avoid the flow in wich the user set a foreign customer and a custom document type to change back the customer to an ecuadorian one; hence the second part of the test
Forward-Port-Of: #67589