I need 1 Paid Leave to allocate each month to the employee. How can i set up that?
but i need to allocate leaves by monthly.eg:
in october i allocate 2 leaves for all employees
in august, there is no allocation.
but now the employee can able to take 2 leaves in august,that is the error,i need there is no leave in august,only in october they take 2 leaves.
so please find a solution
i added the py file
from osv import osv,fields
from openerp.tools.translate import _
class leave_info(osv.osv):
# _name='leave.info'
_inherit='hr.holidays'
def button_generate(self,cr,uid,ids,context=None):
dummy, view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid,'hr_holidays', 'allocation_leave_new')
inv = self.browse(cr, uid, ids[0], context=context)
return {
'name':_("Leave Allocation"),
'view_mode': 'form',
'view_id': view_id,
'view_type': 'form',
'res_model': 'hr.holidays',
'type': 'ir.actions.act_window',
'nodestroy': True,
'domain': '[]',
'context': None
}
leave_info()
thank you for you answer,but i need to allocate leaves by monthly.eg: in october i allocate 2 leaves for all employees in august, there is no allocation. but now the employee can able to take 2 leaves in august,that is the error,i need there is no leave in august,only in october they take 2 leaves. so please find a solution