odoo/odoo#204739

Created by fw-bot
Merged at fbd6ec9c1bea1674f3ae2db6c6540686ca6cb123

Statuses:

label
odoo-dev:saas-17.4-17.0-t-46916-jue-417014-fw
head
961e351908a163a41b3e0139e15c96c592c5351a
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