Community mailing list archives
AW: 404 when getting CSS for qweb reportby
I guess you know exactly what is happening on the server when you print, but I give you and all the people who are interested some hints about my experience and research for the usage of QWeb PDF reports especially running Odoo behind a proxy.
As the report creation request is triggered directly on the server you might have issues with the cookies (session) saved in your browser/client (it is just not matching your request and you are not authenticated)
So, what I did to circumvent all the issues which can happen…
I have setup a NGINX on my backend server with the exact same domain I use for the frontend server. Depending on which ports you listen, it could be simply local port 80 or 443 and redirect them to port 8069 or any port you use to run Odoo on this server as werkzeug is already handling this port without domain flavor.
Then I did a manual hosts entry on my backend machine to point to 127.0.0.1 for the configured domain and finally as Paul said I pointed with the report.url parameter to http(s)://sub.domain.name and it should match the Cookie domain as said before.
If you have configured it like that I think it should work as expected.
I hope this will help you to succeed and overcome the issues with IMHO way too complex behavior of the whtmltopdf integration and handling.
There might be easier settings and maybe it is buggy on Odoo side but this worked well after I was digging myself for quite some time ;-)
Mag. Wolfgang Taferner
CEO, Founder, Odoo Consultant/Developer
We Trust in Open IT
Telefon: +43 (1) 23060 - 4095
Fax: +43 (1) 23060 - 4096
FN: 427075b (Handelsgericht Wien)