Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
7615 มุมมอง

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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)

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 16
8585
Close wizard after print report แก้ไขแล้ว
3
ก.พ. 24
13077
1
ธ.ค. 24
4481
set default user แก้ไขแล้ว
1
พ.ย. 16
9898
1
ก.พ. 16
4117