Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
28205 Tampilan

Hi, I don't know what happened because I created and installed a new module, but the menu item is hidden or not set like others menu. My xml view is configured like this:

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

<record id="e_retenciones_action" model="ir.actions.act_window">
<field name="name">Retenciones</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">e.retenciones</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
There is no examples click here to add new ModelTitle.
</p>
</field>
</record>

<menuitem
id="e_retenciones_menu"
name="Retenciones ODOO"
action="e_retenciones_action"
parent=""
sequence="0" />

<record id="e_retenciones_view_form" model="ir.ui.view">
<field name="name">Retenciones ODOO</field>
<field name="model">e.retenciones</field>
<field name="arch" type="xml">
<form>
<group>
<field name="razonSocial" />
</group>
</form>
</field>
</record>

<record id="e_retenciones_view_tree" model="ir.ui.view">
<field name="name">Retenciones ODOO List</field>
<field name="model">e.retenciones</field>
<field name="arch" type="xml">
<tree>
<field name="razonSocial"/>
</tree>
</field>
</record>
</data>
</odoo>

And my model have this:
from odoo import fields, models, api
class eRetenciones (models.Model):
_name = 'e.retenciones'
_description = 'Retenciones ODOO'
razonSocial = fields.Char(string="Razón Social")

Please somebody can help me with that. Thanks a lot.
Avatar
Buang
Jawaban Terbai

Hi,

First of all make sure that the module has got successfully installed, also you can ensure that the corresponding files are called in init file and in the manifest file. Once the module is installed and if the menu is not visible, just activate the developer mode and navigate to Settings -> Technical -> User Interface -> Menu Items, and check whether you can find your newly added menu there.

Also ensure that you are logged in as admin user just to ensure that it is not access rights issue. As you added in the tag as V11, if you are using the higher version, as Ravi specified, you can switch to superuser mode and check.

For other users except admin to view the menu, you have to give access right, for that see: Set Access Rights

Thanks

Avatar
Buang
Jawaban Terbai

Hi,

Try to create a access right file for your module in folder security in file ir.model.access.csv

Eg:

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_e_retenciones_manager_id,access_e_retenciones_manager,model_e_retenciones,base.group_erp_manager,1,1,1,1
access_e_retenciones_user_id,access_e_retenciones_user,model_e_retenciones,base.group_user,1,1,1,1

Give Groups to your menuitem if needed

<menuitem id="e_retenciones_menu" name="Retenciones ODOO" action="e_retenciones_action" parent=""
groups="base.group_user" sequence="0"/>

You can change your access right groups according to your need

Hope it helps

Avatar
Buang
Jawaban Terbai

become a superuser add if you can see the menu then the issue is access rights.
you have to add access rights in .csv for newly created model

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
3
Apr 25
10735
0
Des 24
1017
2
Sep 22
668
2
Okt 20
3936
4
Okt 19
33563