-
-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternative to account_invoice_supplier_ref_unique v14 without adding a field on account.move #1484
Comments
I remember that at some point Odoo was conflating supplier invoice number and payment reference. I think that was the main reason a new field was introduced. If that is resolved a new field may not be necessary anymore. |
@alexis-via , are you sure? 😄 |
@rafaelbn The issue with that, is that if we somehow choose a similar date, the error will not be raised |
@alexis-via The fact is Odoo core is using the 'ref' field as payment reference. The aim with supplier_invoice_number is to add a reference that is for instance the invoice number at the supplier level that could be (and usually) different from the payment reference. |
@rousseldenis I'm confused by your statement. |
In v14, Odoo doesn't display any warning nor any error message when you enter 2 supplier invoices for the same supplier with the same "Bill Reference". In v16, there is a warning banner on the vendor bill when this happens.
In v14, the OCA module account_invoice_supplier_ref_unique raises an error when you enter a second supplier invoice for the same supplier with the same number. But this module adds a field "supplier_invoice_number" on account.move, cf:
https://github.com/OCA/account-invoicing/blob/14.0/account_invoice_supplier_ref_unique/models/account_move.py#L11
I think it's a bad design to add a field on account.move that already exists in the native odoo datamodel. Do we have a solution in OCA to have the same feature without adding a field on account.move ?
Otherwise, I think I'll develop one (maybe it will be a backport of the native feature of v16... I don't know yet).
The text was updated successfully, but these errors were encountered: