odoo/odoo#204838

Created by fw-bot
Merged at 3207bde9e9ecc619c29c0112e4f6d017fd9b77a0

Statuses:

label
odoo-dev:master-17.0-t-46916-jue-427733-fw
head
96b10d825771ade35d6ae063387d375621493402
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