odoo/odoo#204818

Created by fw-bot
Merged at 64101f58077ebc9aae1da5b89e96a3d1d0c7af7e

Statuses:

label
odoo-dev:saas-18.2-17.0-t-46916-jue-427706-fw
head
08e0024edca4ee4c9827a5d8ebf73aa9c5aefcbd
merged
7 months ago by Accounting, Claire Bretton (clbr)
odoo/odoo
17.0 #198216
saas-17.4 #204739
18.0 #204771
saas-18.1 #204798
saas-18.2 #204818
saas-18.3
saas-18.4
19.0
master #204838

[FW][IMP] l10n_uy: doc number format validation

Description of the issue/feature this PR addresses:
This PR is to avoid making unnecessary format validations on manual documents, as well as to improve the error message shown when the validation is done and the user had entered an invalid document number.
A use case for these changes is when the user wants to register an invoice from a foreign supplier that does not have the Uruguayan format, and at the moment of filling the “Document Number” field, an error message appears saying that it does not comply with the Uruguayan number validations.

Current behavior before PR:
Either electronic or manual document numbers format were validated against the electronic documents format.

Desired behavior after PR is merged:
Only electronic document numbers are validated to check if they have the proper format.

Steps to reproduce the error:
1) Install l10n_uy
2) Create an invoice using a manual journal.
3) Set a random document number (for example '1234')
4) Check that a pop up is raised, saying that the format is invalid.


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #198216