mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[MIG] hr_payroll_overtime: for Odoo Enterprise 14.0
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
'name': 'Payroll Overtime',
|
'name': 'Payroll Overtime',
|
||||||
'description': 'Provide mechanisms to calculate overtime.',
|
'description': 'Provide mechanisms to calculate overtime.',
|
||||||
'version': '13.0.1.0.1',
|
'version': '14.0.1.0.0',
|
||||||
'website': 'https://hibou.io/',
|
'website': 'https://hibou.io/',
|
||||||
'author': 'Hibou Corp. <hello@hibou.io>',
|
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ class TestOvertime(common.TransactionCase):
|
|||||||
|
|
||||||
def test_10_overtime_aggregation_daily(self):
|
def test_10_overtime_aggregation_daily(self):
|
||||||
self.overtime_rules.hours_per_day = 8.0
|
self.overtime_rules.hours_per_day = 8.0
|
||||||
self.overtime_rules.multiplier_per_day = 1.5
|
self.overtime_rules.multiplier = 1.5
|
||||||
# 38 hours in 1 week
|
# 38 hours in 1 week
|
||||||
work_data = [
|
work_data = [
|
||||||
((2020, 24, 1), [
|
((2020, 24, 1), [
|
||||||
@@ -286,7 +286,7 @@ class TestOvertime(common.TransactionCase):
|
|||||||
'multiplier': 2.0,
|
'multiplier': 2.0,
|
||||||
})
|
})
|
||||||
self.overtime_rules.hours_per_day = 8.0
|
self.overtime_rules.hours_per_day = 8.0
|
||||||
self.overtime_rules.multiplier_per_day = 1.5
|
self.overtime_rules.multiplier = 1.5
|
||||||
self.work_type_overtime.overtime_type_id = self.overtime_rules2
|
self.work_type_overtime.overtime_type_id = self.overtime_rules2
|
||||||
self.work_type_overtime.overtime_work_type_id = self.work_type_overtime2
|
self.work_type_overtime.overtime_work_type_id = self.work_type_overtime2
|
||||||
|
|
||||||
@@ -328,7 +328,7 @@ class TestOvertime(common.TransactionCase):
|
|||||||
def test_13_recursive_infinite_trivial(self):
|
def test_13_recursive_infinite_trivial(self):
|
||||||
# recursive should will use a second overtime, but not this time!
|
# recursive should will use a second overtime, but not this time!
|
||||||
self.overtime_rules.hours_per_day = 8.0
|
self.overtime_rules.hours_per_day = 8.0
|
||||||
self.overtime_rules.multiplier_per_day = 1.5
|
self.overtime_rules.multiplier = 1.5
|
||||||
self.work_type.overtime_type_id = self.overtime_rules
|
self.work_type.overtime_type_id = self.overtime_rules
|
||||||
# overtime goes to itself
|
# overtime goes to itself
|
||||||
self.work_type.overtime_work_type_id = self.work_type
|
self.work_type.overtime_work_type_id = self.work_type
|
||||||
@@ -347,7 +347,7 @@ class TestOvertime(common.TransactionCase):
|
|||||||
def test_14_recursive_infinite_loop(self):
|
def test_14_recursive_infinite_loop(self):
|
||||||
# recursive will use a second overtime, but not this time!
|
# recursive will use a second overtime, but not this time!
|
||||||
self.overtime_rules.hours_per_day = 8.0
|
self.overtime_rules.hours_per_day = 8.0
|
||||||
self.overtime_rules.multiplier_per_day = 1.5
|
self.overtime_rules.multiplier = 1.5
|
||||||
self.work_type_overtime.overtime_type_id = self.overtime_rules
|
self.work_type_overtime.overtime_type_id = self.overtime_rules
|
||||||
# overtime goes back to worktype
|
# overtime goes back to worktype
|
||||||
self.work_type_overtime.overtime_work_type_id = self.work_type
|
self.work_type_overtime.overtime_work_type_id = self.work_type
|
||||||
@@ -366,7 +366,7 @@ class TestOvertime(common.TransactionCase):
|
|||||||
def test_15_override_day_of_week(self):
|
def test_15_override_day_of_week(self):
|
||||||
iso_date = (2020, 24, 1)
|
iso_date = (2020, 24, 1)
|
||||||
self.overtime_rules.hours_per_day = 8.0
|
self.overtime_rules.hours_per_day = 8.0
|
||||||
self.overtime_rules.multiplier_per_day = 1.5
|
self.overtime_rules.multiplier = 1.5
|
||||||
work_data = [
|
work_data = [
|
||||||
(iso_date, [
|
(iso_date, [
|
||||||
(self.work_type, 4.0, None),
|
(self.work_type, 4.0, None),
|
||||||
@@ -405,7 +405,7 @@ class TestOvertime(common.TransactionCase):
|
|||||||
def test_16_override_date(self):
|
def test_16_override_date(self):
|
||||||
iso_date = (2020, 24, 1)
|
iso_date = (2020, 24, 1)
|
||||||
self.overtime_rules.hours_per_day = 8.0
|
self.overtime_rules.hours_per_day = 8.0
|
||||||
self.overtime_rules.multiplier_per_day = 1.5
|
self.overtime_rules.multiplier = 1.5
|
||||||
work_data = [
|
work_data = [
|
||||||
(iso_date, [
|
(iso_date, [
|
||||||
(self.work_type, 4.0, None),
|
(self.work_type, 4.0, None),
|
||||||
|
|||||||
@@ -87,6 +87,6 @@
|
|||||||
|
|
||||||
<menuitem id="hr_work_entry_overtime_type_menu_main" name="Overtime Rules"
|
<menuitem id="hr_work_entry_overtime_type_menu_main" name="Overtime Rules"
|
||||||
action="hr_work_entry_overtime_type_action_main"
|
action="hr_work_entry_overtime_type_action_main"
|
||||||
sequence="11" parent="hr_payroll.menu_hr_work_entry_confirguration"/>
|
sequence="11" parent="hr_work_entry_contract.menu_hr_work_entry_confirguration"/>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
Reference in New Issue
Block a user