summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorMartin Trigaux <mat@openerp.com>2013-11-28 15:50:59 +0100
committerMartin Trigaux <mat@openerp.com>2013-11-28 15:50:59 +0100
commit9542ae89aad5fd3948e4bfdb6472b3c28d3661de (patch)
treeb2da51c9b854b3d0c2f00673c274cd9d0e57c8b6 /addons
parent26b351a28558295b85756b07987173b59871ae5e (diff)
[FIX] stock: switch ids new - old picking in the message informing the back order was created (opw 594402)
Post on delivered picking that the backorder was created. Was inconsitent with the field 'Back order of' bzr revid: mat@openerp.com-20131128145059-p3mw969z3lotkn26
Diffstat (limited to 'addons')
-rw-r--r--addons/stock/stock.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 26ea1775871..484bdc4cde2 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1368,9 +1368,9 @@ class stock_picking(osv.osv):
self.action_move(cr, uid, [new_picking], context=context)
wf_service.trg_validate(uid, 'stock.picking', new_picking, 'button_done', cr)
wf_service.trg_write(uid, 'stock.picking', pick.id, cr)
- delivered_pack_id = new_picking
+ delivered_pack_id = pick.id
back_order_name = self.browse(cr, uid, delivered_pack_id, context=context).name
- self.message_post(cr, uid, ids, body=_("Back order <em>%s</em> has been <b>created</b>.") % (back_order_name), context=context)
+ self.message_post(cr, uid, new_picking, body=_("Back order <em>%s</em> has been <b>created</b>.") % (back_order_name), context=context)
else:
self.action_move(cr, uid, [pick.id], context=context)
wf_service.trg_validate(uid, 'stock.picking', pick.id, 'button_done', cr)