Odoo Help

2

How to use multiple contracts to generate one payslip for an employee

By
Farook
on 7/12/13, 9:09 AM 1,474 views

One of our client have a scenario where some of their employees could be working on different pay-scale (contract) at different periods in the same month. So while generating payslip, their salary should be calculated from two different contracts, based on the time they spent in respective projects which will be updated in the timesheet. This is a typical scenario for manpower supply companies in middle-east. Can anybody please tell me how to implement this in openerp or if there is already a functionality available in openerp for this

1
oodiko
On 3/29/17, 9:54 AM

IF you create multiple contracts the latest one will takes effect while payslip creation, this is the normal flow of odoo. If you need to keep both contracts, then you have to customize it

0
Bayode Aderinola
On 3/29/17, 10:11 AM

You can implement this in Odoo 10 like so:

  1. Define multiple contracts for the employees concerned. For example, for a particular employee you might have a "NORMAL" hourly wage of $12/hour and a "SPECIAL" hourly wage of $18/hour (e.g. overtime hours).

  2. Create a salary rule for normal hours. The python code will be something like worked_days.NORMAL.contract_id.wage * worked_days.NORMAL.number_of_hours

  3. Create a salary rule for special hours. The python code will be something like worked_days.SPECIAL.contract_id.wage * worked_days.SPECIAL.number_of_hours

  4. You can optionally have one salary rule incorporating (adding) the two relations above, depending on whether you want to display the normal and special pay separately on the payslip or not.

  5. Create a salary structure incorporating the rules above and other desired rules.

  6. While creating the payslip, create two inputs under Worked Days like so (a) an input with code "NORMAL" linked to the normal contract and (6) another input with code "SPECIAL" linked to the special contract. On the payslip, be sure to select a Contract (any of the ones defined for the employee) and the right Salary Structure, to get the right calculations.

  7. Check that everything else is fine and click on "Compute Sheet".

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)

Stats

Asked: 7/12/13, 9:09 AM
Seen: 1474 times
Last updated: 5/23/17, 11:37 PM