Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
4424 Weergaven

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.

Avatar
Annuleer

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

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

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

Beste antwoord

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

Avatar
Annuleer

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.

Beste antwoord
<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>
Avatar
Annuleer