Yannick Tivisse 7cc14b15f8 [FIX] website_portal_purchase: Fix access right error when loading my/home/
Purpose
=======

Currently, loading my/home without purchase manager access rights returns a 403

Traceback (most recent call last):
  File "/home/accounts/src/odoo/saas-16/addons/website/models/ir_http.py", line 273, in _handle_exception
    response = super(Http, cls)._handle_exception(exception)
  File "/home/accounts/src/odoo/saas-16/odoo/addons/base/ir/ir_http.py", line 168, in _handle_exception
    return request._handle_exception(exception)
  File "/home/accounts/src/odoo/saas-16/odoo/http.py", line 763, in _handle_exception
    return super(HttpRequest, self)._handle_exception(exception)
  File "/home/accounts/src/odoo/saas-16/odoo/addons/base/ir/ir_http.py", line 194, in _dispatch
    result = request.dispatch()
  File "/home/accounts/src/odoo/saas-16/odoo/http.py", line 822, in dispatch
    r = self._call_function(**self.params)
  File "/home/accounts/src/odoo/saas-16/odoo/http.py", line 341, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/accounts/src/odoo/saas-16/odoo/service/model.py", line 102, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/accounts/src/odoo/saas-16/odoo/http.py", line 334, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/accounts/src/odoo/saas-16/odoo/http.py", line 930, in __call__
    return self.method(*args, **kw)
  File "/home/accounts/src/odoo/saas-16/odoo/http.py", line 514, in response_wrap
    response = f(*args, **kw)
  File "/home/accounts/src/custom/private/openerp_enterprise/controllers/main.py", line 1673, in account
    response = super(website_account, self).account(**kw)
  File "/home/accounts/src/odoo/saas-16/odoo/http.py", line 514, in response_wrap
    response = f(*args, **kw)
  File "/home/accounts/src/odoo/saas-16/addons/website_portal/controllers/main.py", line 67, in account
    values = self._prepare_portal_layout_values()
  File "/home/accounts/src/enterprise/saas-16/website_contract/controllers/main.py", line 24, in _prepare_portal_layout_values
    values = super(website_account, self)._prepare_portal_layout_values()
  File "/home/accounts/src/odoo/saas-16/addons/website_portal_purchase/controllers/website_portal.py", line 23, in _prepare_portal_layout_values
    ('state', 'in', ['purchase', 'done', 'cancel'])
  File "/home/accounts/src/odoo/saas-16/odoo/models.py", line 1390, in search_count
    res = self.search(args, count=True)
  File "/home/accounts/src/odoo/saas-16/odoo/models.py", line 1413, in search
    res = self._search(args, offset=offset, limit=limit, order=order, count=count)
  File "/home/accounts/src/odoo/saas-16/odoo/models.py", line 3676, in _search
    self.sudo(access_rights_uid or self._uid).check_access_rights('read')
  File "/home/accounts/src/odoo/saas-16/odoo/models.py", line 2793, in check_access_rights
    return self.env['ir.model.access'].check(self._name, operation, raise_exception)
  File "<string>", line 2, in check
  File "/home/accounts/src/odoo/saas-16/odoo/tools/cache.py", line 87, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/home/accounts/src/odoo/saas-16/odoo/addons/base/ir/ir_model.py", line 1175, in check
    raise AccessError(msg % msg_params)
AccessError: (u'Sorry, you are not allowed to access this document. Only users with the following access level are currently allowed to do that:\n- Purchases/User\n\t- Purchases/Manager\n\t- Inventory/User\n\t- Accounting & Finance/Billing\n\t- Technical Settings/Billing Read-Only\n\t- Other Extra Rights/Portal\n\n(Document model: purchase.order)', None)

Specification
=============

Count the number of purchase orders as a superuser.
2017-12-26 12:59:11 +01:00
2017-07-25 12:26:50 +02:00
2015-09-08 15:45:09 +02:00
2015-09-08 17:58:38 +02:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

If you are a developer you may type the following command at your terminal:

wget -O- https://raw.githubusercontent.com/odoo/odoo/master/setup/setup_dev.py | python

Then follow the developer tutorials

For Odoo employees

To add the odoo-dev remote use this command:

$ ./setup/setup_dev.py setup_git_dev

To fetch odoo merge pull requests refs use this command:

$ ./setup/setup_dev.py setup_git_review
S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%