-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1707b72
commit 715ddf4
Showing
9 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright 2023 OsoTranquilo | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
'name': 'PMS Hr Property', | ||
'summary': """ | ||
Adds to the employee the property on which he works.""", | ||
'version': '14.0.1.0.0', | ||
'license': 'AGPL-3', | ||
'author': 'OsoTranquilo,Odoo Community Association (OCA)', | ||
'website': 'https://github.com/OCA/pms', | ||
"category": "PMS/HR", | ||
'depends': [ | ||
"hr", | ||
"pms", | ||
], | ||
'data': [ | ||
'views/hr_employee_view.xml', | ||
], | ||
"installable": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import hr_employee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright 2023 OsoTranquilo | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
|
||
from odoo import _, api, fields, models | ||
|
||
|
||
class HrEmployeeBase(models.AbstractModel): | ||
|
||
_inherit = "hr.employee.base" | ||
|
||
property_ids = fields.Many2many("pms.property", string="Workplaces asigned") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* Jose Luis Algara <osotranquilo@gmail.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ This file is optional and contains additional credits, other than | ||
authors, contributors, and maintainers. ] | ||
|
||
The development of this module has been financially supported by: | ||
|
||
- Alda Hotels | ||
- Consultores Hoteleros Integrales |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This module extends the functionality of hr to support multiproperty in PMS. | ||
Allow you to select workplaces/properties for the employee. | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<record id="hr_property_employee_view_form" model="ir.ui.view"> | ||
<field name="name">hr.property.employee.form</field> | ||
<field name="model">hr.employee</field> | ||
<field name="inherit_id" ref="hr.view_employee_form" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='coach_id']" position="after"> | ||
<field name="property_ids" widget="many2many_tags" options="{'no_create': True}" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
<record model="ir.ui.view" id="hr_property_employee_view_tree"> | ||
<field name="name">hr.property.employee.tree</field> | ||
<field name="model">hr.employee</field> | ||
<field name="inherit_id" ref="hr.view_employee_tree" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='job_id']" position="after"> | ||
<field name="property_ids" widget="many2many_tags" options="{'no_create': True}" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
<record model="ir.ui.view" id="hr_property_employee_view_kanban"> | ||
<field name="name">hr.property.employee.kanban</field> | ||
<field name="model">hr.employee</field> | ||
<field name="inherit_id" ref="hr.hr_kanban_view_employees" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='work_phone']" position="after"> | ||
<div role="separator" class="dropdown-divider" /> | ||
<field name="property_ids" widget="many2many_tags" options="{'no_create': True}" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
<record model="ir.ui.view" id="hr_property_employee_filter"> | ||
<field name="name">hr.property.employee.filter</field> | ||
<field name="model">hr.employee</field> | ||
<field name="inherit_id" ref="hr.view_employee_filter" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='company_id']" position="after"> | ||
<field name="property_ids" string="Workplace" enable_counters="1" select="multi" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |