In Odoo HR module Payroll management facilitates the management of employee's payroll and related functionalities. We can create each employee's contract details and maintain different salary structures using salary rules. But in Odoo, the whole salary computations are done based on the basic wage that we defined on the employee contract Form. But in some business models, there may be exceptions to it. Suppose someone wants to prepare the payroll based on the total hour the employee worked, such options are actually indeed for most of the firms.
In such cases, it would be more effective if we can calculate the payroll based on the timesheet of the employee. So we have developed a custom module Timesheet Based Payroll.
This module actually does the same employee contracts and salary structure management process. But the basic wage calculation is on Hour basis and it uses the timesheet submitted by the employee to prepare the payroll.
Let's have a look at its working and configurations.
You can install the module from the Odoo app store. The installation alone won't force the computation process to the hourly basis method. You have to configure it according to your needs.
1.Configure Contract
First, we need to define a contract based on timesheet based payroll. You have to check the Timesheet Based Payroll flag in contract form. This will change the wage calculation method and henceforth the payroll will be prepared on the basis of timesheet provided by the employee. Here we have to define a salary structure also, the salary structure dropdown will be filtered with the same flag Timesheet based so the normal structured will not be listed.
2.Configure Salary Structures
While configuring the contracts we have to define the salary structures also. The normal salary structures will not be listed for the hour based contracts. Here we are actually replacing the Odoo default basic salary rules and instead, we are calculating the basic as per the total hour submitted.
Here is the form view of a salary structure based on the timesheet. We checked the Timesheet based payroll flag, also we added a new salary rule named Hourly Pay (Timesheet) which is default salary rules in TImesheet Based Payroll. This rule can be used to replace the basic wage salary rule. So the basic wage calculation will be based on hours. The rule is actually defined as :
Here the calculation is based on the total timesheet hours submitted by the particular employee. So you have to ensure the salary rule Hourly Pay is added to your salary structure.
3.Generate Payslip
We can see extra fields on payslip form i.e calculated Total Hours according to the work schedule and the Total Timesheet Hours submitted by the employee.
The computation formula is Basic = (Basic wage/ Total work hours) * Submitted Timesheet Hours.
Computed payslip will calculate the basic salary as follows:
Other rules also depend on the salary rule of category Basic. The new salary rule Hourly Pay will be included in the payslip reports also. Now in default, we have two reports payslip and payslip with details.
Here the salary rule code with HT is the custom calculation based on timesheet hours.