Odoo - OpenERP - how to Tracing module update for inheritance in views ?

I'm trying to manipulate the sale form by a module with inheritance in views. I have following XML for testing:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="view_order_form" model="ir.ui.view">
            <field name="name">sale.order.form.custom.120</field>
            <field name="model">sale.order</field>
            <field name="inherit_id" ref="sale.view_order_form"/>
            <field name="arch" type="xml">
                <data>
                    <field name="invoiced" position="replace"/>
                    <xpath
                        expr="//page[@string='Order Line']/field[@name='product_uom_qty']" 
                        position="replace">
                    </xpath>
                </data>
            </field>
        </record>
    </data>
</openerp>

AFAIK that should remove the quantity field from the form. But it won't.

I tested the XPath expression wit a query tool. Should be fine.

Is there any debug/trace level to see what happens, when reading this XML to update the view ?

Support
Support
5000
| 2 1 2
Asked on 7/24/15, 11:17 AM
0
vote
3581 Views

We had some issues with sale order view customizations not showing up properly and it was because of the loading order between sale, sale_stock and the custom modules.

Setting the custom modules to depend on sale_stock instead of sale fixed the issue. Perhaps your issue is related if you currently have sales and warehouse management functionalities installed.

Also xpath seems wrong. Try this xpath:

<xpath expr="//notebook/page[@string='Order Lines']/field[@name='order_line']/tree/field[@name='product_uom_qty']" position="replace"></xpath>
<xpath expr="//notebook/page[@string='Order Lines']/field[@name='order_line']/form/group/group/label[@for='product_uom_qty']" position="replace"></xpath>
<xpath expr="//notebook/page[@string='Order Lines']/field[@name='order_line']/form/group/group/div/field[@name='product_uom_qty']" position="replace"></xpath>

Then update your module.

Support
Support
5000
| 2 1 2
Answered on 7/24/15, 11:20 AM
0
vote

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!

Ask a Question

Keep Informed

About This Forum

This forum is for HiTechnologia Employees & just Odoo general knowledge purpose only.

Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 7/24/15, 11:17 AM
Seen: 3581 times
Last updated: 7/24/15, 11:20 AM