summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorron@tinyerp.com <>2011-05-10 11:30:08 +0530
committerron@tinyerp.com <>2011-05-10 11:30:08 +0530
commitece47f69fce29c26cd8fd2ed55e2430f77ad8ea9 (patch)
tree92e76702e3fdfdba3db58cc3f3d48f3844299b50
parent12f87010029b2616145bd97cc037bbc27d86ed57 (diff)
[FIX]stock:Unlink Stock picking doesnot work correctly for picking in the state =>auto
lp bug: https://launchpad.net/bugs/778473 fixed bzr revid: ron@tinyerp.com-20110510060008-k6raiv9g2kt5kvre
-rw-r--r--addons/stock/stock.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 2d516f1a8a5..2973d35fdc0 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1126,7 +1126,7 @@ class stock_picking(osv.osv):
for pick in self.browse(cr, uid, ids, context=context):
if pick.state in ['done','cancel']:
raise osv.except_osv(_('Error'), _('You cannot remove the picking which is in %s state !')%(pick.state,))
- elif pick.state in ['confirmed','assigned', 'draft']:
+ else:
ids2 = [move.id for move in pick.move_lines]
ctx = context.copy()
ctx.update({'call_unlink':True})
@@ -1315,6 +1315,7 @@ class stock_picking(osv.osv):
'assigned': _('is ready to process.'),
'cancel': _('is cancelled.'),
'done': _('is done.'),
+ 'auto': _('is waiting.'),
'draft':_('is in draft state.'),
}
res = data_obj.get_object_reference(cr, uid, 'stock', view_list.get(pick.type, 'view_picking_form'))