mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[ADD] new module pms hr property
This commit is contained in:
committed by
Darío Lodeiros
parent
1707b72f14
commit
715ddf44bb
1
pms_hr_property/__init__.py
Normal file
1
pms_hr_property/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import models
|
||||
21
pms_hr_property/__manifest__.py
Normal file
21
pms_hr_property/__manifest__.py
Normal file
@@ -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,
|
||||
}
|
||||
1
pms_hr_property/models/__init__.py
Normal file
1
pms_hr_property/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import hr_employee
|
||||
12
pms_hr_property/models/hr_employee.py
Normal file
12
pms_hr_property/models/hr_employee.py
Normal file
@@ -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")
|
||||
1
pms_hr_property/readme/CONTRIBUTORS.rst
Normal file
1
pms_hr_property/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1 @@
|
||||
* Jose Luis Algara <osotranquilo@gmail.com>
|
||||
7
pms_hr_property/readme/CREDITS.rst
Normal file
7
pms_hr_property/readme/CREDITS.rst
Normal file
@@ -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
|
||||
3
pms_hr_property/readme/DESCRIPTION.rst
Normal file
3
pms_hr_property/readme/DESCRIPTION.rst
Normal file
@@ -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.
|
||||
|
||||
BIN
pms_hr_property/static/description/icon.png
Normal file
BIN
pms_hr_property/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
47
pms_hr_property/views/hr_employee_view.xml
Normal file
47
pms_hr_property/views/hr_employee_view.xml
Normal file
@@ -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>
|
||||
Reference in New Issue
Block a user