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

I'm having this weird error and really don't know why it's happening 

But when I make some changes in the module in Pycharm and then update the module in Odoo, the menuitem that I created in the module duplicates. In other words, everytime I update the module the same menuitem appears next to the previous one, doing the same thing as all the other ones


This is the code for the menuitem with the action:


<record id="action_bugs" model="ir.actions.act_window">
<field name="name">Bugs</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">task.bugs</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="bugs_tree_view"/>
</record>

<menuitem
action="action_bugs"
id="action_bugs"
parent="project.menu_main_pm"
name="All Bugs"
sequence="3"/>
الصورة الرمزية
إهمال
أفضل إجابة

Both the <record> and the <menuitem> have the same id. Change the id of the menuitem to something like so and that should fix it.

id="menu_action_bugs"
الصورة الرمزية
إهمال
الكاتب

Thanks, that solved it. I'm kinda new in Odoo so I though it would not matter if I used the same id in both of those. I'm going to keep an eye on that onwards

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أبريل 25
3484
0
مارس 24
1297
0
أكتوبر 22
2493
0
سبتمبر 22
1676
1
يوليو 22
5327