Ravi Gohil (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/6.1-opw-582836-rgo into lp:openobject-addons/6.1.
Requested reviews: Naresh(OpenERP) (nch-openerp) For more details, see: https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-582836-rgo/+merge/138717 Hello, Steps to reproduce: - Create a db and install sale module, - Create a stockable product and update it's quantity(say, 15 in stock/shelf 1 and 10 in stock/shelf 2) - Create a Sale Order with 25 qty for this product and set invoice policy to "Invoice based on deliveries" and confirm it, - Open it's delivery order and process "Check availibility", stock moves should be splitted in 10, 15 qty, - Process the delivery order and create invoice from that delivery order. You will have invoice with 2 invoice lines with 25 qty for each line where it should be 10, 15 qty. This MP contains fix for this issue. Kindly review the fix. Thanks. -- https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-582836-rgo/+merge/138717 Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/6.1-opw-582836-rgo.
=== modified file 'stock/stock.py' --- stock/stock.py 2012-10-05 07:47:57 +0000 +++ stock/stock.py 2012-12-07 12:52:06 +0000 @@ -2037,11 +2037,11 @@ done.append(move.id) pickings[move.picking_id.id] = 1 r = res.pop(0) - cr.execute('update stock_move set location_id=%s, product_qty=%s where id=%s', (r[1], r[0], move.id)) + cr.execute('update stock_move set location_id=%s, product_qty=%s , product_uos_qty=%s where id=%s', (r[1], r[0], r[0] * move.product_id.uos_coeff, move.id)) while res: r = res.pop(0) - move_id = self.copy(cr, uid, move.id, {'product_qty': r[0], 'location_id': r[1]}) + move_id = self.copy(cr, uid, move.id, {'product_qty': r[0],'product_uos_qty': r[0] * move.product_id.uos_coeff,'location_id': r[1]}) done.append(move_id) if done: count += len(done)
_______________________________________________ Mailing list: https://launchpad.net/~openerp-dev-gtk Post to : openerp-dev-gtk@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-dev-gtk More help : https://help.launchpad.net/ListHelp