res.currency.rate has this original constraint
CONSTRAINT res_currency_rate_currency_uniq UNIQUE (name)
can I override it somehow to make it a unique name for each currency and not unique name per all table
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
res.currency.rate has this original constraint
CONSTRAINT res_currency_rate_currency_uniq UNIQUE (name)
can I override it somehow to make it a unique name for each currency and not unique name per all table
You can add an extra param to check the uniqueness:
unique(name,currency_id)
However, take into account that it should be done in original model: in inherited models it will not work. Have also a look at - https://www.odoo.com/forum/help-1/question/remove-sql-constraints-5431 - for extra details regarding removing SQL constraints.
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
how to use constraint and sql constraint?
Diselesaikan
|
|
6
Des 23
|
65772 | |
|
0
Feb 16
|
4 | ||
|
0
Des 15
|
3439 | ||
|
2
Mar 15
|
10126 | ||
|
1
Nov 22
|
5313 |