diff --git a/CHANGELOG b/CHANGELOG index cc8f657f36..747df4034d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Remove unique constraint on tax group code column * Add default search value on account move * Remove egenix-mx-base and replace it by python-dateutil * Improve General Ledger to compute lines for each accounts at once diff --git a/tax.py b/tax.py index 9a0922e2b2..8e3b77a9fa 100644 --- a/tax.py +++ b/tax.py @@ -18,11 +18,12 @@ class Group(ModelSQL, ModelView): name = fields.Char('Name', size=None, required=True, translate=True) code = fields.Char('Code', size=None, required=True) - def __init__(self): - super(Group, self).__init__() - self._sql_constraints += [ - ('code_uniq', 'UNIQUE(code)', 'The code must be unique!'), - ] + def init(self, cursor, module_name): + super(Group, self).init(cursor, module_name) + table = TableHandler(cursor, self, module_name) + + # Migration from 1.4 drop code_uniq constraint + table.drop_constraint('code_uniq') Group()