diff options
| author | Christophe Simonis <christophe@taupe> | 2008-12-26 11:23:47 +0100 |
|---|---|---|
| committer | Christophe Simonis <christophe@taupe> | 2008-12-26 11:23:47 +0100 |
| commit | 0bc6a1dbaf93b961677e863cefb2fe7bdf89f9f3 (patch) | |
| tree | b760748acedc5e5ef46ada78f3c39d870bf636e4 | |
| parent | ab5453cb91eb107715b58fa5527d5651f0568144 (diff) | |
[FIX] stock picking must be canceled if all picking move lines are cancle
bzr revid: christophe@taupe-20081226102347-sbabtnkbr6j3mvlf
| -rw-r--r-- | addons/stock/stock.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/addons/stock/stock.py b/addons/stock/stock.py index c98a15e39ab..55421013ca4 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1070,13 +1070,7 @@ class stock_move(osv.osv): self.write(cr, uid, ids, {'state':'cancel', 'move_dest_id': False}) for pick in self.pool.get('stock.picking').browse(cr,uid,pickings.keys()): - cancel=False - for move in pick.move_lines: - if move.state=='cancel': - cancel=True - if move.state!='cancel': - cancel=False - if cancel: + if all(move.state == 'cancle' for move in pick.move_lines): self.pool.get('stock.picking').write(cr,uid,[pick.id],{'state':'cancel'}) wf_service = netsvc.LocalService("workflow") |
