purchase-extended breaks PO unit price

Bug #1250507 reported by Nicolas Bessi - Camptocamp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP for Humanitarian NGOs
Fix Released
Undecided
Unassigned

Bug Description

purchase-extended set unit price of draft PO line to 0.0 even if PO is not of type "bid"

Related branches

Changed in openerp-humanitarian-ngo:
status: New → In Progress
assignee: nobody → Nicolas Bessi - Camptocamp (nbessi-c2c)
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

Changed in openerp-humanitarian-ngo:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.