FIX : Stop to create validated invoice from hr_expense, now hr_expense invoice created with draft state

lp bug: https://launchpad.net/bugs/735368 fixed

bzr revid: tta@openerp.com-20110421063626-idhopqjg3vbelva8
This commit is contained in:
Tejas (OpenERP) 2011-04-21 12:06:26 +05:30
parent 9475e57d2a
commit b1fdf78299
1 changed files with 0 additions and 3 deletions

View File

@ -193,9 +193,6 @@ class hr_expense_expense(osv.osv):
account_journal.write(cr, uid, [journal.id],{'analytic_journal_id':analytic_journal_ids[0]})
inv_id = invoice_obj.create(cr, uid, inv, {'type': 'in_invoice'})
invoice_obj.button_compute(cr, uid, [inv_id], {'type': 'in_invoice'}, set_total=True)
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.invoice', inv_id, 'invoice_open', cr)
self.write(cr, uid, [exp.id], {'invoice_id': inv_id, 'state': 'invoiced'})
res = inv_id
return res