Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
28232 Представления

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.
Аватар
Отменить
Лучший ответ

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

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

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

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

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
3
апр. 25
10755
0
дек. 24
1018
2
сент. 22
668
2
окт. 20
3949
4
окт. 19
33580