Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
757 Vistas

Hello, 
im working in odoo 17, community edition.


my created users that are simple users in employees


but they are considered as public users, and they see the hr.employee.public.form .

with its own fields


Other users , like Officers and administrators see the hr.employee.form , 

with its own fields too



How can i change that , so that simple users can see the 
hr.employee.form.

or add in xml view a related entry to retrieve data from  hr.employee , without creating the fields again ( and relate them ) ?

also im not familiar with python code so i should avoid that and use the settings from Odoo GUI, 



Thank you in advance . 


Avatar
Descartar
Autor

Anyone?

Mejor respuesta

To let simple users see the full hr.employee.form (not the public one) without coding:

  1. Go to Settings > Users & Companies > Users
  2. Edit the user and assign them to the Employee group (base.group_user) instead of just Portal/Public.
  3. This grants access to internal employee views including hr.employee.form.

and solution with code :
A simple way is to inherit the employee form view and make sure it applies to all users, or remove the public view access rule.

Example to force your form for all users (in XML):
<odoo>

  <record id="view_employee_form_inherit" model="ir.ui.view">

    <field name="name">hr.employee.form.override</field>

    <field name="model">hr.employee</field>

    <field name="inherit_id" ref="hr.view_employee_form"/>

    <field name="priority" eval="20"/> 

    <field name="arch" type="xml">

      <!-- your modifications here -->

    </field>

  </record>

</odoo>


Avatar
Descartar
Autor

all my users are selected as Internal Users , but they see the public form ,

about your code , do i paste it in hr.employee.public or in hr.employee form ?

Autor

Sorry my mistake . i saw that " To let simple users see the full hr.employee.form (not the public one) without coding:"

Autor

or is there any simple way to remove public access ?

Publicaciones relacionadas Respuestas Vistas Actividad
0
may 24
1238
1
ene 24
1607
1
jul 17
13685
3
sept 24
2076
1
feb 24
2317