Merge lp:~hbrunn/ocb-addons/trunk-lp1268594 into lp:ocb-addons

Proposed by Holger Brunn (Therp)
Status: Merged
Approved by: Yannick Vaucher @ Camptocamp
Approved revision: no longer in the source branch.
Merged at revision: 9959
Proposed branch: lp:~hbrunn/ocb-addons/trunk-lp1268594
Merge into: lp:ocb-addons
Diff against target: 16 lines (+5/-1)
1 file modified
stock/stock.py (+5/-1)
To merge this branch: bzr merge lp:~hbrunn/ocb-addons/trunk-lp1268594
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) Approve
Sandy Carter (http://www.savoirfairelinux.com) code review Approve
Review via email: mp+201444@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

LGTM

Revision history for this message
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) wrote :

LGTM

review: Approve (code review)
Revision history for this message
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) wrote :

How about adding a unittest to this?

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Approve as per my earlier review

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/stock.py'
2--- stock/stock.py 2013-11-28 14:50:59 +0000
3+++ stock/stock.py 2014-01-13 16:10:29 +0000
4@@ -2212,7 +2212,11 @@
5 pickings[move.picking_id.id] = 1
6 r = res.pop(0)
7 product_uos_qty = self.pool.get('stock.move').onchange_quantity(cr, uid, ids, move.product_id.id, r[0], move.product_id.uom_id.id, move.product_id.uos_id.id)['value']['product_uos_qty']
8- cr.execute('update stock_move set location_id=%s, product_qty=%s, product_uos_qty=%s where id=%s', (r[1], r[0],product_uos_qty, move.id))
9+ move.write({
10+ 'location_id': r[1],
11+ 'product_qty': r[0],
12+ 'product_uos_qty': product_uos_qty,
13+ })
14
15 while res:
16 r = res.pop(0)