5
from osv.orm import browse_record
7
draft2posted_form = """<?xml version="1.0"?>
8
<form string="Draft To Posted">
9
<separator colspan="4" string="change State : Draft to Posted " />
13
draft2posted_fields = {
16
def _draft2posted(self, cr, uid, data, context):
17
cheque_pool = pooler.get_pool(cr.dbname).get('account.loan.bank.cheque')
18
wf_service = netsvc.LocalService("workflow")
19
for o in cheque_pool.browse(cr, uid, data['ids'], context):
21
wf_service.trg_validate(uid, 'account.loan.bank.cheque', o.id, 'post_bank', cr)
24
class change_cheque_state(wizard.interface):
28
'result' : {'type' : 'form',
29
'arch' : draft2posted_form,
31
'state' : [('end', 'Cancel'),('draft2posted', 'Draft To Posted') ]}
35
'result' : {'type' : 'action',
36
'action' : _draft2posted,
40
change_cheque_state('account.bank.cheque.process')
b'\\ No newline at end of file'