Skip to Content
Menu
This question has been flagged
3 Replies
6338 Views

Hello.

After an order, just after the press of "pay now" button (only payment method is wire transfer) i got Error 500. The problem is that i get NO TRACEBACK, so I don't actually know which view to modify.

http://s15.postimg.org/i5my9ey8a/Cattura.jpg

Do you know any solution? At least to find out which view is involved and rewrite it.
Thank you

Avatar
Discard
Author Best Answer

PROBLEM SOLVED!


I report my solution, willing to help anyone still having this issue.

1) Go in your /var/log/odoo/odoo_log_file and check the last lines
2) You'll probably find out a missing function in your payment.py file.
3) sudo nano /opt/odoo/odoo/addons/website_sale/models/payment.py
4) find the missing function: it is somewhere called, but never defined.
5) comment it
6) problem solved

Avatar
Discard
Best Answer

just found solution - in my case installation of wkhtmltopdf solved problem:


  wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-jessie-amd64.deb

  dpkg -i wkhtmltox-0.12.2.1_linux-jessie-amd64.deb

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


regards

Tomasz


========


Hello,


Just to confirm - this problem seems to be 'standard' one, I am facing it as well; in my case it is fresh odoo 9 installatin, I've so far:

- created product (sale module)

- created event (events) connected to product created in step above

- tried to sell ticket to the event

Problem is visible in all possible cases: anonymous web access/client access, acces with admin account and access with regular user account. If anyoune would find out where probem is and could share - I would appreciate. Related entry from odoo-server.log is below, I will try to understand it, but maybe someone is more familiar with python?..


=====

2015-10-01 20:31:12,815 337 INFO mundomio werkzeug: 89.78.255.67 - - [01/Oct/2015 20:31:12] "POST /shop/payment/transaction/1 HTTP/1.1" 200 -

2015-10-01 20:31:12,929 337 INFO mundomio openerp.addons.payment_transfer.controllers.main: Beginning form_feedback with post data {'amount': u'69.0',

'csrf_token': u'9380d57d500f50cb8d383e6cd08f71803c03940eo1443735064',

'currency': u'PLN',

'reference': u'SO002',

'return_url': u'/shop/payment/validate'}

2015-10-01 20:31:12,935 337 INFO mundomio openerp.addons.payment_transfer.models.payment_acquirer: Validated transfer payment for tx SO002: set as pending

2015-10-01 20:31:13,053 337 INFO mundomio openerp.addons.base.ir.ir_qweb: 'doc.partner_id.lang' is not a valid language code, is an empty field or is not installed, falling back to en_US

2015-10-01 20:31:13,242 337 INFO mundomio werkzeug: 89.78.255.67 - - [01/Oct/2015 20:31:13] "POST /payment/transfer/feedback HTTP/1.1" 500 -

2015-10-01 20:31:13,267 337 ERROR mundomio werkzeug: Error on request:

Traceback (most recent call last):

File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi

execute(self.server.app)

File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute

application_iter = app(environ, start_response)

File "/usr/lib/python2.7/dist-packages/openerp/service/server.py", line 245, in app

return self.app(e, s)

File "/usr/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 184, in application

return application_unproxied(environ, start_response)

File "/usr/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 170, in application_unproxied

result = handler(environ, start_response)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1416, in __call__

return self.dispatch(environ, start_response)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1390, in __call__

return self.app(environ, start_wrapped)

File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 588, in __call__

return self.app(environ, start_response)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1580, in dispatch

result = ir_http._dispatch()

File "/usr/lib/python2.7/dist-packages/openerp/addons/website_sale/models/ir_http.py", line 12, in _dispatch

return super(IrHttp, self)._dispatch()

File "/usr/lib/python2.7/dist-packages/openerp/addons/utm/models/ir_http.py", line 13, in _dispatch

response = super(ir_http, self)._dispatch()

File "/usr/lib/python2.7/dist-packages/openerp/addons/website/models/ir_http.py", line 190, in _dispatch

resp = super(ir_http, self)._dispatch()

File "/usr/lib/python2.7/dist-packages/openerp/addons/web_editor/models/ir_http.py", line 16, in _dispatch

return super(ir_http, self)._dispatch()

