Code review comment for lp:~acsone-openerp/hr-timesheet/migration_hr_timesheet_taskV7

Revision history for this message
Stéphane Bidoul (Acsone) (sbi) wrote :

Hi Laetitia,

Can you add a comment to clarify the purpose and behavior of this code.
This looks tricky enough to warrant some comments :)

for col in ['effective_hours', 'planned_hours', 'total_hours', 'progress_rate']:
   assert project.project._columns[col].store['project.task'][1][2] == 'work_ids', _('work_ids seems to be not present in project.project')
   project.project._columns[col].store['project.task'][1][2] = 'timesheet_ids'

Nitpicking: redundant code in copy_data:

+ if default is None:
+ default = {}
+ default = default or {}

review: Needs Fixing (code)

« Back to merge proposal