Skip to content

Commit

Permalink
TA#66297 [FIX] hr_employee_type : ttype accessibility (#62)
Browse files Browse the repository at this point in the history
* TA#66297 [FIX] hr_employee_type : ttype access right

---------

Co-authored-by: majouda <majdaelmariouli@gmail.com>
  • Loading branch information
lanto-razafindrabe and majouda authored Jun 7, 2024
1 parent 007e73c commit 9a86b86
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hr_employee_type/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "HR Employee Type",
"version": "14.0.1.0.0",
"version": "14.0.1.0.1",
"author": "Numigi",
"maintainer": "Numigi",
"website": "https://www.numigi.com",
Expand Down
1 change: 1 addition & 0 deletions hr_employee_type/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ class HrEmployeeType(models.Model):
[("internal", "Internal"), ("external", "External")],
"Type",
default="internal",
groups="hr.group_hr_user",
)
4 changes: 4 additions & 0 deletions hr_employee_type/views/hr_employee.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<field name="name">HR Employee Form: add Type</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="groups_id" eval="[(4, ref('hr.group_hr_user'))]"/>
<field name="arch" type="xml">
<field name="category_ids" position="after">
<group>
Expand All @@ -19,6 +20,7 @@
<field name="name">HR Employee Search: add Type</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_filter"/>
<field name="groups_id" eval="[(4, ref('hr.group_hr_user'))]"/>
<field name="arch" type="xml">
<field name="job_id" position="after">
<field name="ttype"/>
Expand All @@ -35,6 +37,7 @@
<field name="name">Internal Employees</field>
<field name="res_model">hr.employee</field>
<field name="view_mode">kanban,tree,form,activity</field>
<field name="groups_id" eval="[(4, ref('hr.group_hr_user'))]"/>
<field name="context">{
"default_ttype": "internal",
"search_default_ttype": "internal"
Expand All @@ -46,6 +49,7 @@
<field name="name">External Employees</field>
<field name="res_model">hr.employee</field>
<field name="view_mode">kanban,tree,form,activity</field>
<field name="groups_id" eval="[(4, ref('hr.group_hr_user'))]"/>
<field name="context">{
"default_ttype": "external",
"search_default_ttype": "external"
Expand Down
2 changes: 1 addition & 1 deletion hr_employee_type_private_wizard/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "HR Employee Type Private Wizard",
"version": "14.0.1.0.0",
"version": "14.0.1.0.1",
"author": "Numigi",
"maintainer": "Numigi",
"website": "https://www.numigi.com",
Expand Down
3 changes: 3 additions & 0 deletions hr_employee_type_private_wizard/views/hr_employee.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<field name="name">HR Employee Form: add button to open private data</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr_employee_type.hr_employee_add_type_form"/>
<field name="groups_id" eval="[(4, ref('hr.group_hr_user'))]"/>
<field name="arch" type="xml">
<group name="hr_type" position="inside">
<div colspan="2">
Expand All @@ -31,6 +32,7 @@
<field name="name">HR Employee Form: propagate employee type to home address</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="groups_id" eval="[(4, ref('hr.group_hr_user'))]"/>
<field name="arch" type="xml">
<field name="address_home_id" position="attributes">
<attribute name="context" operation="python_dict" key="default_employee_type">ttype</attribute>
Expand All @@ -42,6 +44,7 @@
<field name="name">HR Employee Form: make employee type readonly</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr_employee_type.hr_employee_add_type_form"/>
<field name="groups_id" eval="[(4, ref('hr.group_hr_user'))]"/>
<field name="arch" type="xml">
<field name="ttype" position="attributes">
<attribute name="readonly">1</attribute>
Expand Down

0 comments on commit 9a86b86

Please sign in to comment.