Community mailing list archives

community@mail.odoo.com

inherit and manipulating views

by
Tinderbox AS, André Grant
- 03/27/2015 08:41:09
Hi,

In Odoo 8 I have created a new model that inherit from sale.order
I wish to use the form view for Sale Order on my new model, but change the content a bit without changing the original sale order form.

First off my new model shows the basic sale order form, but not with any of the originally inherited views.

My action:
<record id="action_super_orders" model="ir.actions.act_window">
            <field name="name">Super Sales Orders</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">elmatica.super.sales</field>
            <field name="view_type">form</field>
            <field name="view_id" ref="super_sales_order_form_view"/>
            <field name="view_mode">tree,form,calendar,graph</field>
            <field name="domain">[('state', 'not in', ('draft', 'sent', 'cancel'))]</field>
            <field name="help" type="html">
                <p class="oe_view_nocontent_create">
                    Click to create a Super quotation that can be converted into a Super sales
                    order.
                </p><p>
                    Odoo will help you efficiently handle the complete sales flow:
                    quotation, sales order, delivery, invoicing and payment.
                </p>
            </field>
        </record> 

My View:
<record id="super_sales_order_form_view" model="ir.ui.view">
            <field name="name">elmatica.super.sales.form1</field>
            <field name="model">elmatica.super.sales</field>
            <field name="inherit_id" ref="sale.view_order_form" />
            <field name="type">form</field>
            <field name="arch" type="xml">
                   <!-- CUSTOMIZATIONS -->

                <xpath expr="//page[@string='Order Lines']" position="replace">
                    
                </xpath>
             </field>
        </record>

 But all the other related views on the sale.view_order_form is not beeing shown. 
I'm missing a lot of other fields like warehouse, accounting etc that the normal sales order view contains.

Does anyone have any suggestions?

Regards
André

André Grant | Konsulent | Tinderbox AS | +47 928 351 38