OpenERP 5.0.16, 6.0.3, 6.0.4 & 6.1 Technical Tutorial : Method trg_validate Milik Workflow Service

Method trg_validate berfungsi untuk menjalankan transisi dari sebuah workflow instance berdasarkan signal yang diberikan.

SINTAKS


trg_validate(uid, res_type, res_id, signal, cr)

PARAMETER

uid
integer. ID user yang menjalankan method

res_type
string. Nama object yang akan dibuatkan instance workflownya.

res_id
integer. ID dari resource yang akan dibuatkan instance workflownya

signal
string. Nama signal yang akan men-trigger transisi

cr
cursor

RETURN

none

CONTOH
import netsvc

wkf_service = netsvc.LocalService('workflow')

invoice_id = 1
wkf_service.trg_validate(uid, 'account.account', invoice_id, 'invoice_open', cr)

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s