[UPD] hr_base

This commit is contained in:
Samir Ladoui 2025-07-23 15:52:33 +01:00
parent 9f203995db
commit 0492a80270
4 changed files with 35 additions and 0 deletions

View File

@ -48,6 +48,7 @@
"views/hr_penalty_register_view.xml",
"views/employee_iqama_document_view.xml",
"views/res_users_views.xml",
"views/hr_holidays_views.xml",
"views/menus_view.xml",
# "views/res_config_settings.xml",
'report/hr_layout.xml',

View File

@ -31,3 +31,4 @@ from . import assets_document
from . import hr_department
from . import res_partner
from . import res_users
from . import hr_holidays

View File

@ -0,0 +1,7 @@
from odoo import models, fields
class HrHolidays(models.Model):
_inherit = 'hr.holidays'
emp_no = fields.Char(related='employee_id.emp_no')

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_holiday_allocation_tree_hr_holidays_community" model="ir.ui.view">
<field name="name">hr.holidays.allocation.tree.inherit</field>
<field name="model">hr.holidays</field>
<field name="inherit_id" ref="hr_holidays_community.view_holiday_allocation_tree"/>
<field name="arch" type="xml">
<xpath expr="//tree/field[@name='employee_id']" position="before">
<field name="emp_no"/>
</xpath>
</field>
</record>
<record id="view_holiday_hr_holidays_community" model="ir.ui.view">
<field name="name">hr.holidays.tree.inherit</field>
<field name="model">hr.holidays</field>
<field name="inherit_id" ref="hr_holidays_community.view_holiday"/>
<field name="arch" type="xml">
<xpath expr="//tree/field[@name='employee_id']" position="before">
<field name="emp_no"/>
</xpath>
</field>
</record>
</odoo>