[MERGE] forward port of branch 7.0 up to revid 10012 launchpad_translations_on_behalf...
[odoo/odoo.git] / addons / account_voucher / test / sales_payment.yml
index cdef3cf..ed9305a 100644 (file)
@@ -1,3 +1,8 @@
+- 
+  I test sales payment with user who is accountant. 
+-
+  !context
+    uid: 'res_users_account_voucher_user'
 -
   Create an invoice for the partner Seagate with amount 450.0
 -
@@ -37,7 +42,6 @@
   I will create and post an account voucher of amount 450.0 for the partner Seagate.
 -
   !python {model: account.voucher}: |
-    import netsvc
     vals = {}
     journal_id = self.default_get(cr, uid, ['journal_id']).get('journal_id',None)
     voucher = self.recompute_voucher_lines(cr, uid, [], ref("base.res_partner_19"), journal_id, 450.0, ref('base.EUR'), 'receipt', False)
@@ -64,8 +68,7 @@
     voucher_id = self.browse(cr, uid, id)
     assert (voucher_id.writeoff_amount == 0.0), "Writeoff amount is not 0.0"
     assert (voucher_id.state=='draft'), "Voucher is not in draft state"
-    wf_service = netsvc.LocalService("workflow")
-    wf_service.trg_validate(uid, 'account.voucher', voucher_id.id, 'proforma_voucher', cr)
+    self.signal_proforma_voucher(cr, uid, [voucher_id.id])
 
 -
   Finally i will Confirm the state of the invoice is paid