purchase-extended breaks PO unit price
Bug #1250507 reported by
Nicolas Bessi - Camptocamp
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
lp://qastaging/~camptocamp/openerp-humanitarian-ngo/addons-backport-improve_on_change-nbi
- Yannick Vaucher @ Camptocamp: Approve (code review, no tests)
- Joël Grand-Guillaume @ camptocamp: Approve (code review, no tests)
-
Diff: 139 lines (+23/-21)3 files modifiedpurchase/purchase.py (+8/-10)
purchase/purchase_view.xml (+5/-5)
purchase_requisition/purchase_requisition.py (+10/-6)
lp://qastaging/~camptocamp/openerp-humanitarian-ngo/purchase-wkfl-fix_1250507-nbi
- Joël Grand-Guillaume @ camptocamp: Approve (code review + test)
- Romain Deheele - Camptocamp (community): Approve (code review and test)
-
Diff: 55 lines (+23/-3)2 files modifiedpurchase_extended/model/purchase_order.py (+3/-3)
purchase_extended/view/purchase_order.xml (+20/-0)
Changed in openerp-humanitarian-ngo: | |
status: | New → In Progress |
assignee: | nobody → Nicolas Bessi - Camptocamp (nbessi-c2c) |
Changed in openerp-humanitarian-ngo: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
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) "/> "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"/>
399: <field name="product_qty" on_change=
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