From 116a7135033eadeadbf19e822f064d8e8a9699d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 24 Jan 2009 21:01:39 +0100 Subject: [PATCH] Remove report_name_uniq constraint on ir.action.report --- trytond/ir/action.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/trytond/ir/action.py b/trytond/ir/action.py index d84c5d7cc9..6d3b7e23d1 100644 --- a/trytond/ir/action.py +++ b/trytond/ir/action.py @@ -234,12 +234,12 @@ class ActionReport(OSV): module = fields.Char('Module', readonly=True) email = fields.Char('Email') - def __init__(self): - super(ActionReport, self).__init__() - self._sql_constraints += [ - ('report_name_uniq', 'unique (report_name)', - 'The internal name must be unique!'), - ] + def _auto_init(self, cursor, module_name): + super(ActionReport, self)._auto_init(cursor, module_name) + table = table_handler(cursor, self._table, self._name, module_name) + + # Migration from 1.0 report_name_uniq has been removed + table.drop_constraint('report_name_uniq') def default_type(self, cursor, user, context=None): return 'ir.action.report'