Community mailing list archives

community@mail.odoo.com

Re: AW: 404 when getting CSS for qweb report

by
Camptocamp France SAS, Alexandre Fayolle - Camptocamp
- 05/05/2016 09:11:35
Thanks, but this has nothing to do with web.base.url and report.url.

Digging further, it appears that this one report for some weird reason
cause wkhtmltopdf to query back Odoo without specifying a database. This
makes the /web/content route unavailable, and produces a 404.

I'm currently investigating why this report is behaving in such a
strange way.

Alexandre


On 05/05/2016 14:57, Eric Caudal wrote:
> You might need a mix of web.base.url = http://127.0.0.1:8069 and
> report.url=http://127.0.0.1:8069
> 
> --
> *Eric Caudal* /[Founder and CEO]/
> Skype: elico.corp. Phone: + 86 186 2136 1670 (Cell), + 86 21 6211
> 8017/27/37 (Office)
> *Elico Shanghai* (Hong Kong/Shenzhen/Singapore)
>  /*Odoo Gold Partner, best Odoo Partner 2014
> for APAC*/
> On 05/05/2016 07:57 PM, Wolfgang Taferner wrote:
>>
>> Hi Alexandre,
>>
>> 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 ;-)
>>
>>  
>>
>> Regards,
>>
>> Wolfgang
>>
>> *----------------------------------------------*
>>
>> Mag. Wolfgang Taferner
>> CEO, Founder, Odoo Consultant/Developer
>>
>> **
>>
>> * *
>>
>> *WT-IO-IT GmbH *
>>
>> We Trust in Open IT
>>
>> **
>>
>> Mooslackengasse 17
>>
>> 1190 Wien
>>
>>  
>>
>> *Telefon*: +43 (1) 23060 - 4095
>>
>> *Fax*: +43 (1) 23060 - 4096
>>
>> *Website*: https://www.wt-io-it.at
>> 
>>
>>  
>>
>> *FN:* 427075b (Handelsgericht Wien)
>>
>> _______________________________________________
>> Mailing-List: https://www.odoo.com/groups/community-59
>> Post to: mailto:community@mail.odoo.com
>> Unsubscribe: https://www.odoo.com/groups?unsubscribe
>>
> 
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-59
> Post to: mailto:community@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe
> 


-- 
Alexandre Fayolle
Chef de Projet
Tel : +33 4 58 48 20 30

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac Cedex
http://www.camptocamp.com