Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
2254 Näkymät

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!


Avatar
Hylkää
Paras vastaus

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



Avatar
Hylkää
Tekijä

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

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
maalisk. 23
13399
2
huhtik. 16
9672
1
toukok. 24
1818
0
tammik. 23
1454
1
syysk. 22
3256