跳至内容
菜单
此问题已终结
3 回复
5959 查看

The user can fill in the purchase information (address, email), but in his it completes this step and go to the payment of the error 500: Internal Server Error. Below is the error log. Tranks you!!!

2017-04-26 20:17:57,775 12162 ERROR cotapecas odoo.addons.website.models.ir_http: 500 Internal Server Error:

Traceback (most recent call last):

  File "/opt/odoo/addons/website/models/ir_http.py", line 264, in _handle_exception

    response = super(Http, cls)._handle_exception(exception)

  File "/opt/odoo/odoo/addons/base/ir/ir_http.py", line 169, in _handle_exception

    return request._handle_exception(exception)

  File "/opt/odoo/odoo/http.py", line 766, in _handle_exception

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

  File "/opt/odoo/odoo/addons/base/ir/ir_http.py", line 195, in _dispatch

    result = request.dispatch()

  File "/opt/odoo/odoo/http.py", line 825, in dispatch

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

  File "/opt/odoo/odoo/http.py", line 331, in _call_function

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

  File "/opt/odoo/odoo/service/model.py", line 119, in wrapper

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

  File "/opt/odoo/odoo/http.py", line 324, in checked_call

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

  File "/opt/odoo/odoo/http.py", line 933, in __call__

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

  File "/opt/odoo/odoo/http.py", line 504, in response_wrap

    response = f(*args, **kw)

  File "/opt/addons/odoo-brasil/br_website_sale/controllers/main.py", line 86, in address

    result = super(L10nBrWebsiteSale, self).address(**kw)

  File "/opt/odoo/odoo/http.py", line 504, in response_wrap

    response = f(*args, **kw)

  File "/opt/odoo/addons/website_sale/controllers/main.py", line 583, in address

    partner_id = self._checkout_form_save(mode, post, kw)

  File "/opt/odoo/addons/website_sale/controllers/main.py", line 503, in _checkout_form_save

    Partner.browse(partner_id).sudo().update(checkout)

  File "/opt/odoo/odoo/models.py", line 4995, in update

    record[name] = value

  File "/opt/odoo/odoo/models.py", line 5198, in __setitem__

    return self._fields[key].__set__(self, value)

  File "/opt/odoo/odoo/fields.py", line 908, in __set__

    record.write({self.name: write_value})

  File "/opt/odoo/odoo/addons/base/res/res_partner.py", line 498, in write

    result = result and super(Partner, self).write(vals)

  File "/opt/odoo/addons/mail/models/mail_thread.py", line 274, in write

    result = super(MailThread, self).write(values)

  File "/opt/odoo/odoo/models.py", line 3553, in write

    self._write(old_vals)

  File "/opt/odoo/odoo/models.py", line 3699, in _write

    self._validate_fields(vals)

  File "/opt/odoo/odoo/models.py", line 1077, in _validate_fields

    raise ValidationError("%s\n\n%s" % (_("Error while validating constraint"), tools.ustr(e)))

ValidationError: (u'Error while validating constraint\n\nA opera\xe7\xe3o solicitada n\xe3o pode ser conclu\xedda devido a restri\xe7\xf5es de seguran\xe7a. Por favor, contacte o administrador do sistema. \n(Tipo de documento: res.country, Operation: read)\nNone', None)

形象
丢弃
最佳答案

You are accessing security restricted objects from controller where authentication would be public, so you must use ORM methods as administrator or superuser. So in your case use:

env['x.y'].sudo().browse() / your method


形象
丢弃
最佳答案

post Your code. It may be Access rights error (may be due to user rights) (or) import -->  from odoo.exceptions import UserError, ValidationError. if u using custom module. Or else Put Uall for that DB..

形象
丢弃
编写者 最佳答案


Many thanks for the comments! I discovered the error. It was something related to the module website_quote, I updated and returned to normal operation.

形象
丢弃
相关帖文 回复 查看 活动
1
2月 19
7684
0
12月 21
1720
2
10月 20
7670
4
4月 17
4905
1
5月 24
1561