hieu 19549afdfc [FIX] project: fix access error when internal user access to project
form

Before this commit, when the internal user without any access rights to
the Project app and has a link to access to the form view of a "public"
project, an access error is occurred when that user when to access to
the
project form view. The reason is the `project.collaborator` is only
accessible to the user with an access right to the Project App and since
the number of collaborators displayed in a stat button is computed with
the access rights of the current user, the compute cannot be done for
the
internal user.

This commit executes the compute is superuser to prevent the user having
access error and to correctly access to the project form view as before.

Steps to reproduce the bug:
--------------------------
1) Create a Project P and add *Marc Demo* in the followers of that
project
   if the Privacy Visibility is "Invited internal users".
2) Remove the access rights to the Project app for *Marc Demo* user.
3) Copy the link to the form view of project P.
4) Log in as *Marc Demo*.
5) Paste the link copied in step 3 to access to the form view of project
P.

Actual Behavior:
---------------
An access error is occurred because the user without any access to the
Project app cannot access to the `project.collaborator` model.

Expected Behavior:
-----------------
The internal user without any access rights to the Project App should
access
to the form view of the project P.

closes odoo/odoo#96497

X-original-commit: c725c3fbb29eff49eff3794aff9d407175599e63
Signed-off-by: Xavier <xbo@odoo.com>
2022-07-21 12:29:47 +02:00
2022-07-21 11:20:46 +02:00
…
…
…
2021-10-07 17:59:53 +00:00
2022-01-14 15:44:52 +00: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, ...

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.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

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%