Skip to content

Commit

Permalink
[FIX] write product_qty and product_uos_qty through ORM, thereby resp…
Browse files Browse the repository at this point in the history
…ecting decimal precision
  • Loading branch information
hbrunn authored and pedrobaeza committed Jul 6, 2014
1 parent 409000d commit 8974ee4
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 8974ee4

Please sign in to comment.