Skip to Content
Menu
This question has been flagged
1 Atsakyti
10522 Rodiniai

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

Portretas
Atmesti
Best Answer

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. 

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
6
gruod. 23
66023
0
vas. 16
4
0
gruod. 15
3491
2
kov. 15
10248
1
lapkr. 22
5585