'Checks whether the current user is working'

def _compute_is_user_working(self):

    for order in self:
        if order.time_ids.filtered((lambda x: ((x.user_id.id == self.env.user.id) and (not x.date_end) and (x.loss_type in ('productive', 'performance'))))):
            order.is_user_working = True
        else:
            order.is_user_working = False
