(self, msg_vals=None)
return [new_group] + groups
Handle HR users and officers recipients that can validate or refuse holidays
        directly from email.
Handle HR users and officers recipients that can validate or refuse holidays
        directly from email.
Handle HR users and officers recipients that can validate or refuse holidays directly from email .
def _notify_get_groups(self, msg_vals=None):
        """ Handle HR users and officers recipients that can validate or refuse holidays
        directly from email. """
        groups = super(HolidaysAllocation, self)._notify_get_groups(msg_vals=msg_vals)
        local_msg_vals = dict(msg_vals or {})

        self.ensure_one()
        hr_actions = []
        if self.state == 'confirm':
            app_action = self._notify_get_action_link('controller', controller='/allocation/validate', **local_msg_vals)
            hr_actions += [{'url': app_action, 'title': _('Approve')}]
        if self.state in ['confirm', 'validate', 'validate1']:
            ref_action = self._notify_get_action_link('controller', controller='/allocation/refuse', **local_msg_vals)
            hr_actions += [{'url': ref_action, 'title': _('Refuse')}]

        holiday_user_group_id = self.env.ref('hr_holidays.group_hr_holidays_user').id
        new_group = (
            'group_hr_holidays_user', lambda pdata: pdata['type'] == 'user' and holiday_user_group_id in pdata['groups'], {
                'actions': hr_actions,
            })

        return [new_group] + groups
def _notify_get_groups ( self , msg_vals = None ) : groups = super ( HolidaysAllocation , self ) . _notify_get_groups ( msg_vals = msg_vals ) local_msg_vals = dict ( msg_vals or { } ) self . ensure_one ( ) hr_actions = [ ] if self . state == 'confirm' : app_action = self . _notify_get_action_link ( 'controller' , controller = '/allocation/validate' , * * local_msg_vals ) hr_actions += [ { 'url' : app_action , 'title' : _ ( 'Approve' ) } ] if self . state in [ 'confirm' , 'validate' , 'validate1' ] : ref_action = self . _notify_get_action_link ( 'controller' , controller = '/allocation/refuse' , * * local_msg_vals ) hr_actions += [ { 'url' : ref_action , 'title' : _ ( 'Refuse' ) } ] holiday_user_group_id = self . env . ref ( 'hr_holidays.group_hr_holidays_user' ) . id new_group = ( 'group_hr_holidays_user' , lambda pdata : pdata [ 'type' ] == 'user' and holiday_user_group_id in pdata [ 'groups' ] , { 'actions' : hr_actions , } ) return [ new_group ] + groups