Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4528 Lượt xem

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.
Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Hello Niyas.

Thanks

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 20
7160
1
thg 10 23
1638
0
thg 1 22
2383
2
thg 8 25
942
0
thg 6 24
1480