Skip to content

Draft: [16.0][FIX] Project_task_code does not work with portal kanban sharing#1701

Open
KKamaa wants to merge 2 commits intoOCA:16.0from
Therp:16.0-13328-project_task_code
Open

Draft: [16.0][FIX] Project_task_code does not work with portal kanban sharing#1701
KKamaa wants to merge 2 commits intoOCA:16.0from
Therp:16.0-13328-project_task_code

Conversation

@KKamaa
Copy link
Copy Markdown

@KKamaa KKamaa commented Apr 1, 2026

This is a fix for portal_task_code where you can invite a portaluser to be a 'sharing user' so that they can access an interactive project Kanban on portal however when a portal user creates a task via the project sharing view an AccessError is raised because the code field introduced by OCA/project_task_code is not included in SELF_WRITABLE_FIELDS.

To reproduce:

  • Enable project sharing on a project and invite a portal user to 'Share Editable'.
  • then login as a portal user, open the shared project and create a new task.
  • Task creation fails with: odoo.exceptions.AccessError: You cannot write on code fields in task.

Copy link
Copy Markdown

@luisDIXMIT luisDIXMIT left a comment

Choose a reason for hiding this comment

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

Code review and tested on runboat, LGTM! Maybe the two commits can be squashed into one.

Copy link
Copy Markdown

@ntsirintanis ntsirintanis left a comment

Choose a reason for hiding this comment

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

This PR is exactly the way to go. The code field is introduced in project_task_code, so the corresponding guards should also be properly defined there. Without this fix, installing project_task_code alone causes issues; For example, portal users cannot create tasks from the sharing kanban view when project_task_code is installed.

Installing project_task_code_portal currently hides the problem, since it adds the code field in protected fields, though that behavior belongs in the base module rather than the portal extension.

So this fine by me, and here is my approval.

It would also make sense to clean up the duplication in project_task_code_portal.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants