Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
1282 Vizualizări

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 . 


Imagine profil
Abandonează
Autor

Anyone?

Cel mai bun răspuns

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>


Imagine profil
Abandonează
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 ?

Related Posts Răspunsuri Vizualizări Activitate
0
mai 24
1287
1
ian. 24
1649
1
iul. 17
13727
3
sept. 24
2128
1
feb. 24
2359