Skip to content

Commit c48e150

Browse files
traitrantrobzBhaveshHeliconia
authored andcommitted
[MIG] hr_operating_unit: Migration to 17.0
1 parent 0d735eb commit c48e150

9 files changed

Lines changed: 24 additions & 30 deletions

File tree

hr_operating_unit/README.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ HR Operating Unit
77
!! This file is generated by oca-gen-addon-readme !!
88
!! changes will be overwritten. !!
99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:2dde51227512cf1ef54a97379c669d43961eec3244f7901ec09f1c28c5f58447
10+
!! source digest: sha256:7a28b5b0010fef71cb3aeeef054968566d9ee77d20bee632840b88b7029e328e
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
1313
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -67,6 +67,7 @@ Contributors
6767

6868
- Gonzalo González Domínguez <meigallo@meigallodixital.com>
6969
- Murtaza Mithaiwala <mmithaiwala@opensourceintegrators.com>
70+
- Tran Thanh Trai <traitt@trobz.com>
7071

7172
Maintainers
7273
-----------

hr_operating_unit/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{
44
"name": "HR Operating Unit",
5-
"version": "16.0.1.0.0",
5+
"version": "17.0.1.0.0",
66
"author": "Gonzalo González Domínguez, Odoo Community Association (OCA)",
77
"license": "AGPL-3",
88
"website": "https://github.com/OCA/operating-unit",

hr_operating_unit/i18n/fr.po

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,11 @@ msgstr "Employer"
3030
msgid "Default Operating Unit"
3131
msgstr "Unité opérationnelle par défaut"
3232

33-
#. module: hr_operating_unit
34-
#: model:ir.model.fields,field_description:hr_operating_unit.field_hr_employee_base__display_name
35-
#: model:ir.model.fields,field_description:hr_operating_unit.field_operating_unit__display_name
36-
msgid "Display Name"
37-
msgstr "Nom affiché"
38-
3933
#. module: hr_operating_unit
4034
#: model:ir.model.fields,field_description:hr_operating_unit.field_operating_unit__employee_ids
4135
msgid "Employees Allowed"
4236
msgstr "Employés autorisés"
4337

44-
#. module: hr_operating_unit
45-
#: model:ir.model.fields,field_description:hr_operating_unit.field_hr_employee_base__id
46-
#: model:ir.model.fields,field_description:hr_operating_unit.field_operating_unit__id
47-
msgid "ID"
48-
msgstr "ID"
49-
50-
#. module: hr_operating_unit
51-
#: model:ir.model.fields,field_description:hr_operating_unit.field_hr_employee_base____last_update
52-
#: model:ir.model.fields,field_description:hr_operating_unit.field_operating_unit____last_update
53-
msgid "Last Modified on"
54-
msgstr "Dernière modification le"
55-
5638
#. module: hr_operating_unit
5739
#: model:ir.model,name:hr_operating_unit.model_operating_unit
5840
msgid "Operating Unit"
@@ -64,3 +46,12 @@ msgstr "Unité opérationnelle"
6446
#: model:ir.model.fields,field_description:hr_operating_unit.field_hr_employee_public__operating_unit_ids
6547
msgid "Operating Units"
6648
msgstr "Unités opérationnelles"
49+
50+
#~ msgid "Display Name"
51+
#~ msgstr "Nom affiché"
52+
53+
#~ msgid "ID"
54+
#~ msgstr "ID"
55+
56+
#~ msgid "Last Modified on"
57+
#~ msgstr "Dernière modification le"

hr_operating_unit/i18n/hr_operating_unit.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
msgid ""
66
msgstr ""
7-
"Project-Id-Version: Odoo Server 16.0\n"
7+
"Project-Id-Version: Odoo Server 17.0\n"
88
"Report-Msgid-Bugs-To: \n"
99
"Last-Translator: \n"
1010
"Language-Team: \n"

hr_operating_unit/models/hr_employee_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ class HrEmployeeBase(models.AbstractModel):
1212
column1="employee_id",
1313
column2="operating_unit_id",
1414
string="Operating Units",
15-
default=lambda self: (self.env["res.users"].operating_unit_default_get()),
15+
default=lambda self: (self.env["res.users"]._get_default_operating_unit()),
1616
)
1717

1818
default_operating_unit_id = fields.Many2one(
1919
comodel_name="operating.unit",
2020
string="Default Operating Unit",
21-
default=lambda self: (self.env["res.users"].operating_unit_default_get()),
21+
default=lambda self: (self.env["res.users"]._get_default_operating_unit()),
2222
)

hr_operating_unit/models/hr_operating_unit.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ class OperatingUnit(models.Model):
77
_inherit = "operating.unit"
88

99
employee_ids = fields.Many2many(
10-
"hr.employee",
11-
"operating_unit_employees_rel",
12-
"operating_unit_id",
13-
"employee_id",
14-
"Employees Allowed",
10+
comodel_name="hr.employee",
11+
relation="operating_unit_employees_rel",
12+
column1="operating_unit_id",
13+
column2="employee_id",
14+
string="Employees Allowed",
1515
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
- Gonzalo González Domínguez \<<meigallo@meigallodixital.com>\>
22
- Murtaza Mithaiwala \<<mmithaiwala@opensourceintegrators.com>\>
3+
- Tran Thanh Trai \<<traitt@trobz.com>\>

hr_operating_unit/security/security.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<field name="model_id" ref="hr.model_hr_employee" />
66
<field
77
name="domain_force"
8-
>['|',('default_operating_unit_id','=',False),('default_operating_unit_id','in', user.operating_unit_ids.ids)]</field>
8+
>['|',('default_operating_unit_id','=',False),('default_operating_unit_id','in', operating_unit_ids)]</field>
99
<field name="name">Allowed Operating Units for Employee</field>
1010
<field eval="0" name="perm_unlink" />
1111
<field eval="0" name="perm_write" />

hr_operating_unit/static/description/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ <h1 class="title">HR Operating Unit</h1>
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370-
!! source digest: sha256:2dde51227512cf1ef54a97379c669d43961eec3244f7901ec09f1c28c5f58447
370+
!! source digest: sha256:7a28b5b0010fef71cb3aeeef054968566d9ee77d20bee632840b88b7029e328e
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372372
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/operating-unit/tree/17.0/hr_operating_unit"><img alt="OCA/operating-unit" src="https://img.shields.io/badge/github-OCA%2Foperating--unit-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/operating-unit-17-0/operating-unit-17-0-hr_operating_unit"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/operating-unit&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<p>This module introduces the following features:</p>
@@ -414,6 +414,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
414414
<ul class="simple">
415415
<li>Gonzalo González Domínguez &lt;<a class="reference external" href="mailto:meigallo&#64;meigallodixital.com">meigallo&#64;meigallodixital.com</a>&gt;</li>
416416
<li>Murtaza Mithaiwala &lt;<a class="reference external" href="mailto:mmithaiwala&#64;opensourceintegrators.com">mmithaiwala&#64;opensourceintegrators.com</a>&gt;</li>
417+
<li>Tran Thanh Trai &lt;<a class="reference external" href="mailto:traitt&#64;trobz.com">traitt&#64;trobz.com</a>&gt;</li>
417418
</ul>
418419
</div>
419420
<div class="section" id="maintainers">

0 commit comments

Comments
 (0)