Skip to Content
Menu
This question has been flagged
1 Reply
1304 Views

I want to create a pdf report but this xml file cause me error 

raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/aadil/src/odoo/odoo/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/aadil/src/odoo/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
odoo\\.tools\\.convert\\.ParseError:\\ while\\ parsing\\ /home/aadil/src/custom/test_school/report/student_report\\.xml:3,\\ somewhere\\ inside
"\ rel="ugc">ir\.actions\.report">
\ Student\ Record\
test\.student
qweb\.pdf
student_record\.personal
student_record\.personal
student_record\.personal

report


Error\ ScreenShot\ Link\ \(if\ not\ properly\ pasted\) https://imgur.com/a/1yKqE7k

Kindly help me what is wrong.. I am following YT video.. If someone can refer me some tutorial as I am beginner to odoo

Avatar
Discard
Best Answer

Hi,

<record id="action_for_report" model="ir.actions.report">


<field name="name">Name Of The Report</field>


<field name="model">sale.order</field>


<field name="report_type">qweb-pdf</field>


<field name="report_file">custom_module_name.template_id</field>


<field name="report_name">custom_module_name.template_id</field>


<field name="binding_model_id" ref="sale.model_sale_order"/>


<field name="binding_type">report</field>


</record>


"model"- Specify the model name.
"binding_model_id" : If you want to print the report using the Print Action button inside a view, then you can bind the action with the corresponding model.

Syntax: if the model is sale.order then ‘model_sale_order’.

Try to refer the following blog for creating a basic pdf report in odooV15

https://www.cybrosys.com/blog/how-to-create-a-pdf-report-in-odoo-15

Regards

Avatar
Discard
Related Posts Replies Views Activity
1
Feb 24
2148
1
Jul 23
955
1
May 24
755
1
Apr 24
457
0
Apr 24
551