Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
7541 Переглядів

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')
Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
бер. 15
3758
0
бер. 15
3932
2
груд. 19
10620
2
вер. 17
7377
0
лист. 15
4022