[IMP] account_voucher: : use the new ORM methods create_workflow, delete_workflow, redirect_workflow.

bzr revid: cha@tinyerp.com-20130131115954-54u8z5ibntrs4sco
This commit is contained in:
Ajay Chauhan (OpenERP) 2013-01-31 17:29:54 +05:30
parent fc374647a9
commit d4328ba8d5
1 changed files with 1 additions and 4 deletions

View File

@ -22,7 +22,6 @@
import time
from lxml import etree
from openerp import netsvc
from openerp.osv import fields, osv
import openerp.addons.decimal_precision as dp
from openerp.tools.translate import _
@ -828,9 +827,7 @@ class account_voucher(osv.osv):
return True
def action_cancel_draft(self, cr, uid, ids, context=None):
wf_service = netsvc.LocalService("workflow")
for voucher_id in ids:
wf_service.trg_create(uid, 'account.voucher', voucher_id, cr)
self.create_workflow(cr, uid, ids)
self.write(cr, uid, ids, {'state':'draft'})
return True