Merge lp:~unifield-team/unifield-addons/oeb_14-patch into lp:unifield-addons

Proposed by Quentin THEURET @Amaris
Status: Merged
Merged at revision: 4472
Proposed branch: lp:~unifield-team/unifield-addons/oeb_14-patch
Merge into: lp:unifield-addons
Diff against target: 33 lines (+8/-5)
1 file modified
stock/stock.py (+8/-5)
To merge this branch: bzr merge lp:~unifield-team/unifield-addons/oeb_14-patch
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+62436@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'stock/stock.py'
--- stock/stock.py 2011-04-08 13:32:12 +0000
+++ stock/stock.py 2011-05-26 09:32:14 +0000
@@ -2108,11 +2108,11 @@
21082108
2109 todo = []2109 todo = []
2110 for move in self.browse(cr, uid, ids, context=context):2110 for move in self.browse(cr, uid, ids, context=context):
2111 #print 'DONE MOVE', move.id, move.product_id.name, move.move_dest_id.id, move.state, move.move_dest_id and move.move_dest_id.state
2112 if move.state=="draft":2111 if move.state=="draft":
2113 todo.append(move.id)2112 todo.append(move.id)
2114 if todo:2113 if todo:
2115 self.action_confirm(cr, uid, todo, context=context)2114 self.action_confirm(cr, uid, todo, context=context)
2115 todo = []
21162116
2117 for move in self.browse(cr, uid, ids, context=context):2117 for move in self.browse(cr, uid, ids, context=context):
2118 if move.state in ['done','cancel']:2118 if move.state in ['done','cancel']:
@@ -2135,10 +2135,13 @@
2135 prodlot_id = partial_datas and partial_datas.get('move%s_prodlot_id' % (move.id), False)2135 prodlot_id = partial_datas and partial_datas.get('move%s_prodlot_id' % (move.id), False)
2136 if prodlot_id:2136 if prodlot_id:
2137 self.write(cr, uid, [move.id], {'prodlot_id': prodlot_id}, context=context)2137 self.write(cr, uid, [move.id], {'prodlot_id': prodlot_id}, context=context)
2138 if move.state not in ('confirmed','done'):2138 if move.state not in ('confirmed','done','assigned'):
2139 self.action_confirm(cr, uid, move_ids, context=context)2139 todo.append(move.id)
21402140
2141 self.write(cr, uid, move_ids, {'state': 'done', 'date_planned': time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)2141 if todo:
2142 self.action_confirm(cr, uid, todo, context=context)
2143
2144 self.write(cr, uid, move_ids, {'state': 'done', 'date': time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)
2142 for id in move_ids:2145 for id in move_ids:
2143 wf_service.trg_trigger(uid, 'stock.move', id, cr)2146 wf_service.trg_trigger(uid, 'stock.move', id, cr)
21442147

Subscribers

People subscribed via source and target branches

to all changes: