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

Please Help me with xml views

By
Cavid Aslanov
on 9/13/13, 10:33 AM 778 views

Hello.. I have database of suppliers and I want to create input form with general information about supplier and editable list of supplier products. I've tried to create form like this

<record id="view_partner_form" model="ir.ui.view">
        <field name="name">res.partner.form</field>
        <field name="model">res.partner</field>
        <field eval="1" name="priority"/>
        <field name="arch" type="xml">
            <form string="Partners" version="7.0">
            <sheet>
                <group>
                    <group>
                        <field name="company_name"/>
                        <field name="address"/>
                        <field name="website" widget="url"/>
                        ......
                                                    ......
                    </group>
                </group>
                <notebook>
                  <page string="Products">
                  <field name="products_line">  
                    <tree string="Products">
                        <field name="products"/>
                        <field name="price"/>
                    </tree>
                  </field>
                   </page>  
                </notebook>
               </sheet>
             </form>
        </field>
 </record>

But it gives error - Invalid XML for view Architecture or show nothing I think it's related to class description in python code, but I don't what exactly os this.

Are you trying to add some fields to res.partner?

GH Mediacloud, Grover Menacho
on 9/13/13, 10:49 AM

You should post traceback (error list) as well. Without it no one can help you.

Sudhir Arya (SA)
on 9/14/13, 6:14 PM

you have to give editable="bottom" inside that tree tag, and see whether there is any change

Abhishek H Menon
on 9/19/13, 8:57 AM
1

Try to look at the error log so that you will know what is invalid in your xml.. :D

More precisely, look at the server error log: it will display a traceback not shown on the webclient, telling the exact cause and the xml file plus line number where the problem is.

Daniel Reis
on 9/20/13, 6:01 AM
0
Abhishek H Menon
On 9/19/13, 8:58 AM
<record id="view_partner_form" model="ir.ui.view">
        <field name="name">res.partner.form</field>
        <field name="model">res.partner</field>
        <field eval="1" name="priority"/>
        <field name="arch" type="xml">
            <form string="Partners" version="7.0">
            <sheet>
                <group>
                    <group>
                        <field name="company_name"/>
                        <field name="address"/>
                        <field name="website" widget="url"/>
                        ......
                                                    ......
                    </group>
                </group>
                <notebook>
                  <page string="Products">
                  <field name="products_line">  
                    <tree string="Products" editable="bottom">
                        <field name="products"/>
                        <field name="price"/>
                    </tree>
                  </field>
                   </page>  
                </notebook>
               </sheet>
             </form>
        </field>
 </record>

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: 9/13/13, 10:33 AM
Seen: 778 times
Last updated: 3/16/15, 8:10 AM