[REV] stock: removed feature that was looking if a procurement was in exception (because all its moves were cancelled) at the time of _run_move_create and which cancel the previously made attempt (to avoid duplicates). The reason of this removal is that it may have side effects, and that we prefer let the users manually fix exceptions (dixit fp)

bzr revid: qdp-launchpad@openerp.com-20131220125434-gtpowwy8q6m1z5tl
This commit is contained in:
Quentin (OpenERP)
2013-12-20 13:54:34 +01:00
parent 5d6aa47a4c
commit 700dfd12c6
-6
View File
@@ -197,12 +197,6 @@ class procurement_order(osv.osv):
'date_expected': newdate,
'propagate': procurement.rule_id.propagate,
}
#look if the procurement was in exception (because all its moves were cancelled) and cancel the previously made attempt to avoid duplicates
cancelled_moves = [m.id for m in procurement.move_ids if m.state == 'cancel']
if cancelled_moves:
previous_attempt = self.search(cr, uid, [('move_dest_id', 'in', cancelled_moves)], context=context)
if previous_attempt:
self.cancel(cr, uid, previous_attempt, context=context)
return vals
def _run(self, cr, uid, procurement, context=None):