[FIX] auto-mark automatic todos as done when they're launched

bzr revid: xmo@openerp.com-20110729145106-chvzn58l8d0y7tt9
This commit is contained in:
Xavier Morel
2011-07-29 16:51:06 +02:00
parent f723234f4d
commit 97f24f2da7
+2
View File
@@ -852,6 +852,8 @@ Recurring: the wizard is visible in the configuration panel regardless of its st
""" Launch Action of Wizard"""
wizard_id = ids and ids[0] or False
wizard = self.browse(cr, uid, wizard_id, context=context)
if wizard.type == 'automatic':
wizard.write({'state': 'done'})
res = self.pool.get('ir.actions.act_window').read(cr, uid, wizard.action_id.id, [], context=context)
res['nodestroy'] = True