Skip to content
Snippets Groups Projects
Commit 20061487 authored by Brice bib Bartoletti's avatar Brice bib Bartoletti
Browse files

[FIX] account: soften duplicate ref constrains

The aim of this commit is to allow EDIs to create and save account move
even if a supplier reference is duplicated.
This is achieved by delaying the moment to which the constrains is
triggered.

Before this commit:
A user can only upload a bill once. (xml ubl format for instance)
If he needs to upload it a second time, he will be forced to find a
workaround.

After this commit:
User will be able to upload as many bill as he wants but will receive a
ValidationError when trying to post the invoice if the reference is
duplicated.
The user will be able to post the bill very easily by changing the
reference a bit if he wants to pursue.

closes odoo/odoo#82261

Community-pr: https://github.com/odoo/odoo/pull/81748
Enterprise-pr: https://github.com/odoo/enterprise/pull/23255


Task: 2612299
X-original-commit: 92b93819
Related: odoo/enterprise#23260
Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
parent 9fae8e2a
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment