[ADD] new module pms hr property

This commit is contained in:
Jose Luis Algara Toledo
2023-11-03 11:11:58 +01:00
committed by Darío Lodeiros
parent 1707b72f14
commit 715ddf44bb
9 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1 @@
from . import models

View 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,
}

View File

@@ -0,0 +1 @@
from . import hr_employee

View 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")

View File

@@ -0,0 +1 @@
* Jose Luis Algara <osotranquilo@gmail.com>

View 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

View 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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View 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>