Daily updates from Odoo
Wednesday, September 25, 2024
1 change · master
Enhancements to existing features
The Documents app has been redesigned so folders, files, sharing, permissions, and shortcuts are managed in one place. This gives users clearer document navigation, simpler sharing links, improved portal access, and more consistent permissions across related apps such as HR, Sign, Project, Fleet, and Spreadsheet.
Original PR description
Commit messages are being written... could start with: [IMP] documents, *: modernize access rights, sharing, and actions #### Model changes * `documents.folder` is merged into `documents.document`…
Commit messages are being written... could start with:
[IMP] documents, *: modernize access rights, sharing, and actions
#### Model changes
* `documents.folder` is merged into `documents.document` ("`document`" below)
=> Records with `type=folder`
* `documents.share` is removed,
=> Sharing is now defined on each `documents.document` (see below)
* `documents.access` is added to store partners access and access logs
* `documents.workflow.action` is removed and functionally replaced by
`ir.embedded.actions` records linked to `ir.actions.server`
* `documents.facet` are removed, `documents.tag` are now available cross-app
##### `document` types
Functionally, folders are now displayed together with files in our kanban view,
where folders can be entered with double click.
Shortcuts are also introduced for quick access to a `document` from
another place.
Technically, types are materialized in the `type`, `attachment_id`, and
`shortcut_document_id` fields.
The type can be `binary`, `url`, `folder`.
The old `request` type is virtualized by the `type=binary` with
`attachment_id=False` condition (which was already true),
and shortcuts have a set `shortcut_document_id` and match their type.
##### Access rights
Access rights and sharing are now directly, and only, defined on each
`document` and result in a user's permission `user_permission`.
* User permissions are:
* `view`: right to view a document's fields value.
* `edit`: right to edit a document + upload inside for folders, update sharing
Note that public users are only able to upload.
* `none`: no right
* These permissions can be defined to give access to users via a combination
of parameters. When users match multiple conditions, they are granted the
highest permission given by these:
* The `owner` of a document now has `edit` permission.
* Individual partners can be added (see Knowledge's "Members")
(m2m `documents.access`)
* All internal users via `access_internal`
* All users that have the link to the document (enabled via `access_via_link`)
That is either:
* Having the URL (access token)
* Unless marked as "non-discoverable" via `is_access_via_link_hidden`
having access to a related record:
* The parent folder,
* A shortcut to the document,
* In selected cases (such as project), access to the related record
This access is logged so that on new access to the app, a visited
document is still accessible (as long as it is shared in the same way)
without having to click on the direct link or related record again.
* Upon creating a document inside a folder:
* Default: Access rights on the document are inherited from the folder.
* Customization: Via the documents.mixin, other values can be defined
depending on the linked record.
* Documents will now appear in different sections:
* Company: All documents owned by OdooBot and their children,
as well as all documents shared with all internal users
* My drive: Personal space for each internal user
* Shared with me: All documents shared with the user that are
not in the Company drive
* Shortcuts can be created to create quick references to documents in other
places without the need to duplicate the document or spread access rights
management.
[...]
task-4014624
Co-authored-by: std-odoo <std@odoo.com>
Co-authored-by: Pierre-Yves Dufays <pydu@odoo.com>
Co-authored-by: Julien Castiaux <juc@odoo.com>
Co-authored-by: Lopes Marc (loma) <loma@odoo.com>
Co-authored-by: Patrick Hoste <pko@odoo.com>