File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_http.py", line 176, in _dispatch

return self._handle_exception(e)

File "/usr/lib/python2.7/dist-packages/openerp/addons/website/models/ir_http.py", line 239, in _handle_exception

return super(ir_http, self)._handle_exception(exception)

File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_http.py", line 147, in _handle_exception

return request._handle_exception(exception)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 737, in _handle_exception

return super(HttpRequest, self)._handle_exception(exception)

File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_http.py", line 172, in _dispatch

result = request.dispatch()

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 768, in dispatch

r = self._call_function(**self.params)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 315, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper

return f(dbname, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 308, in checked_call

result = self.endpoint(*a, **kw)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 887, in __call__

return self.method(*args, **kw)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 465, in response_wrap

response = f(*args, **kw)

File "/usr/lib/python2.7/dist-packages/openerp/addons/payment_transfer/controllers/main.py", line 21, in transfer_form_feedback

request.registry['payment.transaction'].form_feedback(cr, uid, post, 'transfer', context)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 223, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/website_sale/models/payment.py", line 28, in form_feedback

self.pool['sale.order'].force_quotation_send(cr, SUPERUSER_ID, [tx.sale_order_id.id], context=context)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 223, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 345, in old_api

result = method(recs, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/sale/sale.py", line 372, in force_quotation_send

order.with_context(email_ctx).message_post_with_template(email_ctx.get('default_template_id'))

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 221, in wrapper

return new_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/mail/models/mail_thread.py", line 1686, in message_post_with_template

update_values = composer.onchange_template_id(template_id, composition_mode, self._name, res_id)['value']

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 221, in wrapper

return new_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/mail/wizard/mail_compose_message.py", line 348, in onchange_template_id

values = self.generate_email_for_composer(template_id, [res_id])[res_id]

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 221, in wrapper

return new_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/mail/wizard/mail_compose_message.py", line 484, in generate_email_for_composer

template_values = self.env['mail.template'].with_context(tpl_partners_only=True).browse(template_id).generate_email(res_ids, fields=fields)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 221, in wrapper

return new_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/mail/models/mail_template.py", line 488, in generate_email

result, format = self.pool['report'].get_pdf(self._cr, self._uid, [res_id], report_service, context=Template._context), 'pdf'

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 223, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/report/models/report.py", line 232, in get_pdf

context.get('set_viewport_size')

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 223, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/report/models/report.py", line 407, in _run_wkhtmltopdf

wkhtmltopdf = [_get_wkhtmltopdf_bin()] + command_args + local_command_args

File "/usr/lib/python2.7/dist-packages/openerp/addons/report/models/report.py", line 36, in _get_wkhtmltopdf_bin

return find_in_path('wkhtmltopdf')

File "/usr/lib/python2.7/dist-packages/openerp/tools/misc.py", line 57, in find_in_path

return which(name, path=os.pathsep.join(path))

File "/usr/lib/python2.7/dist-packages/openerp/tools/which.py", line 148, in which

raise IOError(ENOENT, '%s not found' % (mode & X_OK and 'command' or 'file'), file)

IOError: [Errno 2] command not found: 'wkhtmltopdf'

=====


regards

Tomasz

Avatar
Discard
Author

First of all thank you, I made some experiments so far and I ended up thinking that Odoo itself isn't the main problem. I have installed wkhtmltopdf and I can use it to create reports as report_saleorder_document. (I tried also to delete the website_sale module and install a fresh one) I checked the log file and I found these lines: File "/opt/odoo/odoo/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo/addons/website_sale/models/payment.py", line 28, in form_feedback self.pool['sale.order'].force_quotation_send(cr, SUPERUSER_ID, [tx.sale_order_id.id], context=context) AttributeError: 'sale.order' object has no attribute 'force_quotation_send' 2015-10-02 07:51:25,597 28143 INFO T18 werkzeug: 192.168.2.71 - - [02/Oct/2015 07:51:25] "POST /longpolling/poll HTTP/1.1" 200 - 2015-10-02 07:51:28,703 28143 INFO T18 werkzeug: 192.168.2.71 - - [02/Oct/2015 07:51:28] "POST /longpolling/poll HTTP/1.1" 200 - So maybe the problem is this "florce_quotation_send"