Reviewers: udo.spallek,
Please review this at http://codereview.tryton.org/48007/ Affected files: M work.py Index: work.py =================================================================== --- a/work.py +++ b/work.py @@ -81,11 +81,15 @@ def init(self, module_name): timesheet_work_obj = Pool().get('timesheet.work') cursor = Transaction().cursor - table = TableHandler(cursor, self, module_name) - sequence_column_exist = table.column_exist('sequence') + table_work = TableHandler(cursor, self, module_name) + table_timesheet = TableHandler(cursor, self, module_name) + migrate_sequence = (not table_work.column_exist('sequence') + and table_timesheet.column_exist('sequence')) + super(Work, self).init(module_name) + # Migration from 2.0: copy sequence from timesheet to project - if not sequence_column_exist: + if migrate_sequence: cursor.execute( 'SELECT t.sequence, t.id ' 'FROM "%s" AS t ' -- [email protected] mailing list
