Jasperreports_odoo
Jasperreports_odoo copied to clipboard
Permission error
Hello! I seem to be having issue with the reporting module, and whatever I do, i keep getting this error. How or where do i fix this?
File "/opt/odoo/odoo-server/odoo/http.py", line 835, in dispatch
r = self._call_function(**self.params)
File "/opt/odoo/odoo-server/odoo/http.py", line 346, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo-server/odoo/service/model.py", line 98, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo-server/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/odoo-server/odoo/http.py", line 941, in __call__
return self.method(*args, **kw)
File "/opt/odoo/odoo-server/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/custom/addons/jasper_reports/controllers/main.py", line 58, in report_routes
context).render_jasper(docids, data=data)
File "/opt/odoo/custom/addons/jasper_reports/models/report_xml.py", line 186, in render_jasper
jasper = r.execute()
File "/opt/odoo/custom/addons/jasper_reports/JasperReports/jasper_report_config.py", line 174, in execute
data_file, output_file, sub_report_data_files)
File "/opt/odoo/custom/addons/jasper_reports/JasperReports/jasper_report_config.py", line 260, in execute_report
connection_parameters, self.report_path, output_file, parameters)
File "/opt/odoo/custom/addons/jasper_reports/JasperReports/jasper_server.py", line 115, in execute
self.start()
File "/opt/odoo/custom/addons/jasper_reports/JasperReports/jasper_server.py", line 105, in start
with open(self.pidfile, 'w') as f:
PermissionError: [Errno 13] Permission denied: 'odoo-jasper.pid'
@hiren-serpentcs
@docimin
You need to give the write permission to the jasper_reports
module
Hey @hiren-serpentcs, thank you, but do you mean with CHMOD 775 for example? Or where exactly? Linux side or Odoo side?
@docimin
From the Linux side, you need to give the 777 permission (chmod 777 <PATH TO MODULE>/jasper_reports
).
Hey @hiren-serpentcs, i have done this, still will not work.
For reference, the .jrxml is completely empty and has nothing in it. And it does not even print out a blank page, just gives an "invisible error" instead
Hello, we are getting this error message also, we have tried to giove permission to the files, the folder, reassing then to the odoo group but still get the same message, please help us, this is generating a lot of pressure from customers, Thank you Jay for your sharing this!!
Hi, sorry about the insistence on this issue, but we have now a lot of reports that were working and now are not. How can we get help on this issue? Thanks
hi, also got the same problem, 777 permissions were given but does not work
im also facing this issue, any help? @hiren-serpentcs
@rmcasado i solve this by create odoo-jasper.pid at another folder and give it permission (sudo chmod 777 /[PATH]/odoo-jasper.pid) and then edit your odoo config file and add this to your line
jasperpid = /[Your PATH]/odoo-jasper.pid
@baydevincent thanks !!!! Now I got a connection error :(
odoo.addons.jasper_reports.JasperReports.jasper_server: EXCEPTION: [Errno 111] Connection refused (111, 'Connection refused')
@rmcasado i got the same issue, i trying to solve that or maybe you can post that as new issue
@baydevincent finally found the problem, java directory was not right copied, only java classes in com and nothing in lib, after copied could run my reports again
@rmcasado may i ask what java version do you use? because i still got the refused issue
@baydevincent
Hi, my configuraion :
- Ubuntu 20.04.6 LTS
- Odoo 14
- Python 3.9
- Java 11 - /usr/lib/jvm/java-11-amazon-corretto
Also works with
/jasper_reports/java
chmod 777 -R
- odoo14.conf
server_wide_modules = base,web,jasper_load
jasperpid=
/jasper_reports/JasperReports/odoo-jasper.pid
chmod 777
Modified jasper_server to use jasperpid #with open(self.pidfile, 'w') as f: with open(os.path.join(self.path(), self.pidfile), 'w') as f: