跳至内容
菜单
此问题已终结

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. 

形象
丢弃
最佳答案

This is already checked in Odoo. 

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

形象
丢弃
相关帖文 回复 查看 活动
2
12月 23
1382
1
9月 23
2062
0
9月 22
2827
0
8月 25
78
0
8月 25
149