bugfix_356697

bzr revid: fp@tinyerp.com-20090407062645-urhakz1f2jpznw03
This commit is contained in:
Fabien Pinckaers 2009-04-07 08:26:45 +02:00
parent 328f7fe8f4
commit cd65644a18
3 changed files with 6 additions and 5 deletions

View File

@ -1088,10 +1088,11 @@ class mrp_procurement(osv.osv):
todo = []
todo2 = []
for proc in self.browse(cr, uid, ids):
if proc.move_id and proc.move_id.state=='waiting':
if proc.close_move:
if proc.close_move:
if proc.move_id.state not in ('done','cancel'):
todo2.append(proc.move_id.id)
else:
else:
if proc.move_id and proc.move_id.state=='waiting':
todo.append(proc.move_id.id)
if len(todo2):
self.pool.get('stock.move').action_cancel(cr, uid, todo2)

View File

@ -151,7 +151,7 @@ class mrp_procurement(osv.osv):
else:
continue
proc_id = proc_obj.create(cr, uid, {
'name': 'PROC:Automatic OP for product:%s' % product.name,
'name': 'Automatic OP: %s' % product.name,
'origin': 'SCHEDULER',
'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'),
'product_id': product.id,

View File

@ -1254,7 +1254,7 @@
<group col="4" colspan="2">
<button name="action_confirm" states="draft" string="Confirm" type="object"/>
<button name="action_assign" states="confirmed" string="Set Available" type="object"/>
<button name="action_cancel" states="assigned" string="Cancel" type="object"/>
<button name="action_cancel" states="assigned,confirmed" string="Cancel" type="object"/>
<button name="action_done" states="assigned" string="Make Parcel" type="object"/>
</group>
</form>