[FIX] hr_expense: do not validate the invoice created from a hr_expense automatically
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Fri, 25 Feb 2011 13:48:44 +0000 (14:48 +0100)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Fri, 25 Feb 2011 13:48:44 +0000 (14:48 +0100)
bzr revid: qdp-launchpad@openerp.com-20110225134844-wrjp0p51gqg1bafo

addons/hr_expense/hr_expense.py

index 40e0091..8e60b0c 100644 (file)
@@ -194,8 +194,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