Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
10493 Näkymät

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

Avatar
Hylkää
Paras vastaus

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. 

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
6
jouluk. 23
65993
0
helmik. 16
4
0
jouluk. 15
3484
2
maalisk. 15
10232
1
marrask. 22
5560