Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
10485 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
6
dez. 23
65977
0
fev. 16
4
0
dez. 15
3483
2
mar. 15
10220
1
nov. 22
5545