openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #06938
lp:~openerp-dev/openobject-addons/6.0-stock_partial_reception-763426-rha into lp:openobject-addons/6.0
Rifakat Haradwala (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/6.0-stock_partial_reception-763426-rha into lp:openobject-addons/6.0.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-stock_partial_reception-763426-rha/+merge/61406
stock: check if processing product quantity is larger that available quantity for partial picking
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-stock_partial_reception-763426-rha/+merge/61406
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/6.0-stock_partial_reception-763426-rha.
=== modified file 'stock/stock.py'
--- stock/stock.py 2011-05-12 10:23:56 +0000
+++ stock/stock.py 2011-05-18 13:46:16 +0000
@@ -1175,6 +1175,13 @@
product_currency = partial_data.get('product_currency',False)
prodlot_id = partial_data.get('prodlot_id')
prodlot_ids[move.id] = prodlot_id
+
+ product_name = product_obj.browse(cr, uid,\
+ partial_data.get('product_id'), context=context).name
+ if product_qty > move.product_qty:
+ raise osv.except_osv(_('Error'), _('Processing quantity %d for %s is larger than the available quantity %d!')\
+ %(product_qty, product_name, move.product_qty))
+
if move.product_qty == product_qty:
complete.append(move)
elif move.product_qty > product_qty: