Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
5665 Представления

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
дек. 23
1394
1
сент. 23
2071
0
сент. 22
2833
0
авг. 25
144
0
авг. 25
178