Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4885 Lượt xem

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? 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

sure did, works like a charm!

cheers!

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 9 19
11886
0
thg 3 15
13555
0
thg 3 25
1907
1
thg 3 25
2048
0
thg 3 25
1283