From 871c0621f57e6a8367b2df032c2905da8e65cd96 Mon Sep 17 00:00:00 2001 From: Kevin Luna Date: Wed, 28 May 2025 12:45:48 +0200 Subject: [PATCH] [IMP] cb_hr_views: not required company --- cb_hr_views/models/__init__.py | 1 + cb_hr_views/models/hr_work_location.py | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 cb_hr_views/models/hr_work_location.py diff --git a/cb_hr_views/models/__init__.py b/cb_hr_views/models/__init__.py index bbf04354..63e97e7a 100644 --- a/cb_hr_views/models/__init__.py +++ b/cb_hr_views/models/__init__.py @@ -9,3 +9,4 @@ from . import hr_laboral_category from . import iot_key from . import hr_leave_type +from . import hr_work_location diff --git a/cb_hr_views/models/hr_work_location.py b/cb_hr_views/models/hr_work_location.py new file mode 100644 index 00000000..302ec846 --- /dev/null +++ b/cb_hr_views/models/hr_work_location.py @@ -0,0 +1,9 @@ +from odoo import fields, models + + +class HrWorkLocation(models.Model): + _inherit = "hr.work.location" + + company_id = fields.Many2one( + "res.company", required=False, default=lambda self: self.env.company + )