Merge lp:~taktik/openobject-addons/6.1-taktik-fix-po-uom-onchange-bug-1294377 into lp:openobject-addons/6.1

Proposed by David Lefever @ Taktik
Status: Needs review
Proposed branch: lp:~taktik/openobject-addons/6.1-taktik-fix-po-uom-onchange-bug-1294377
Merge into: lp:openobject-addons/6.1
Diff against target: 21 lines (+2/-2)
1 file modified
warning/warning.py (+2/-2)
To merge this branch: bzr merge lp:~taktik/openobject-addons/6.1-taktik-fix-po-uom-onchange-bug-1294377
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+211644@code.launchpad.net

Description of the change

Fixes bug https://bugs.launchpad.net/openobject-addons/+bug/1294377
Fixes a problem with the on_change method in the warning module, when changing the Product UOM in a Purchase Order Line.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'warning/warning.py'
2--- warning/warning.py 2012-09-06 10:32:09 +0000
3+++ warning/warning.py 2014-03-18 22:39:49 +0000
4@@ -231,7 +231,7 @@
5 class purchase_order_line(osv.osv):
6 _inherit = 'purchase.order.line'
7 def onchange_product_id(self,cr, uid, ids, pricelist, product, qty, uom,
8- partner_id, date_order=False, fiscal_position=False, date_planned=False,
9+ partner_id, date_order=False, fiscal_position_id=False, date_planned=False,
10 name=False, price_unit=False, notes=False, context=None):
11 warning = {}
12 if not product:
13@@ -250,7 +250,7 @@
14 warning['message'] = message
15
16 result = super(purchase_order_line, self).product_id_change(cr, uid, ids, pricelist, product, qty, uom,
17- partner_id, date_order, fiscal_position)
18+ partner_id, date_order, fiscal_position_id)
19
20 if result.get('warning',False):
21 warning['title'] = title and title +' & '+result['warning']['title'] or result['warning']['title']