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

See My code    

<record id="external_link" model="ir.actions.act_url">

        <field name="name">Other App</field>

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

        <field name="target">self</field>

        <field name="url">http://myIP/login/{uid}</field>

    </record>


<menuitem action = "external_link" id="my_menu_root"

            name="Application"

            web_icon="my_module,static/description/icon.png"

            active="True"

            sequence="9" groups="my_module.group_manager,my_module.group_user"/>

Need Help.
Thank for your response.
อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Hello Niyas.

Thanks

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

Hi,

You can directly call a python function from the menu item and from there you can try to return this. In the python you can get the current user from self.env.user.id .

To call python function from menu item, you can use server action.

See this: How To Call Python Function From Menu Item in Odoo

Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 20
7119
1
ต.ค. 23
1608
0
ม.ค. 22
2351
1
มี.ค. 25
827
0
มิ.ย. 24
1406