kfx2007

Odoo里判断wkhtmlpdf是否安装的代码在 openerp/tools/misc.py 文件中:

def find_in_path(name):
    path = os.environ.get(\'PATH\', os.defpath).split(os.pathsep)
    if config.get(\'bin_path\') and config[\'bin_path\'] != \'None\':
        path.append(config[\'bin_path\'])
    try:
        return which(name, path=os.pathsep.join(path))
    except IOError:
        return None

 

可能的情况是你虽然安装了wkhtmlpdf插件,但有放在PATH中。

 

sudo cp /usr/local/bin/wkhtmltopdf /usr/bin/

 

然后重启odoo服务。

分类:

技术点:

相关文章:

  • 2022-02-08
  • 2022-12-23
  • 2021-08-20
  • 2021-07-26
  • 2021-08-29
  • 2022-03-04
  • 2022-12-23
  • 2021-12-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
  • 2022-01-02
  • 2021-05-20
  • 2022-12-23
相关资源
相似解决方案