Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
761 Zobrazení

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
Zrušit
Autor

Anyone?

Nejlepší odpověď

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
Zrušit
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 Odpovědi Zobrazení Aktivita
0
kvě 24
1240
1
led 24
1612
1
čvc 17
13689
3
zář 24
2078
1
úno 24
2321