Amit Dodiya (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-opw-55112-ado into
lp:openobject-addons/6.0.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-55112-ado/+merge/86939
Hello,
[FIX] Bug: Delivery orders is not processing while quantity has rounding value"
1). Create a Delivery Order with Quantity = 5.27, Uom = PCE
2). Process it, the delivery order is in available state after processing the
complete delivery,
It should be in done state.
Thanks,
Amit
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-55112-ado/+merge/86939
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw-55112-ado.
=== modified file 'stock/wizard/stock_partial_picking.py'
--- stock/wizard/stock_partial_picking.py 2011-10-03 14:13:57 +0000
+++ stock/wizard/stock_partial_picking.py 2011-12-27 10:52:25 +0000
@@ -162,11 +162,9 @@
raise osv.except_osv(_('Processing Error'),\
_('You cannot add any new move while validating the picking, rather you can split the lines prior to validation!'))
- calc_qty = uom_obj._compute_qty(cr, uid, move.product_uom.id, \
- move.quantity, move.move_id.product_uom.id)
-
#Adding a check whether any move line contains exceeding qty to original moveline
- if calc_qty > move.move_id.product_qty:
+ print "move.quantity > move.move_id.product_qty--",move.quantity ,move.move_id.product_qty
+ if move.quantity > move.move_id.product_qty:
precision = '%0.' + str(dp.get_precision('Product UoM')(cr)[1] or 0) + 'f'
raise osv.except_osv(_('Processing Error'),
_('Processing quantity %s %s for %s is larger than the available quantity %s %s !')\
@@ -174,7 +172,7 @@
precision % move.move_id.product_qty, move.move_id.product_uom.name))
#Adding a check whether any move line contains qty less than zero
- if calc_qty < 0:
+ if move.quantity < 0:
precision = '%0.' + str(dp.get_precision('Product UoM')(cr)[1] or 0) + 'f'
raise osv.except_osv(_('Processing Error'), \
_('Can not process quantity %s for Product %s !') \
@@ -182,7 +180,7 @@
partial_datas['move%s' % (move.move_id.id)] = {
'product_id': move.product_id.id,
- 'product_qty': calc_qty,
+ 'product_qty': move.quantity,
'product_uom': move.move_id.product_uom.id,
'prodlot_id': move.prodlot_id.id,
}
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp