summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Dodiya <ado@tinyerp.com>2013-02-12 12:32:01 +0530
committerAmit Dodiya <ado@tinyerp.com>2013-02-12 12:32:01 +0530
commite0be6b13f58869d1b87f4e0ca1c0f7e3425eca2a (patch)
tree18353a9dac7e761fb972afe15720c246624e50ea
parent2d6180c35c9481b2d72a9d805230bbaa5402f6f4 (diff)
parentf89014b0cc8888c120fdceea0c3aef975dac83b4 (diff)
[FIX]stock: while running the product to process wizard on done state move gives traceback
bzr revid: ado@tinyerp.com-20130212070201-ekfamlch4mjfgqd4
-rw-r--r--addons/stock/wizard/stock_partial_move.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/stock/wizard/stock_partial_move.py b/addons/stock/wizard/stock_partial_move.py
index 89744615f22..49e962b8a59 100644
--- a/addons/stock/wizard/stock_partial_move.py
+++ b/addons/stock/wizard/stock_partial_move.py
@@ -22,6 +22,7 @@
from openerp.osv import fields, osv
from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
import time
+from openerp.tools.translate import _
class stock_partial_move_line(osv.osv_memory):
_inherit = "stock.partial.picking.line"
@@ -67,6 +68,8 @@ class stock_partial_move(osv.osv_memory):
}
moves_ids = []
for move in partial.move_ids:
+ if not move.move_id:
+ raise osv.except_osv(_('Warning !'), _("You can't process the move which is in done state ! \n Or \n You have manually created line in wizard. Please delete any lines you created !"))
move_id = move.move_id.id
partial_data['move%s' % (move_id)] = {
'product_id': move.product_id.id,