尝试在sale menu openerp 7中创建子菜单时出错
我试图在自定义模块的销售菜单中创建一个子菜单,就在product link之后,但它没有出现 在我的模块中,安装后,我会在“已创建菜单”中看到我的菜单名 在我看来,我只是尝试使用以下代码:尝试在sale menu openerp 7中创建子菜单时出错,openerp,openerp-7,Openerp,Openerp 7,我试图在自定义模块的销售菜单中创建一个子菜单,就在product link之后,但它没有出现 在我的模块中,安装后,我会在“已创建菜单”中看到我的菜单名 在我看来,我只是尝试使用以下代码: <?xml version="1.0" encoding="utf-8"?> <openerp> <data> <menuitem name="Gamme" id="menu_gamme" parent="base.me
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem name="Gamme" id="menu_gamme" parent="base.menu_product"/>
</data>
</openerp>
尝试对代码进行这些更改。 您需要在菜单标记中具有action值,该值采用ir.actiona.act\U windows记录的id。它将自动从记录中提到的字段名中获取名称“Gamme”,您不需要指定它
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.actions.act_window" id="action_gamme">
<field name="name">Gamme</field>
<field name="model">gamme</field>
<field name="view_type">tree</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="action_gamme" id="menu_gamme" parent="base.menu_product"/>
</data>
</openerp>
Gamme
gamme
树
树
希望这有帮助……这是您的全部代码吗?是的,只是为了测试子菜单
ValueError: No such external ID currently defined in the system: ailailail.action_gamme
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.actions.act_window" id="action_gamme">
<field name="name">Gamme</field>
<field name="model">gamme</field>
<field name="view_type">tree</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="action_gamme" id="menu_gamme" parent="base.menu_product"/>
</data>
</openerp>