如何通过代码创建odoo 12网站子菜单?

时间:2019-01-30 14:31:42

标签: python-3.x odoo odoo-website odoo-12

我想在About Us主菜单下创建子菜单。我正在尝试以下代码,但它正在添加主菜单。

<!-- Main Menu ABOUT US -->
    <record id="menu_about_us" model="website.menu">
        <field name="name">ABOUT US</field>
        <field name="page_id" ref="about-us" />
        <field name="parent_id" ref="website.main_menu" />
        <field name="sequence" type="int">10</field>
    </record>
    <!-- Sub Menu Under ABOUT US -->
    <record id="menu_board_and_founders" model="website.menu">
        <field name="name">BOARD AND FOUNDERS</field>
        <field name="page_id" ref="board-and-founders" />
        <field name="parent_id" ref="menu_about_us" />
        <field name="sequence" type="int">10</field>
    </record>

0 个答案:

没有答案