Is it convenient for you to calculate basic wage for an employee working from 2018/02/20 ~ 2018/02/28?
As an end user with very basic technical knowledge, it seems to be impossible for you to
- find out number of worked days nor number of full month working days of that full month
- find out the hour rate which is calculated by: contract basic wage / full month working hours (Odoo, in the payslip, does not know full month working hours of that Feb 2018)
Basic Wage: 1000
Payslip Period: 2018/02/20 ~ 2018/02/28
Working Schedule: 44 Hours a week
What you may expect to have
the total month working hours of the Feb 2018 is 176
the total month working days of the Feb 2018 is 22
the duty working hours of the employee of the payslip is 60
the duty working days of the employee of the payslip is 8
This module solves the problem above mentioned by providing the following data into employee payslips:
Month: a single month of the payslip's
Duty Working Hours: the total hours of the month the employee of the payslip has to work according to the payslip period
Duty Working Days: the total days of the month the employee of the payslip has to work according to the payslip period.
Month Working Hours: the total working hours of the FULL month according to the working schedule, no matter what the payslip period is
Month Working Days: the total working days of the FULL month according to the working schedule, no matter what the payslip period is
In case a pay slip crosses months, the data should be a table where each row is a set of the data above mentioned.
How to apply for Salary Rules
Basic Wage Calculation (no leave consideration)
result = sum(line.duty_working_hours * (contract.wage / line.month_working_hours) for line in payslip.working_month_calendar_ids)
Fixed Monthly allowance Calculation (no leave consideration)
result = sum(line.duty_working_hours * (contract.allowance / line.month_working_hours) for line in payslip.working_month_calendar_ids)
1. Duty Working Days and Month Working Days are calculated based on the conversion of the unit of measure Hour(s) -> Day(s) whose default value is 8.0 hours per day.
In case your working hours of a day may vary across your resource calendar, do NOT use this for salary computation. Switch to hours base calculation should be PERFECT!
This software and associated files (the "Software") may only be
(executed, modified, executed after modifications) if you have
valid license from the authors, typically via Odoo Apps,
or if you
received a written agreement from the authors of the
Software (see the
You may develop Odoo modules that use the Software as a library
by depending on it, importing it and using its
copying any source code or material from the
Software. You may distribute
those modules under the license of your
choice, provided that this
is compatible with the terms of
the Odoo Proprietary License (For
LGPL, MIT, or proprietary
licenses similar to this one).
It is forbidden to publish, distribute, sublicense, or sell
copies of the
Software or modified copies of the Software.
The above copyright notice and this permission notice must be
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT
AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE,
FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE