odooodoo-9

Override SQL constraint


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


Solution

  • Use this:

     _sql_constraints = [('res_currency_uni1ue', 'CHECK(1=1)', 'This is unique!')]