Daily updates from Odoo
Friday, September 9, 2022
1 change · master
Enhancements to existing features
Project document management is now always available and easier to configure per project or product. Sales-driven projects can automatically receive document workspaces based on product templates, while portal and public shared-link users get clearer access to shared project documents.
Original PR description
\* = fsm,project,project_sale,project_sign This PR is a follow-up of https://github.com/odoo/enterprise/pull/26696 Features ======= - Removed the "Documents" Project global setting. - The feature is…
\* = fsm,project,project_sale,project_sign This PR is a follow-up of https://github.com/odoo/enterprise/pull/26696 Features ======= - Removed the "Documents" Project global setting. - The feature is now always enabled. - It can still be disabled per project, and is still disabled by default on fsm projects. - The "Workspace Template" setting is moved to products, and the "Parent Workspace" setting is removed. - The "Projects" workspace is no longer company dependent, and is replaced by a global workspace with the same name. - It is not allowed to remove that workspace or change its company - Moved the "Workspace Template" Project global setting to the `product.template` model. - Only visible if the product generates a project. - Restricted to workspaces with no company or with the product's company (or the current company if the product has no company). - When a Sales Order contains a product with a Workspace Template, the workspace of project generated for that line will be a copy of the Workspace Template. - The copy of the template is placed in the same workspace (it keeps the same parent workspace as the template) - If a project is associated to multiple SOLs with different Workspace Templates, then the generated workspace will be a combination of all of those templates. - The generated workspace will have a copy of all the facets, tags, actions and children of all the templates. - In this case, the generated project will be placed in the "Projects" workspace. - Added a button to view projects' shared documents in the portal task list view. - A projects' shared documents include shared documents either linked to the project itself or to one of its tasks. - Only visible if the tasks are grouped by project. - When a project has shared documents, its tasks will automatically be grouped by project to make the button appear. - Allow public users to access documents in the portal. - With a share link with a valid access tokens, users can see, download and upload documents like portal users. - When uploading a document to a workspace that is linked to a project, also set the default document tags of the project on that document. - If the workspace is linked to multiple projects, no tags will be set. - If the workspace is a descendant of a workspace linked to a single project, then the default document tags of that project will be set. - If the workspace is descendant of multiple such projects, the closest ancestor will be selected. - When duplicating a project, the copied project is now linked to the same workspace. - When duplicating a workspace, the description and access rights are now also copied. - Added some demo data to help showcasing and testing the aforementionned features. Technical Details ============== - Added a `search` method for the `is_shared` field on documents. - It allows us to compute shared documents more efficiently in multiple places. - All portal documents tasks routes now have a second url for when coming from a project. - This is because, when sharing a project with an access token and viewing one of its tasks, the token of the project its used, not the one of the task. - After installation, `documents_fsm` unlinks the workspace of all fsm projects. This is because two problematic cases can occur: - If we install Field Service in a database with `documents_project`, the module `industry_fsm` will create the default Field Service project before `documents_fsm` is installed, which means that the Documents Feature wil not be disabled by default on fsm projects at that point. - If we install Documents in a database with Field Service, the `documents_project` module will install first, and cause all projects, including fsm ones, to generate a workspace. - Previously, we were preventing the user from selecting a parent of the Parent Workspace as a Workspace Template to avoid infinite recursion issues. This problem could occur again when generating a workspace from multiple templates through a SO if one of those templates is a parent of the "Projects" workspace, but we solve the issue by generating the workspace at root level, and only assigning its parent after copy. --- Community: https://github.com/odoo/odoo/pull/99151 Upgrade: https://github.com/odoo/upgrade/pull/3749 Task-2944247