mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Deliberately not setting company_id in hr_payroll_rate
This is intended to make instances of 'hr_payroll_rate' more like configuration for the modules that create them. Additional test and sorting makes it possible to 'prefer' to have company set to allow effectively per-company overrides.
This commit is contained in:
@@ -64,6 +64,16 @@ class TestPayrollRate(common.TransactionCase):
|
||||
rate = self.payslip.get_rate('TEST')
|
||||
self.assertEqual(rate, test_rate)
|
||||
|
||||
test_rate_more_specific = self.env['hr.payroll.rate'].create({
|
||||
'name': 'Test Rate Specific',
|
||||
'code': 'TEST',
|
||||
'rate': 1.65,
|
||||
'date_from': '2018-01-01',
|
||||
'company_id': self.payslip.company_id.id,
|
||||
})
|
||||
rate = self.payslip.get_rate('TEST')
|
||||
self.assertEqual(rate, test_rate_more_specific)
|
||||
|
||||
def test_payroll_rate_newer(self):
|
||||
test_rate_old = self.env['hr.payroll.rate'].create({
|
||||
'name': 'Test Rate',
|
||||
|
||||
Reference in New Issue
Block a user