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">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <field 
name="name">account.invoice.line.form</field>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <field 
name="model">account.invoice.line</field>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <field name="type">form</field>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <field name="inherit_id" 
ref="account.view_invoice_line_form"/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <field name="arch" type="xml">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <xpath 
expr="/form/notebook/page/field&#91;@name='product_id'&#93;" position="replace">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <field 
name="product_id" on_change="product_id_change&#40;product_id, uos_id, 
quantity, name, parent.type, parent.partner_id, parent.fiscal_position, 
price_unit, parent.address_invoice_id, &#123;'company_id'&#58; 
parent.company_id&#125;&#41;"/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </xpath>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </field>
&nbsp; &nbsp; &nbsp; &nbsp; </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

Reply via email to