Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
10510 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
6
déc. 23
66000
0
févr. 16
4
0
déc. 15
3485
2
mars 15
10235
1
nov. 22
5570