Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to set up allocate leave per month?

By
jyothi
on 8/5/14, 2:47 AM 885 views

 

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

jyothi
on 8/5/14, 7:20 AM
0

Odoo

--Odoo --
1328
| 5 2 5
kerala, India
--Odoo --

Working as a Odoo Functional and Technical Expert

Odoo
On 8/5/14, 7:23 AM
0

Ludo - Neobis

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

Ludo - Neobis
On 8/5/14, 3:39 AM

I think you need to go to Settings --> Configuration --> Human Resources and check the option for "Validate timesheets every" to "month". 

[EDIT]

Someone messed up my answer. In short, not that the question has expanded, I think there is no standard solution.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/5/14, 2:47 AM
Seen: 885 times
Last updated: 3/16/15, 8:10 AM