Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
5601 Visualizzazioni

Under accounting -> Vendors -> Bills:


How do I ensure that for a given vendor bill, if someone creates a new Bill in the system with the same reference ('ref') string it should raise an exception. Vendor bills should have unique reference. 

https://imgur.com/EWrnS0S

After Inheriting the account.move, how can I get the context with constrains method where if a user tries to create a new bill with a reference which already exists in the system, it should raise an exception and not make a duplicate?


Thank you for your time. 

Avatar
Abbandona
Risposta migliore

This is already checked in Odoo. 

See https://github.com/odoo/odoo/blob/13.0/addons/account/models/account_move.py#L1458

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
dic 23
1382
1
set 23
2057
0
set 22
2824
0
ago 25
4
0
ago 25
28