コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
10481 ビュー

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. 

アバター
破棄
関連投稿 返信 ビュー 活動
6
12月 23
65960
0
2月 16
4
0
12月 15
3480
2
3月 15
10216
1
11月 22
5541