Skip to content

[20.0][MIG] project_task_description_template: Migration to 20.0 - #1894

Open
AyushPatel2021 wants to merge 32 commits into
OCA:20.0from
AyushPatel2021:20.0-mig-project_task_description_template
Open

AyushPatel2021 wants to merge 32 commits into
OCA:20.0from
AyushPatel2021:20.0-mig-project_task_description_template

Conversation

@AyushPatel2021

Copy link
Copy Markdown

Migration of project_task_description_template to 20.0.

  • ir.model.access.csv and the record rules become ir.access.csv: the portal rule is now the domain of the portal read access, the company rule a restriction without group (same access as before).
  • Tests: in 20.0 a portal project's partner is already a "view" collaborator, and new collaborators default to "view", so the test setup gives the portal user "edit" access instead of adding a duplicate collaborator.
  • Tests: cover the access rows (users read, managers create, company restriction) and the unlink of a template.

Part of #1828

Assisted-by: Claude Opus 5.5

alan196 and others added 30 commits November 24, 2026 16:23
…tion templates for project tasks

[BOT] post-merge updates
[UPD] Update project_task_description_template.pot

[BOT] post-merge updates
Translated using Weblate (Spanish)

Currently translated at 100.0% (16 of 16 strings)

Translation: project-17.0/project-17.0-project_task_description_template
Translate-URL: https://translation.odoo-community.org/projects/project-17-0/project-17-0-project_task_description_template/es/
[UPD] Update project_task_description_template.pot

[BOT] post-merge updates
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: project-19.0/project-19.0-project_task_description_template
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_task_description_template/
Currently translated at 100.0% (17 of 17 strings)

Translation: project-19.0/project-19.0-project_task_description_template
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_task_description_template/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: project-19.0/project-19.0-project_task_description_template
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_task_description_template/
Currently translated at 100.0% (18 of 18 strings)

Translation: project-19.0/project-19.0-project_task_description_template
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_task_description_template/it/
…eld wrapping

The two onchange tests pinned the exact wrapper tag of the appended template
text. Odoo core flips that wrapper between releases (<span> <-> <p>), so the
hard-coded assertions break on every change. Compare against the template's own
stored Html value instead, so both sides track whatever core produces.
Currently translated at 100.0% (18 of 18 strings)

Translation: project-19.0/project-19.0-project_task_description_template
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_task_description_template/de/
Currently translated at 100.0% (18 of 18 strings)

Translation: project-19.0/project-19.0-project_task_description_template
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_task_description_template/it/
The template field was not stored since the module was created, so the
template used on a task was lost after saving it.
Templates can be linked to projects, so each project only proposes its own
templates and the ones without projects.
Portal users can select the templates of their projects in the project sharing
views, and a project can require them to select one on every new task.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: project-19.0/project-19.0-project_task_description_template
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_task_description_template/
Currently translated at 100.0% (28 of 28 strings)

Translation: project-19.0/project-19.0-project_task_description_template
Translate-URL: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_task_description_template/it/
@OCA-git-bot OCA-git-bot added mod:project_task_description_template Module project_task_description_template series:20.0 labels Nov 24, 2026
@AyushPatel2021

Copy link
Copy Markdown
Author

Hello @leemannd @ThiagoMForgeFlow @LoisRForgeFlow @CristianoMafraJunior, could you please review this migration of project_task_description_template to 20.0? Details are in the description.

@AyushPatel2021 AyushPatel2021 mentioned this pull request Nov 24, 2026
3 of 43 tasks

@LoisRForgeFlow LoisRForgeFlow left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment below

access_model_project_task_description_template_user,access_model_project_task_description_template_user,project.task.description.template,project.group_project_user,r,
access_model_project_task_description_template_portal,Project Task Description Template: portal users,project.task.description.template,base.group_portal,r,"[
('project_ids', 'any', [
('privacy_visibility', '=', 'portal'),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 20.0 invited_users is also a portal sharing mode, and core checks both (see the project, task and milestone portal rules). I think this rule should be: "('privacy_visibility', 'in', ['invited_users', 'portal'])"

def _check_portal_task_description_template_required(self):
for project in self:
if (
project.privacy_visibility == "portal"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, considere "invited_users" new option.

- ir.model.access.csv and the record rules become ir.access.csv: the
  portal rule is now the domain of the portal read access, the company
  rule a restriction without group (same access as before).
- Treat "invited_users" projects like "portal" ones, as core does: the
  portal access domain, the required template check and the project
  settings.
- Tests: in 20.0 a portal project's partner is already a "view"
  collaborator, and new collaborators default to "view", so the test
  setup gives the portal user "edit" access instead of adding a duplicate
  collaborator.
- Tests: cover the access rows (users read, managers create, company
  restriction), the unlink of a template and "invited_users" projects.

Assisted-by: Claude Opus 5.5
@AyushPatel2021
AyushPatel2021 force-pushed the 20.0-mig-project_task_description_template branch from 605a282 to f1af5e4 Compare November 25, 2026 04:30
@AyushPatel2021

Copy link
Copy Markdown
Author

thanks, good catch. invited_users is now handled like portal in the access domain, the required template check and the project settings, with a test for it. folded into the migration commit.

@LoisRForgeFlow LoisRForgeFlow left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@AyushPatel2021

Copy link
Copy Markdown
Author

Ready to merge @leemannd: 2 approvals and CI is green. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.