Skip to Content
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
2146 Представления

I am trying to add another menuitem point to the event configuration menu, this is my current code:

xml version="1.0" encoding="utf-8"?>
<
odoo>

<record id="view_carpet_tree" model="ir.ui.view">
<field name="name">rectanglemaps.carpet.treefield>
<
field name="model">rectanglemaps.carpetfield>
<
field name="arch" type="xml">
<tree>
<field name="name"/>
<
field name="color"/>
tree>
field>
record>

<
record id="action_rectanglemaps_carpet" model="ir.actions.act_window">
<field name="name">Teppichkonfigurationfield>
<
field name="res_model">rectanglemaps.carpetfield>
<
field name="view_mode">tree,formfield>
<
field name="domain">[]field>
<
field name="context">{}field>
<
field name="help" type="html">
<p class="oe_view_nocontent_create">
Erstelle die ersten Teppichvorlagen,
p>
field>
record>

<
menuitem name="Teppichkonfiguration"
id="menu_rectanglemaps_carpet"
action="action_rectanglemaps_carpet"
sequence="22"
parent="event.menu_event_configuration"/>

odoo>

As you can see, i created the menuitem, i created the corresponding action and i have defined the tree view.

✅ I have added the file to the manifest.py

✅ I have added event to the dependencies in the manifest.py

✅ I have restarted and upgraded the module

✅ I have checked Technical > User-Interface > Menuitems but my menuitem doesnt appear

✅ I have chekced Technical > User-Interface > Views, the tree view that i defined does appear there

✅ I have checked Technical > User-Interface > Actions, my defined action doesnt appear there.

✅ I have checked the way odoo does it by analysing the event_booth and event_booth_sale module but i could not find any differences

What can i do to make the menuitem and action show up in the Menu?

Thank you for your help!


Аватар
Отменить
Лучший ответ

Hi,

Check you have given access right to the model 'rectanglemaps.carpet'.

If not, Create access right for your model inside ir.model.access.csv in the security folder

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_rectanglemaps_carpet,access_rectanglemaps_carpet,model_rectanglemaps_carpet,,1,1,1,1


Hope it helps,
Kiran K



Аватар
Отменить
Автор

Thank you, why didn't I think of that!

Related Posts Ответы Просмотры Активность
2
мар. 23
13251
2
апр. 16
9601
1
мая 24
1703
0
янв. 23
1397
1
сент. 22
3173