[IMP] sale: for yml use the new signal_xxx methods instead of trg_validate.

bzr revid: cha@tinyerp.com-20130131051229-r530h3eawm5bm62s
This commit is contained in:
Ajay Chauhan (OpenERP) 2013-01-31 10:42:29 +05:30
parent 19368fb65c
commit 4fa593ade5
2 changed files with 2 additions and 8 deletions

View File

@ -51,11 +51,8 @@
I cancel all the invoices.
-
!python {model: sale.order}: |
import netsvc
invoice_ids = self.browse(cr, uid, ref("sale_order_8")).invoice_ids
wf_service = netsvc.LocalService("workflow")
for invoice in invoice_ids:
wf_service.trg_validate(uid, 'account.invoice', invoice.id, 'invoice_cancel', cr)
self.pool.get('account.invoice').signal_invoice_cancel(cr, uid, invoice_ids)
-
I check order status in "Invoice Exception" and related invoice is in cancel state.
-

View File

@ -41,11 +41,8 @@
I open the Invoice.
-
!python {model: sale.order}: |
import netsvc
wf_service = netsvc.LocalService("workflow")
so = self.browse(cr, uid, ref("sale_order_2"))
for invoice in so.invoice_ids:
wf_service.trg_validate(uid, 'account.invoice', invoice.id, 'invoice_open', cr)
self.pool.get('account.invoice').signal_invoice_open(cr, uid, so.invoice_ids)
-
I pay the invoice.
-