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 with my xml difficulty inherit sale.order

By
Mr Rhys Park
on 3/23/13, 8:10 AM 1,647 views

Hi am writing a module that will inherit from sale.order basically is a sales / quotation system for our service department. I keep getting an error in my xml and can't see where i'm going wrong any help would be great. I have read the documentation and

<record model="ir.ui.view" id="repair_form_view">
    <field name="name">repair.form</field>
    <field name="model">repair.repair</field>
    <field name="inherit_id" ref="sale.view_order_form"/>
    <field name="arch" type="xml">
        <form string="Repair Order" version="7.0">
            <header>
                <button name="repair_confirm" states="draft" string="Confirm Repair" class="oe_highlight"/>
                <button name="send_quotation" states="draft" string="Issue Quotation" class="oe_highlight"/>
                <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done"/>
            </header>
            <sheet string="Repair Order">
            <h1>
                Repair Order <field name="repair_ref" class="oe_inline"/>           
            </h1>
            <group>
                <group>
                    <field name="partner_id"/>  
                    <field name="state"/>           
                </group>
                <group>
                    <field name="receivedDate"/>
                    <field name="make"/>
                    <field name="model"/>
                    <field name="serialNo"/>            
                </group>
            </group>
            <notebook>
                <xpath expr="//field[@name='order_line']/tree" position="attributes">
                <attribute name="editable"/>
            </xpath>

            </notebook>



        </sheet>
            <div class="oe_chatter">
                <field name="message_follower_ids" widget="mail_followers"/>
                <field name="message_ids" widget="mail_thread"/>
            </div>
        </form>
    </field>
</record>

I cant even seem to get this to work....

<record model="ir.ui.view" id="repair_form_view">
    <field name="name">repair.form</field>
    <field name="model">repair.repair</field>
    <field name="inherit_id" ref="sale.view_order_form" />
    <field name="arch" type="xml">
    <data>
    <field name="client_order_ref" position="after">
    <field name="make" />
    <field name="model" />
    </field>
    </data>
    </field>
</record>

Oh the error is a xml validator error except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')

Mr Rhys Park
on 3/23/13, 10:12 AM
0
Mr Rhys Park
On 3/23/13, 10:20 AM

Fixed

<record model="ir.ui.view" id="repair_form_view">
<field name="name">repair.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<data>
<field name="client_order_ref" position="after">
<field name="make" />
<field name="model" />
</field>
</data>
</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

1 follower(s)

Stats

Asked: 3/23/13, 8:10 AM
Seen: 1647 times
Last updated: 3/22/16, 6:26 PM