Commit Graph
11 Commits
Author SHA1 Message Date
Rémy Voet (ryv) 234db70d86 [IMP] *: Use the new API of _read_group for backend use
Part-of: odoo/odoo#110737
2023-04-19 21:58:27 +02:00
Raphael Collet 6ef3772847 [IMP] *: optimize code with search_fetch() and fetch()
closes odoo/odoo#112126

Related: odoo/enterprise#36782
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-03-05 15:12:57 +01:00
Audric Onockx (auon) 77493f9665 [IMP] project: add company restrictions on projects and their company
Add a constraint preventing the user from switching the project from company
if the partner doesn't belong to that company, and vice versa.

task-3126301

closes odoo/odoo#109464

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-24 21:10:38 +01:00
Vincent Schippefilt 05fc9a6733 [IMP] *: use _read_group instead of read_group
This commit modifies most of the usages of read_group and uses
_read_group instead. _read_group doesn't join automatically on the
many2one fields when no order_by is specified, making it more performant
when the "name" of the many2one is not relevant, which is the case for
most back-end cases

closes odoo/odoo#84908

Task-id: 2479334
Related: odoo/enterprise#24877
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-03-02 17:10:48 +00:00
alt-odoo 6e7d7f780d [FIX] project: allow regular user to share project in edit mode
If a user without Administration/Settings rights tries to share a
project in edit mode with a collaborator, an access rights error is
currently raised when creating the portal user. We should not create
any user instead, as there is a signup link sent to the partner anyway.
He can then set up his password without having to click on Reset
password, which was not user-friendly anyway.

closes odoo/odoo#84001

X-original-commit: 8de8c196a137f4ebbf67d7c7c83fee36f873f5c8
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-02-04 17:56:39 +00:00
Xavier BOL (xbo) a28cc6333a [REV] project: select access rights in project sharing
This reverts commit fc7778f8c512202dc3361d6b87be8c28b299c3c8 because of
a change in the spec.
The access mode are removed and replaced by this access mode for portal
user:
- read: the user goes to the classic portal view
- edit: the user is added as collaborator of the shared project and can
access to project sharing views.

To do this, the portal share is inherited by the project share wizard.
This new wizard can be open to share in readonly and open to share in
edit mode via 2 buttons in the form view of the shared project.
A new stat button is added to form view of project to see the
collaborators of this project. That is, the ones can access to the
project sharing views. The project manager will can remove or also add
new collaborators via the views in this stat button.

task-2379518

closes #73341
2021-08-26 16:57:23 +02:00
Goffin Simon c555cdca62 [FIX] point_of_sale, project: Smart buttons to count on partner
Unify the behavior for smart buttons on res.partner view form

Let's consider generic records R on a specific model M

- All the R of the children and archived children of a contact C must be counted in smart button of M
in the form of C

- Clicking on the smart button of a contact C must display all R of the children and archived
children of C

closes odoo/odoo#61241

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-11-03 10:30:44 +00:00
Christophe Simonis 1cc285ee30 [FIX] project: count tasks of child contacts
Allow to have the count to match the one you will get when clicking on
statbutton (behavior changed by #27118).

closes odoo/odoo#31081
2019-02-13 17:22:38 +00:00
Haresh Shyara bc3d55550c [IMP] project, project_issue: tasks and issue stat button on partner view
- Use read_group to compute task_count of res.partner
for performance sake
- When creating a task/issue from partner form view,
the default partner will be the current one (event if
the use case is rare)
- Only display button when count is greater than 0
- Also avoid default 'My Tasks' filter when coming from
partner form view
2016-12-06 15:39:06 +01:00
Gaurav Panchal 40fa74e3f5 [MIG] project: migration to new api except project.py 2016-06-30 14:41:21 +02:00
Ravi Gohil 1449a1eaf1 [MOV] project: renamed and moved files according to new API guidelines 2016-06-30 14:41:20 +02:00