[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:William André (wan) <wan@odoo.com>
Loading
Please register or sign in to comment