Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
10573 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
6
dec. 23
66075
0
feb. 16
4
0
dec. 15
3516
2
mrt. 15
10285
1
nov. 22
5633