Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda

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
Buang
Jawaban Terbai

This is already checked in Odoo. 

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

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Des 23
1440
1
Sep 23
2104
0
Sep 22
2881
0
Agu 25
176
1
Agu 25
302