Skip to content
Snippets Groups Projects
Commit 92b93819 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#81748

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


Task: 2612299
Related: odoo/enterprise#23255
Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
parent ed41d4f4
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment