Skip to content

Commit

Permalink
Merge pull request #11 from pedrobaeza/lp-rev_9959-bug_1268594
Browse files Browse the repository at this point in the history
[FIX] write product_qty and product_uos_qty through ORM, thereby respecting decimal precision
  • Loading branch information
hbrunn committed Sep 1, 2014
2 parents 2928617 + 8974ee4 commit c8539b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addons/stock/stock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2235,7 +2235,11 @@ def check_assign(self, cr, uid, ids, context=None):
pickings[move.picking_id.id] = 1
r = res.pop(0)
product_uos_qty = self.pool.get('stock.move').onchange_quantity(cr, uid, [move.id], move.product_id.id, r[0], move.product_id.uom_id.id, move.product_id.uos_id.id)['value']['product_uos_qty']
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))
move.write({
'location_id': r[1],
'product_qty': r[0],
'product_uos_qty': product_uos_qty,
})

while res:
r = res.pop(0)
Expand Down

0 comments on commit c8539b7

Please sign in to comment.