Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
7612 Ansichten

I have a wizard with a button that has this code:

@api.multi
def btn_print_report(self):
    return {
        'type': 'ir.actions.report.xml',
        'report_name': 'report',
        'nodestroy': True,
    }

But when you print the report closes the wizard, ie disappears and I have to open it again. I would like the wizard will not close.

Avatar
Verwerfen
Beste Antwort

Hi,

Just remove the param{ 'nodestroy': True,}

Avatar
Verwerfen
Beste Antwort

Try this method used in 'account_financial_report.py'

def _print_report(self, cr, uid, ids, data, context=None):

        data['form'].update(self.read(cr, uid, ids, ['date_from_cmp', 'debit_credit', 'date_to_cmp', 'fiscalyear_id_cmp',         'period_from_cmp', 'period_to_cmp', 'filter_cmp', 'account_report_id', 'enable_filter', 'label_filter','target_move'],         context=context)[0])

        return self.pool['report'].get_action(cr, uid, [], 'account.report_financial', data=data, context=context)

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Mai 16
8576
3
Feb. 24
13071
1
Dez. 24
4478
1
Nov. 16
9894
1
Feb. 16
4110