문제

I'm try to create a sub menu in sale menu in my custom module, just after product link, but it doesn't appear..

In my module, after install it, I see the name of my menu in "Created menu".

I try just with this code in my view:

<?xml version="1.0" encoding="utf-8"?>
    <openerp>
        <data>
            <menuitem name="Gamme" id="menu_gamme" parent="base.menu_product"/>
        </data>
    </openerp>

or with this code :

    <?xml version="1.0" encoding="utf-8"?>
    <openerp>
        <data>
            <menuitem name="Gamme" id="menu_gamme" parent="base.menu_product"/>

            <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>
        </data>
    </openerp>

but with latest I have this error :

    ValueError: No such external ID currently defined in the system: ailailail.action_gamme
도움이 되었습니까?

해결책

Try these changes to your code . You need have action value in your menu tag that takes the id of your ir.actiona.act_windows record. It will automatically take the name "Gamme" from the field name mentioned in the record, you dont need to specify it

 <?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>  

Hope this helps....

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top