This question has been flagged
2 Replies
3352 Views

Hello,

I created report it is open from wizard on open PDF file

name like : report_name.pdf i want to change the name.

Thank in Advance.

 

Avatar
Discard
Best Answer

On Method of Wizard please add the name in return value.

for Example:

 def _print_report(self, cr, uid, ids, data, context=None):
        if context is None:
            context = {}
        data = self.pre_print_report(cr, uid, ids, data, context=context)
        data['form'].update(self.read(cr, uid, ids, ['initial_balance', 'filter', 'page_split', 'amount_currency'])[0])
        return {
                'type': 'ir.actions.report.xml',
                'report_name': 'product_ledger',
                'datas': data, 

              'name': 'My REPORT NAME'  #Give Your Report name Here.

        }

 

Avatar
Discard
Best Answer

Yes, you are rights, it's working.

Avatar
Discard