Skip to content

[18.0][FIX] project_task_name_with_id: add active field #1773

Open
Drsmartinkus wants to merge 1 commit into
OCA:18.0from
Drsmartinkus:18-fix-project_task_name_with_id
Open

[18.0][FIX] project_task_name_with_id: add active field #1773
Drsmartinkus wants to merge 1 commit into
OCA:18.0from
Drsmartinkus:18-fix-project_task_name_with_id

Conversation

@Drsmartinkus

@Drsmartinkus Drsmartinkus commented Jul 16, 2026

Copy link
Copy Markdown

The project sharing kanban view inherits the original project_sharing_project_task_view_kanban which does not include the active field in its arch. The inherited view references record.active.raw_value to toggle strikethrough on inactive tasks, but since active is not declared as a field in the view, the record value is undefined at render time, causing:

TypeError: Cannot read properties of undefined (reading 'raw_value')

Add an invisible active field so the value is available in the kanban record data, allowing the t-if conditional to evaluate correctly.

How to reproduce this error with enterprise modules installed:
Screencast from 2026-07-16 08-01-00.webm

@OCA-git-bot OCA-git-bot added series:18.0 mod:project_task_name_with_id Module project_task_name_with_id labels Jul 16, 2026

@AungKoKoLin1997 AungKoKoLin1997 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can add in existing xpath instead of new one.

Comment on lines 63 to 64
<xpath expr="//field[@name='name']" position="after">
<span class="fw-bold fs-5">

@AungKoKoLin1997 AungKoKoLin1997 Jul 16, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
<xpath expr="//field[@name='name']" position="after">
<field name="active" invisible="1" />
<span class="fw-bold fs-5">

…nban view

The project sharing kanban view inherits the original
project_sharing_project_task_view_kanban which does not include the
`active` field in its arch. The inherited view references
`record.active.raw_value` to toggle strikethrough on inactive tasks,
but since `active` is not declared as a field in the view, the record
value is undefined at render time, causing:

  TypeError: Cannot read properties of undefined (reading 'raw_value')

Add an invisible `active` field so the value is available in the
kanban record data, allowing the t-if conditional to evaluate
correctly.
@Drsmartinkus
Drsmartinkus force-pushed the 18-fix-project_task_name_with_id branch from 7dedd22 to 8e32d85 Compare July 16, 2026 06:48

@AungKoKoLin1997 AungKoKoLin1997 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the fix.
Code Review: LG 👍

@yostashiro yostashiro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. 👍

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.

4 participants