コンテンツへスキップ
メニュー
この質問にフラグが付けられました
7536 ビュー

Hi,

I'm trying to create a wizard which will analyze account.invoices and return some of them in a tree view. How do I return a new tree view with these ids i found from my wizard?

The code is executed, i see in the print out in the log.

This is how my code:

class wizard_find_credit_invoice(wizard.interface):

def _find_credit_invoice(self, cr, uid, data, context={}):
    print "gather invoices..."
    ... doing stuff...

    return {
            'domain': "[('id','in', [2995, 2994])]",
            'name': 'Invoices',
            'view_type': 'form',
            'view_mode': 'tree,form',
            'res_model': 'account.invoice',
            'view_id': False,
            'context': "{'type':'out_refund'}",
            'type': 'ir.actions.act_window'
    }

states = {
    'init': {
        'actions': [_find_credit_invoice],
        'result': {
                'type': 'action',
                'action': _find_credit_invoice,
                'state': 'end'
        }
    }
}
 wizard_find_credit_invoice('find_credit_invoice')
アバター
破棄
関連投稿 返信 ビュー 活動
2
3月 15
3751
0
3月 15
3915
2
12月 19
10610
2
9月 17
7356
0
11月 15
3995