Daily updates from Odoo
Tuesday, April 16, 2019
1 change
Enhancements to existing features
Payroll now supports configuring which absences or work entry types are unpaid for each salary structure, so payslips can deduct unpaid time more accurately. Belgian payroll data and 13th month rules are also improved, and payslip reports now show worked-day amounts for clearer employee compensation details.
Original PR description
[IMP] hr_payroll*: Add work entry data ===================== This commit adds benefit types and leave types data. In particular, add Belgian data. [IMP] hr_payroll: Clean unnecessary `@api.model`…
[IMP] hr_payroll*: Add work entry data ===================== This commit adds benefit types and leave types data. In particular, add Belgian data. [IMP] hr_payroll: Clean unnecessary `@api.model` ==================== Clean `@api.model` of `hr.payslip`. Method `get_worked_day_lines` does not need to be `@api.model`. Method `_get_payslip_lines` was wrongly an `@api.model` because it was using self. [IMP] hr_payroll: Allow to get days data for multiple work entry types ================== Currently the method `get_work_days_data` only accept one work entry type as parameter. After this commit, the method accept multiple benefit types. The data returned is the sum of attendance/leaves data for all benefit types in the parameter. [FIX] hr_payroll: Allow recreate cancelled work entry ===================== If a work entry have been cancelled (active: True -> False), an other work entry cannot be created with the same employee, type and date because it violates the unique constraint. The unique constraint should not take into account inactive records. Also the SQL query detecting conflicts between work entries should only take into account active entries. This commit fixes both issues. [IMP] hr_payroll: Add unpaid work engine ================= Purpose --------- Currently, all work entries are considered paid when payslips are computed. However, some work entry types may not be paid (e.g. unpaid leave, long sick leave). Some work entries are paid for some salary structures but not in others. e.g. In Belgium, "Breastfeeding Break" is not paid in the monthly payslip, but counts for "13th month" and "double holiday". There should be a way to choose which work entries (based on the type) are paid/unpaid based on the payslip structure. Specification --------------- Add a m2m field `unpaid_work_entry_type_ids` on payslip structures. When a payslip is computed, the amount corresponding to unpaid work entries is deducted. The deducted amount equals the number of unpaid days multiplied by the average daily salary. The average daily salary is computed as the average wage over 3 months (the number of days in three months is always constant = 13 weeks) [IMP] hr_payroll: Display worked days amount on payslip ================== Purpose ----------- Currently, the number of days and hours for each worked days are displayed on the payslip report based on the work entry type. However the corresponding amount is not. Specification ------------- For each work days line, display the corresponding amount on the report. Amounts should be computed as follows: Worked days lines of unpaid work entries: 0 For other worked days lines: Distribute the paid amount (=basic) among paid worked days types. amount of the line = basic * (number of days of the line)/(total number of paid days) [IMP] l10n_be_hr_payroll: Improve 13th month salary structure ================= Purpose ----- Currently the 13th month salary structure does not take into account many rules in CP200. Specification ------- The following rules should be applied: 1. The 13th month amount equals the December wage 2. An employee isn't allowed a 13th month if he has less than 6 months seniority. 3. If the employee did not worked the full year (but more than 6 months), the amount is prorated according to months fully worked. 4. Some work entries can be deducted (absences). Deducted work entry types: Unpaid, Unpredicatable reason, Long Term Sick, Part Time Sick, Notice