After an upgrade to Odoo 8, I noticed a new write method in hr_holidays:
def write(self, cr, uid, ids, vals, context=None):
if vals.get('state') and vals['state'] not in ['draft', 'confirm', 'cancel'] and not self.pool['res.users'].has_group(cr, uid, 'base.group_hr_user'):
raise osv.except_osv(_('Warning!'), _('You cannot set a leave request as \'%s\'. Contact a human resource manager.') % vals.get('state'))
return super(hr_holidays, self).write(cr, uid, ids, vals, context=context)
I want to be able to give users the right to approve leave requests without having to add them to the group 'base.group_hr_user'. In OpenERP 6.1, I created a group called 'Leave Approvers' for this reason.
Is it possible to change this new write method without having to modify the addon itself?