Odoo's Mergebot 6a0888175d [MERGE][FIX][IMP] mail: display activities without record access in the systray
When scheduling plans on employees, activities may be assigned to people who
don't have access to the record. It was managed locally in HR through a dummy
model aggregating activities. However, it was removed and we replace it here by
a generic solution that adds an entry in the systray: "Other activities". When
clicking on that entry, it displays a list view of the activities assigned to
the user for which he has no access to the related record. Those activities
were not visible to the user before.

Technical note: to allow displaying such records, we have modified the custom
acl defined in python to allow users to read activities assigned to them even
if they don't have access to the related record.

[IMP] mail: allow to mark as done activity without record access

When scheduling plans on employees, activities may be assigned to people who
don't have access to the record, but they still need to mark them as done. And
as marking as done (action_done on mail_activity) triggers a message post on
the related record, that action cannot be executed by a user without access to
the record.

We change that here to allow user having delete/archive right on the activity,
to be able as well to mark it as done (as the activity is archived/deleted at
the end of the method _action_done, the user must at least have the right to do
that to be able to mark as done the activity).

[IMP] mail: add custom view for "other activities"

When clicking on "Other activities" in the systray, a list of activities
assigned to the user for which he has no access to underlying record is
displayed. The default list allows to delete, archive, duplicate, ...
activities but what we want is a readonly view. We add here a new view that
doesn't allow any modification on the activities by removing those actions.
Unfortunately, archive and unarchive action is not controllable with an
attribute (nor by setting the active field as readonly in the view), so we
create a very simple extension of the list view to disable it.

We also add in the list view a button to mark an activity as done and a simple
form view to see the details of the activity (note, ...). The "mark as done is
not added in the form view as the activity is deleted causing an error because
the form is still displayed and the record is gone.

Note that those action are only removed from the client but the actions are
not forbidden on the server side.

[IMP] mail: limit performance impact of the systray

To limit performance impact of the systray, we fetch by default only the last
1000 activities. That value can be configured with mail.activity.systray.limit
config parameter. Note that this can also improve a bit the readability of the
other activities view (for the standard activity view a pager is already
present).

[IMP] mail: add fallback for not deployed action/view

To avoid crash on possibly not deployed action and related views
(mail.mail_activity_without_access_action), we temporary add a fallback on
existing action and views.

Task-3562098

closes odoo/odoo#139917

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-11-07 09:19:03 +00:00
2023-10-27 08:36:16 +00:00
2023-11-02 21:02:44 +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%