Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
4890 มุมมอง

I have installed wkhtmltopdf/image on my Webfaction virtual environment.

It sits nicely in /usr/local/bin

[josesapelli@web452 bin]$ wkhtmltopdf --version

wkhtmltopdf 0.12.1 (with patched qt)

However after a server restart Odoo still can not find it.

In some tutorials i read that moving it to /usr/bin/wkhtmltopdf should fix that, however on webfaction you dont have permission for that.

In another post on the forum here they mention you can set the variable in the admin settings, -> configuration -> parameters..

but in my admin there is no parameters in configuration..


So my question is, how  can i point odoo 8 (using wsgi)  to the right location of wkhtmltopdf? 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

in your wsgi startup script (normally this one ) add at the beginning:

import os
os.environ['PATH'] += os.pathsep + '/usr/local/bin'

hope this helps.

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

sure did, works like a charm!

cheers!

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ย. 19
11890
0
มี.ค. 15
13557
0
มี.ค. 25
1911
1
มี.ค. 25
2058
0
มี.ค. 25
1285