Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2547 มุมมอง

i inherit hr.employee module in my custom module. i want when user login it only show his profile page not other. how can i in odoo python ?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi

You can easily achieve this by adding a domain into the action, just follow the code given below,

<?xml version="1.0" encoding="UTF-8" ?>

<!--TO VIEW THE RECORD OF LOGGED USER-->

<odoo>

<data>

<record id="my_logs_action" model="ir.actions.act_window">

<field name="name">My Model</field>

<field name="type">ir.actions.act_window</field>

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

<field name="view_mode">kanban,tree,form</field>

<field name="domain">[('user_id','=',uid)]</field>

</record>

</data>

</odoo>

Hope it helps

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ก.พ. 25
3579
0
พ.ค. 24
46
1
เม.ย. 24
3368
4
ก.ย. 23
4863
2
ก.ย. 23
7094