Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

OpenERP 8 Email / Print Quote Error

By
Marty Langen
on 4/4/14, 11:43 AM 1,582 views

Hi there,

We are getting the following error when we try and email a quote... we have installed the webkit module... we don't know where we are going wrong.

OpenERP Server Error Traceback (most recent call last): File "/opt/openerp/openerp-8.0dev-20140403-120138/openerp/http.py", line 434, in dispatch response["result"] = self._call_function(*self.params) File "/opt/openerp/openerp-8.0dev-20140403-120138/openerp/http.py", line 295, in _call_function return checked_call(self.db, *args, *kwargs) File "/opt/openerp/openerp-8.0dev-20140403-120138/openerp/service/model.py", line 113, in wrapper return f(dbname, args, *kwargs) File "/opt/openerp/openerp-8.0dev-20140403-120138/openerp/http.py", line 292, in checked_call return self.endpoint(a, *kw) File "/opt/openerp/openerp-8.0dev-20140403-120138/openerp/http.py", line 635, in __call__ return self.method(args, *kw) File "/opt/openerp/openerp-8.0dev-20140403-120138/openerp/http.py", line 338, in response_wrap response = f(args, *kw) File "/opt/openerp/openerp-8.0dev-20140403-120138/openerp/addons/web/controllers/main.py", line 1226, in call_kw return self._call_kw(model, method, args, kwargs) File "/opt/openerp/openerp-8.0dev-20140403-120138/openerp/addons/web/controllers/main.py", line 1218, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, args, *kwargs) File "/opt/openerp/openerp-8.0dev-20140403-120138/openerp/addons/email_template/wizard/mail_compose_message.py", line 53, in default_get res.get('model'), res.get('res_id', context.get('active_id')), context=context File "/opt/openerp/openerp-8.0dev-20140403-120138/openerp/addons/email_template/wizard/mail_compose_message.py", line 99, in onchange_template_id values = self.generate_email_for_composer_batch(cr, uid, template_id, [res_id], context=context)[res_id] File "/opt/openerp/openerp-8.0dev-20140403-120138/openerp/addons/email_template/wizard/mail_compose_message.py", line 174, in generate_email_for_composer_batch template_values = self.pool.get('email.template').generate_email_batch(cr, uid, template_id, res_ids, fields=fields, context=context) File "/opt/openerp/openerp-8.0dev-20140403-120138/openerp/addons/email_template/email_template.py", line 452, in generate_email_batch result, format = self.pool['report'].get_pdf(cr, uid, [res_id], report_service, context=ctx), 'pdf' File "/opt/openerp/openerp-8.0dev-20140403-120138/openerp/addons/report/models/report.py", line 376, in get_pdf paperformat, specific_paperformat_args, save_in_attachment File "/opt/openerp/openerp-8.0dev-20140403-120138/openerp/addons/report/models/report.py", line 504, in _generate_wkhtml_pdf stderr=subprocess.PIPE) File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__ errread, errwrite) File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory

0
codefans
On 8/3/14, 10:12 PM

you should update wkhtmltopdf  in server.

 

look this code in report.py:  

maybe you should change one line in this code

"""Check the presence of wkhtmltopdf and return its version."""
wkhtmltopdf_state = 'install'
try:
    process = subprocess.Popen(
        ['wkhtmltopdf', '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE
    )
except OSError:
    _logger.error('You need wkhtmltopdf to print a pdf version of the reports.')
else:
    out, err = process.communicate()
    version = out.split(' ')[1]  #-----------this line 
    if LooseVersion(version) < LooseVersion('0.12.0'):
        _logger.warning('Upgrade wkhtmltopdf to (at least) 0.12.0')
        wkhtmltopdf_state = 'upgrade'
    wkhtmltopdf_state = 'ok'

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 4/4/14, 11:43 AM
Seen: 1582 times
Last updated: 3/16/15, 8:10 AM