Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Override SQL constraint

Tags:

odoo

odoo-9

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

like image 284
Chaban33 Avatar asked Oct 31 '25 21:10

Chaban33


1 Answers

Use this:

 _sql_constraints = [('res_currency_uni1ue', 'CHECK(1=1)', 'This is unique!')]
like image 58
Akshay Avatar answered Nov 04 '25 20:11

Akshay