Comment 2 for bug 1250507

Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

The overrided addons branch has crappy on change:

<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,parent.state,context)"/>

215: <field name="product_qty" on_change="onchange_product_id(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,parent.state,context)"/>

here we have added a state in signature that breaks existing module that override the onchange (you have the state on the context) and context does not fit signature

396: <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,'draft',context)"/>
399: <field name="product_qty" on_change="onchange_product_id(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,'draft',context)" class="oe_inline"/>

State is hard coded so the purchase_extended onchange_product_id is useless in form mode.

This approch is also not good, I become a mess to provide addons on PO.

My proposed solution is to revert this change in addons, and pushed this changes on purchase_order_extended as post context kwargs

regards

Nicolas