task.effective_hours=sum(task.sudo().timesheet_ids.mapped('unit_amount'))# use 'sudo' here to allow project user (without timesheet user right) to create task
remaining_hours=fields.Float(compute='_hours_get',store=True,string='Remaining Hours',help="Total remaining time, can be re-estimated periodically by the assignee of the task.")
effective_hours=fields.Float(compute='_hours_get',store=True,string='Hours Spent',help="Computed using the sum of the task work done.")
total_hours=fields.Float(compute='_hours_get',store=True,string='Total',help="Computed as: Time Spent + Remaining Time.")
total_hours_spent=fields.Float(compute='_hours_get',store=True,string='Total Hours',help="Computed as: Time Spent + Sub-tasks Hours.")
delay_hours=fields.Float(compute='_hours_get',store=True,string='Delay Hours',help="Computed as difference between planned hours by the project manager and the total hours of the task.")
children_hours=fields.Float(compute='_hours_get',store=True,string='Sub-tasks Hours',help="Sum of the planned hours of all sub-tasks (when a sub-task is closed or its spent hours exceed its planned hours, spent hours are counted instead)")