Help

3

Open PDF format report file name is not proper ?

Avatar
Nirav Jani

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
2 Answers
2
Avatar
Piyush Suva
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
1
Avatar
Jadav Vishal V
Best Answer

Yes, you are rights, it's working.

Avatar
Discard