Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

xml view validate error ?

By
Benoit COVILLE
on 6/10/13, 7:28 AM 2,125 views

Hi, Wrote a new module, get a validate error (arch: Invalid XML for View Architecture) whith new xml view: <openerp> <data> <record model="ir.ui.view" id="ingram_categ_search"> <field name="name">ingram.categ.search</field> <field name="model">ingram.productcategory</field> <field name="type">search</field> <field name="arch" type="xml"> <search string="Recherche mapping Ingram Micro" version="7.0"> <field name="ingramcateg" string="Categorie Ingram"/> <field name="openerpcateg" string="Categorie OpenERP"/> <field name="nomcateg" string="Description"/> </search> </field> </record>

<!-- Vue recherche mapping produit -->
    <record model="ir.ui.view" id="ingram_product_search">
        <field name="name">ingram.product.search</field>
        <field name="model">ingram.product</field>
        <field name="type">search</field>
        <field name="arch" type="xml">
            <search string="Recherche mapping Ingram Micro" version="7.0">
                <field name="categorie" string="Categorie Ingram"/>
                <field name="marque" string="Marque"/>
                <field name="ean13" string="Code EAN"/>
                <field name="ref_ingram" string="Ref Ingram"/>
                <field name="ref_marque" string="Ref Marque"/>
                <field name="description1" string="Description"/>
            </search>
        </field>
    </record>

    <!-- Vue arbre mapping produit -->
    <record model="ir.ui.view" id="ingram_product_tree">
        <field name="name">ingram.product.tree</field>
        <field name="model">ingram.product</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Mapping produits Ingram" version="7.0">
                <field name="categorie" string="Categorie Ingram"/>
                <field name="marque" string="Marque"/>
                <field name="ean13" string="Code EAN"/>
                <field name="ref_ingram" string="Ref Ingram"/>
                <field name="ref_marque" string="Ref Marque"/>
                <field name="description1" string="Description"/>
            </tree>
        </field>
    </record>

<!-- Vue formulaire mapping produit -->
    <record model="ir.ui.view" id="ingram_product_form">
        <field name='name'>ingram.product.form</field>
        <field name="model">ingram.product</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Mapping produits Ingram" version="7.0">
                <field name="categorie" string="Categorie Ingram"/>
                <field name="marque" string="Marque"/>
                <field name="ean13" string="Code EAN"/>
                <field name="ref_ingram" string="Ref Ingram"/>
                <field name="ref_marque" string="Ref Marque"/>
                <field name="description1" string="Description 1"/>
                <field name="description2" string="Description 2"/>
                <field name="image_medium" widget="image" class="oe_avatar oe_left"/>                   
            </form>
        </field>
    </record>

    <!-- Vue arbre mapping categorie -->
    <record model="ir.ui.view" id="ingram_categ_tree">
        <field name="name">ingram.categ.tree</field>
        <field name="model">ingram.productcategory</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Mapping categories Ingram" version="7.0">
                <field name="ingramcateg" string="Categorie Ingram"/>
                <field name="openerpcateg" string="Categorie OpenERP"/>
                <field name="nomcateg" string="Description"/>
            </tree>
        </field>
    </record>

<!-- Vue formulaire mapping categorie -->
    <record model="ir.ui.view" id="ingram_categ_form">
        <field name="name">ingram.categ.form</field>
        <field name="model">ingram.productcategory</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Mapping categories Ingram" version="7.0">
                <field name="ingramcateg" string="Categorie Ingram"/>
                <field name="openerpcateg" string="Categorie OpenERP"/>
                <field name="nomcateg" string="Description"/>
            </form>
        </field>
    </record>

<!-- Action categories -->
    <record model="ir.actions.act_window" id="ingram_categ_action">
        <field name="name">mapping categorie Ingram</field>
        <field name="res_model">ingram.productcategory</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
    </record>
    <record model="ir.actions.act_window" id="ingram_product_action">
        <field name="name">mapping produit Ingram</field>
        <field name="res_model">ingram.product</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
    </record>

<!-- Menu categorie -->
    <menuitem id="ingram_parent" name="INGRAM" icon="terp-partner"/>
    <menuitem id="menu_ingram_parent" name="Mapping categories Ingram" parent="ingram_parent"/>
    <menuitem id="menu_ingram_parent2" name="Mapping produits Ingram" parent="ingram_parent"/>
    <menuitem action="ingram_categ_action" id="menu_ingram_category" parent="menu_ingram_parent" string="Categories"/>
    <menuitem action="ingram_product_action" id="menu_ingram_product" parent="menu_ingram_parent2" string="Produits"/>
</data>

</openerp>

Can't understand where is my error ??? Can you help please. Regards.

<field name="type"> This type of line is not essential in V7.0.

charlesraj
on 6/10/13, 9:19 AM

Can you post error traceback?

Sudhir Arya (SA)
on 6/10/13, 10:09 AM
4

Sandeep

--Sandeep--
6083
| 6 5 8
Delhi, India
--Sandeep--
Python OpenERP Developer http://in.linkedin.com/pub/sandeep-rana/3b/a16/786/
Sandeep
On 6/10/13, 9:46 AM

Hi

Try to remove version="7.0" from tree and search view

Thanks
Sandeep

Sorry Guys, Just found it : made a mistake in one of my custom fields name. Thanks.

Benoit COVILLE
on 6/10/13, 1:21 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 6/10/13, 7:28 AM
Seen: 2125 times
Last updated: 3/16/15, 8:10 AM