mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Abstract fixes and behaviors.
- Adds configurable option for Payslip rule calculation sum date field.
- Fixes inconsistency between .sum_category('CODE') and .categories['CODE']
- Adds semi-monthly Semi-monthly schedule_pay
All features are tested and the tests themselves should serve as test harnesses for other 'payroll' modules.
15 lines
396 B
Python
15 lines
396 B
Python
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class HrPayslip(models.Model):
|
|
_inherit = 'hr.payslip'
|
|
|
|
def get_year(self):
|
|
"""
|
|
# Helper method to get the year (normalized between Odoo Versions)
|
|
:return: int year of payslip
|
|
"""
|
|
return self.date_to.year
|