diff --git a/addons/hr_contract/models/hr_payroll_structure_type.py b/addons/hr_contract/models/hr_payroll_structure_type.py index ef5a7bd84bb..d021d7ef2c6 100644 --- a/addons/hr_contract/models/hr_payroll_structure_type.py +++ b/addons/hr_contract/models/hr_payroll_structure_type.py @@ -11,5 +11,5 @@ class HrPayrollStructureType(models.Model): name = fields.Char('Salary Structure Type') default_resource_calendar_id = fields.Many2one( 'resource.calendar', 'Default Working Hours', - default=lambda self: self.env.company.resource_calendar_id if self.env.company.country_id else False) + default=lambda self: self.env.company.resource_calendar_id) country_id = fields.Many2one('res.country', string='Country', default=lambda self: self.env.company.country_id) diff --git a/addons/hr_contract/models/resource.py b/addons/hr_contract/models/resource.py index c3f1b427453..52316b92636 100644 --- a/addons/hr_contract/models/resource.py +++ b/addons/hr_contract/models/resource.py @@ -10,7 +10,6 @@ class ResourceCalendar(models.Model): _inherit = 'resource.calendar' contracts_count = fields.Integer("# Contracts using it", compute='_compute_contracts_count', groups="hr_contract.group_hr_contract_manager") - company_country_id = fields.Many2one('res.country', string='Country', related='company_id.partner_id.country_id') def transfer_leaves_to(self, other_calendar, resources=None, from_date=None): """