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.

5

Internal server error 500 in eCommerce module with payment method Wire Transfer [Odoo V8]

By
Yenthe
on 8/20/14, 3:46 AM 5,140 views

Hey guys

Today I've installed the eCommerce module on Odoo V8 (Version 9.0 Alpha 1) and set up payment methods.
I've installed these two modules:
- eCommerce
- Paypal Payment Acquirer
 

I go to the website, select a product and go to the cart checkout. I then select the payment method 'Wire Transfer' and click on the 'Pay Now' button.
After clicking on this button I get an error message, 500: Internal Server Error

Error message:
""'sale.order' object has no attribute 'validity_date'" while evaluating
'o.validity_date'" while evaluating
"translate_doc(doc_id, doc_model, 'partner_id.lang', 'sale.report_saleorder_document')"

QWeb error message:
Could not evaluate expression "translate_doc(doc_id, doc_model, 'partner_id.lang', 'sale.report_saleorder_document')"

Traceback:
Traceback (most recent call last):
  File "/home/administrator/odoo/addons/website/models/ir_http.py", line 180, in _handle_exception
    response = super(ir_http, self)._handle_exception(exception)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_http.py", line 104, in _handle_exception
    return request._handle_exception(exception)
  File "/home/administrator/odoo/openerp/http.py", line 558, in _handle_exception
    return super(HttpRequest, self)._handle_exception(exception)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_http.py", line 131, in _dispatch
    result = request.dispatch()
  File "/home/administrator/odoo/openerp/http.py", line 570, in dispatch
    r = self._call_function(**self.params)
  File "/home/administrator/odoo/openerp/http.py", line 311, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/administrator/odoo/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/administrator/odoo/openerp/http.py", line 308, in checked_call
    return self.endpoint(*a, **kw)
  File "/home/administrator/odoo/openerp/http.py", line 685, in __call__
    return self.method(*args, **kw)
  File "/home/administrator/odoo/openerp/http.py", line 360, in response_wrap
    response = f(*args, **kw)
  File "/home/administrator/odoo/addons/website_sale/controllers/main.py", line 741, in payment_validate
    composer_id = request.registry['mail.compose.message'].create(cr, SUPERUSER_ID, composer_values, context=email_ctx)
  File "/home/administrator/odoo/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/administrator/odoo/addons/mail/mail_message.py", line 801, in create
    newid = super(mail_message, self).create(cr, uid, values, context)
  File "/home/administrator/odoo/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/administrator/odoo/openerp/api.py", line 297, in old_api
    result = method(recs, *args, **kwargs)
  File "/home/administrator/odoo/openerp/models.py", line 3877, in create
    vals = self._add_missing_default_values(vals)
  File "/home/administrator/odoo/openerp/api.py", line 202, in wrapper
    return new_api(self, *args, **kwargs)
  File "/home/administrator/odoo/openerp/api.py", line 429, in new_api
    result = method(self._model, cr, uid, *args, **kwargs)
  File "/home/administrator/odoo/openerp/models.py", line 1808, in _add_missing_default_values
    defaults = self.default_get(cr, uid, list(missing_defaults), context)
  File "/home/administrator/odoo/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/administrator/odoo/addons/email_template/wizard/mail_compose_message.py", line 54, in default_get
    res.get('model'), res.get('res_id'), context=context
  File "/home/administrator/odoo/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/administrator/odoo/addons/email_template/wizard/mail_compose_message.py", line 101, in onchange_template_id
    values = self.generate_email_for_composer_batch(cr, uid, template_id, [res_id], context=context)[res_id]
  File "/home/administrator/odoo/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/administrator/odoo/addons/email_template/wizard/mail_compose_message.py", line 163, 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=ctx)
  File "/home/administrator/odoo/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/administrator/odoo/addons/email_template/email_template.py", line 488, in generate_email_batch
    result, format = self.pool['report'].get_pdf(cr, uid, [res_id], report_service, context=ctx), 'pdf'
  File "/home/administrator/odoo/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/administrator/odoo/addons/report/models/report.py", line 169, in get_pdf
    html = self.get_html(cr, uid, ids, report_name, data=data, context=context)
  File "/home/administrator/odoo/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/administrator/odoo/addons/report/models/report.py", line 154, in get_html
    return self.render(cr, uid, [], report.report_name, docargs, context=context)
  File "/home/administrator/odoo/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/administrator/odoo/addons/report/models/report.py", line 130, in render
    return view_obj.render(cr, uid, template, values, context=context)
  File "/home/administrator/odoo/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/administrator/odoo/addons/website/models/ir_ui_view.py", line 173, in render
    return super(view, self).render(cr, uid, id_or_xml_id, values=values, engine=engine, context=context)
  File "/home/administrator/odoo/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_ui_view.py", line 1075, in render
    return self.pool[engine].render(cr, uid, id_or_xml_id, qcontext, loader=loader, context=context)
  File "/home/administrator/odoo/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 247, in render
    return self.render_node(self.get_template(id_or_xml_id, qwebcontext), qwebcontext)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 289, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 310, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 287, in render_node
    result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 405, in render_tag_call
    d[0] = self.render_element(element, template_attributes, generated_attributes, d)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 310, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 287, in render_node
    result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 395, in render_tag_foreach
    ru.append(self.render_element(element, template_attributes, generated_attributes, copy_qwebcontext))
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 310, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 287, in render_node
    result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 351, in render_tag_raw
    inner = self.eval_str(template_attributes["raw"], qwebcontext)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 208, in eval_str
    val = self.eval(expr, qwebcontext)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 200, in eval
    raise_qweb_exception(message="Could not evaluate expression %r" % expr, expression=expr, template=template)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 197, in eval
    return qwebcontext.safe_eval(expr)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 80, in safe_eval
    return eval(expr, None, locals_dict, nocopy=True, locals_builtins=True)
  File "/home/administrator/odoo/openerp/tools/safe_eval.py", line 312, in safe_eval
    return eval(c, globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/home/administrator/odoo/addons/report/models/report.py", line 113, in translate_doc
    return view_obj.render(cr, uid, template, qcontext, context=ctx)
  File "/home/administrator/odoo/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/administrator/odoo/addons/website/models/ir_ui_view.py", line 173, in render
    return super(view, self).render(cr, uid, id_or_xml_id, values=values, engine=engine, context=context)
  File "/home/administrator/odoo/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_ui_view.py", line 1075, in render
    return self.pool[engine].render(cr, uid, id_or_xml_id, qcontext, loader=loader, context=context)
  File "/home/administrator/odoo/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 247, in render
    return self.render_node(self.get_template(id_or_xml_id, qwebcontext), qwebcontext)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 289, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 310, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 287, in render_node
    result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 405, in render_tag_call
    d[0] = self.render_element(element, template_attributes, generated_attributes, d)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 310, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 289, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 310, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 289, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 310, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 287, in render_node
    result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 399, in render_tag_if
    if self.eval_bool(template_attributes["if"], qwebcontext):
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 231, in eval_bool
    return int(bool(self.eval(expr, qwebcontext)))
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 200, in eval
    raise_qweb_exception(message="Could not evaluate expression %r" % expr, expression=expr, template=template)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 197, in eval
    return qwebcontext.safe_eval(expr)
  File "/home/administrator/odoo/openerp/addons/base/ir/ir_qweb.py", line 80, in safe_eval
    return eval(expr, None, locals_dict, nocopy=True, locals_builtins=True)
  File "/home/administrator/odoo/openerp/tools/safe_eval.py", line 312, in safe_eval
    return eval(c, globals_dict, locals_dict)
  File "", line 1, in <module>
QWebException: ""'sale.order' object has no attribute 'validity_date'" while evaluating
'o.validity_date'" while evaluating
"translate_doc(doc_id, doc_model, 'partner_id.lang', 'sale.report_saleorder_document')"


Could anybody tell me what is wrong or how I can fix this please? I can't seem to find a direct solution for this problem.

Yenthe

3
George Rodopoulos
On 8/24/14, 4:49 PM

I followed your steps using the most recent build on runbot and I can reproduce the error you reported. So, this may be a bug which needs to be fixed in source code level.

Maybe somebody should add an issue and/or a pull request on github following these guidelines.   Version 9.0 Alpha 1 is not stable as it is in 'Alpha' state so it is expected to find some bugs.

I've put up a error report on Github at https://github.com/odoo/odoo/issues/1956 Hopefully somebody will fix this soon, as it is a rather big problem.

Yenthe
on 8/25/14, 1:54 AM
2
Andy Ng
On 8/29/14, 3:07 AM

my Contact Us form submission was working until now... I'm getting a similar 500: Internal Error message...

2
Sajad KK
On 9/4/14, 7:55 AM

Quick Fix:

sale/views/report_saleorder.xml

Comment or Remove

<div t-if="o.validity_date" class="col-xs-3">
        <strong>Validity Date:</strong>
        <p t-field="o.validity_date"/>
 </div>

and upgrade Sale module. Thats it!

0
Nicolás Visús
On 8/24/14, 1:16 PM

Hi Yenthe, did you solve it? I have the same issue

Hi Nicolás, I haven't fixed this personally as this is rather a programming error, made by a developer. Fixing it myself wouldn't help anybody except myself. I've made a Github bug report here: https://github.com/odoo/odoo/issues/1956 So lets hope somebody fixes this soon!

Yenthe
on 8/25/14, 1:55 AM

Please be sure that wkhtmltopdf is: 1) installed 2) in the right folder /usr/bin

Franz Palfrader
on 8/29/14, 7:11 AM

Franz, this has nothing to do with wkhtmltopdf. Secondly I have it installed and under the /usr/bin, which double proves this has nothing to do with this error.

Yenthe
on 9/1/14, 5:26 AM

ant the Payment Acquirers Form Button Template is "transfer_acquirer_button" ?

Franz Palfrader
on 9/1/14, 7:35 AM

same thing here in oddo 8.0 from the bitnami VM, I can't solve it. Any additional hints?

M. Höppner
on 10/19/14, 7:19 AM

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

1 follower(s)

Stats

Asked: 8/20/14, 3:46 AM
Seen: 5140 times
Last updated: 3/14/16, 12:51 PM