Odoo Help

0

xml view validate error ?

By
Benoit COVILLE
on 6/10/13, 7:28 AM 3,542 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 (ERP Harbor Consulting Services)
on 6/10/13, 10:09 AM
4

ClueLogics Technologies Pvt. Ltd.

--ClueLogics Technologies Pvt. Ltd.--
6143
| 6 5 8
Delhi NCR, India
--ClueLogics Technologies Pvt. Ltd.--

 ClueLogics Technologies Pvt Ltd is a Software product and services provider. We are positioned to deliver robust, rapid and reliable Information Technology solutions that work. What we succeed upon is Technology and Technical Expertise. The industry review of ClueLogics has been commendable for the past years as most of its business comes from repeat orders by highly satisfied clients.

ClueLogics Technologies Pvt. Ltd.
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

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

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