Odoo Help

1

0
3 答案
3
头像

Manish Kumar Bohra 印度

--Manish Kumar Bohra--
10998
| 6 5 10
Bikaner, 印度
--Manish Kumar Bohra--


Manish Kumar Bohra 印度
2018/9/25 上午1:42

Hello

You Can try this i hope it's help you.

 
@api.multi
def printWOImportAction(self):
return self.env.ref('Modulename.ReportActionID').report_action(self)

Thanks

0
Tintuk Tomin 印度
2018/9/25 上午5:01
return {
'type': 'ir.actions.report',
'report_name':'account.report_invoice_document',
'model':'account.invoice',
'report_type':"qweb-pdf"
  } 

There was an extra , after 'report_type':"qweb-pdf" and also the report will be generated only according to the template xml which you are created. And the template is not shown in your question.
0
头像

Mitul Shingala 印度

--Mitul Shingala--
5305
| 6 4 9
Vadodara, Gujarat, 印度
--Mitul Shingala--

Odoo Developer

Mitul Shingala 印度
2018/9/25 上午4:43

Hello, 

see this below. this type of example already exist into sale order.

    @api.multi
    def print_report(self):
        return self.env.ref('<modulename.report_action_id>').report_action(self)
提问
Keep Informed
2 关注者(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now