you can inherit view like this and change on_change of product id. here is the sample code to change product_id in invoice_lines.
<record id="view_invoice_line_gen_form_multi_company" model="ir.ui.view"> <field name="name">account.invoice.line.form</field> <field name="model">account.invoice.line</field> <field name="type">form</field> <field name="inherit_id" ref="account.view_invoice_line_form"/> <field name="arch" type="xml"> <xpath expr="/form/notebook/page/field[@name='product_id']" position="replace"> <field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, {'company_id': parent.company_id})"/> </xpath> </field> </record> ------------------------ OpenERP=Easier, Adaptable, Affordable, Modular -------------------- m2f -------------------- -- http://www.openobject.com/forum/viewtopic.php?p=42602#42602 -------------------- m2f -------------------- _______________________________________________ Tinyerp-users mailing list http://tiny.be/mailman2/listinfo/tinyerp-users
