تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
4407 أدوات العرض

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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مايو 20
7022
1
أكتوبر 23
1549
0
يناير 22
2287
1
مارس 25
758
0
يونيو 24
1242