Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
10503 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
6
dic 23
65997
0
feb 16
4
0
dic 15
3485
2
mar 15
10232
1
nov 22
5565