Odoo Help

0

0
1 答案
0
Luis Masuelli 厄瓜多尔
2015/9/18 下午5:09

Found it :D.

Assuming your report has the Service Name "your.sister" (which is **not** necessarily the xml id, but the respective field), you can run the following code:

    obj = netsvc.LocalService('report.your.sister')
    (xml_content, format) = obj.create(cr, uid, [], datas, context)

Where:

  • The name in report_name (in the returned-dict way) is the name to be used as argument for LocalService, except that you **must** prefix it with "report.".

  • The dictionary passed as value for 'datas' key is the exact same it will be used in the 4th argument (the one which I conveniently named `datas`).

  • The returned value will be the file content and the file format.

1 备注
Prasanth ks 印度
2015/9/19 上午2:28

its new idea to me... thanks bro

提问
Writer
Keep Informed
1 关注者(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