Odoo Help


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.


one2many field in form view

on 3/19/13, 12:21 PM 753 views


I try to create a new module as belown :

class test(osv.osv):

    _name = 'test'
    _columns = {
      'reference': fields.char('Reference', size=50),
      'test_lines': fields.one2many('test', 'test_name', 'test Lines'),
      'test_name': fields.many2one('test', 'Parent test', ondelete='cascade', select=True),
  'nom_produit': fields.char('Produit', size=40),
  'date_debut': fields.date('Etude commencee le :'),
  'date_fin': fields.date('Etude terminee le :'),
  'test': fields.char('Test', size=40),
  'controle': fields.char('Controle', size=40),
  'commentaire': fields.char('Commentaire',size=40),    


and the xml file :

        <record id="test_form_view" model="ir.ui.view">
            <field name="name">test.form</field>
            <field name="model">test</field>
            <field name="type">form</field>
            <field eval="7" name="priority"/>
            <field name="arch" type="xml">
            <form string="ETUDE DE STABILITE">
                <group colspan="4" col="6">
                    <field name="reference"/>
                    <field name="nom_produit"/>
                    <field name="date_debut"/>
                    <field name="date_fin"/>
                <notebook colspan="4" >
                    <page string="Test">
                        <field colspan="4" name="test_lines" nolabel="1" widget="one2many_list">
                            <tree string="Tests" editable="bottom">
                                <field name="test"/>
                                <field name="controle"/>
                                <field name="commentaire"/>
                            <form string="Test">
                                <group colspan="4" col="6">
                                    <field name="test"/>
                                    <field name="controle"/>
                                    <field name="commentaire"/>

but when i§I try to install the module I have this erreur :

Error occurred while validating the field(s) arch: Invalid XML for View Architecture!

Help me cause i didn't figure out where is the probleme!!

Can you please all relevant lines of the server logs? Normally the server logs show exactly where the error happens.

Andreas Brueckl
on 3/19/13, 12:47 PM

Have you define the "test, controle, commentaire" fields in your class ?

on 3/19/13, 12:48 PM

yes I define this fields in my class.

on 3/19/13, 12:58 PM

I can't find a solution can u help me plz

on 3/20/13, 7:45 AM

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)


Asked: 3/19/13, 12:21 PM
Seen: 753 times
Last updated: 3/27/15, 6:36 PM