From 9e7b5dbb9f7af0c0218b5a371d66ff972c6a0680 Mon Sep 17 00:00:00 2001
From: Juany Davila
Date: Mon, 20 Jun 2022 19:17:19 -0500
Subject: [PATCH] [MIG] hr_contract_operating_unit: Migration to 15.0
---
hr_contract_operating_unit/README.rst | 15 +++++++--------
hr_contract_operating_unit/__init__.py | 1 -
hr_contract_operating_unit/__manifest__.py | 2 +-
hr_contract_operating_unit/models/hr_contract.py | 1 +
.../static/description/index.html | 10 +++++-----
.../views/hr_contract_view.xml | 1 -
6 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/hr_contract_operating_unit/README.rst b/hr_contract_operating_unit/README.rst
index 832b36fcda..fb0d485c1e 100644
--- a/hr_contract_operating_unit/README.rst
+++ b/hr_contract_operating_unit/README.rst
@@ -14,16 +14,16 @@ HR Contract Operating Unit
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Foperating--unit-lightgray.png?logo=github
- :target: https://github.com/OCA/operating-unit/tree/14.0/hr_contract_operating_unit
+ :target: https://github.com/OCA/operating-unit/tree/15.0/hr_contract_operating_unit
:alt: OCA/operating-unit
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/operating-unit-14-0/operating-unit-14-0-hr_contract_operating_unit
+ :target: https://translation.odoo-community.org/projects/operating-unit-15-0/operating-unit-15-0-hr_contract_operating_unit
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/213/14.0
+ :target: https://runbot.odoo-community.org/runbot/213/15.0
:alt: Try me on Runbot
-|badge1| |badge2| |badge3| |badge4| |badge5|
+|badge1| |badge2| |badge3| |badge4| |badge5|
This module introduces the following features:
@@ -42,7 +42,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -52,7 +52,7 @@ Credits
Authors
~~~~~~~
-* ForgeFlow S.L.
+* Forgeflow S.L.
* Serpent Consulting Services Pvt. Ltd.
Contributors
@@ -62,7 +62,6 @@ Contributors
* Serpent Consulting Services Pvt. Ltd.
* Juany Davila
-
Maintainers
~~~~~~~~~~~
@@ -76,6 +75,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-This module is part of the `OCA/operating-unit `_ project on GitHub.
+This module is part of the `OCA/operating-unit `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/hr_contract_operating_unit/__init__.py b/hr_contract_operating_unit/__init__.py
index 8ef8585861..44f9fd7c13 100644
--- a/hr_contract_operating_unit/__init__.py
+++ b/hr_contract_operating_unit/__init__.py
@@ -1,4 +1,3 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from . import models
-from . import tests
diff --git a/hr_contract_operating_unit/__manifest__.py b/hr_contract_operating_unit/__manifest__.py
index 01bbc539c7..1461704873 100644
--- a/hr_contract_operating_unit/__manifest__.py
+++ b/hr_contract_operating_unit/__manifest__.py
@@ -6,7 +6,7 @@
{
"name": "HR Contract Operating Unit",
- "version": "14.0.1.0.0",
+ "version": "15.0.1.0.0",
"license": "LGPL-3",
"author": "Forgeflow S.L., "
"Serpent Consulting Services Pvt. Ltd.,"
diff --git a/hr_contract_operating_unit/models/hr_contract.py b/hr_contract_operating_unit/models/hr_contract.py
index 9883e6c70a..3894ddec51 100644
--- a/hr_contract_operating_unit/models/hr_contract.py
+++ b/hr_contract_operating_unit/models/hr_contract.py
@@ -17,4 +17,5 @@ class HrContract(models.Model):
default=lambda self: self.env["res.users"].operating_unit_default_get(
self._uid
),
+ domain=lambda self: [("id", "in", self.env.user.operating_unit_ids)],
)
diff --git a/hr_contract_operating_unit/static/description/index.html b/hr_contract_operating_unit/static/description/index.html
index efc3ee9577..ac91ca250d 100644
--- a/hr_contract_operating_unit/static/description/index.html
+++ b/hr_contract_operating_unit/static/description/index.html
@@ -367,7 +367,7 @@ HR Contract Operating Unit
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
![Try me on Runbot](https://img.shields.io/badge/runbot-Try%20me-875A7B.png)
+
![Try me on Runbot](https://img.shields.io/badge/runbot-Try%20me-875A7B.png)
This module introduces the following features:
- Adds the Operating Unit (OU) to the Employee Contract.
@@ -390,7 +390,7 @@
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback.
+feedback.
Do not contact contributors directly about support or help with technical issues.
@@ -398,14 +398,14 @@
-- ForgeFlow S.L.
+- Forgeflow S.L.
- Serpent Consulting Services Pvt. Ltd.
@@ -417,7 +417,7 @@
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-
This module is part of the OCA/operating-unit project on GitHub.
+
This module is part of the OCA/operating-unit project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/hr_contract_operating_unit/views/hr_contract_view.xml b/hr_contract_operating_unit/views/hr_contract_view.xml
index 219e34d171..20f1838003 100644
--- a/hr_contract_operating_unit/views/hr_contract_view.xml
+++ b/hr_contract_operating_unit/views/hr_contract_view.xml
@@ -27,7 +27,6 @@