Skip to content

[18.0] reviews module – duplicate t-key error when multiple reviewers have same sequence #1144

@jaydeep32

Description

@jaydeep32

Module

base_tier_validation

Describe the bug

When a record has multiple reviewers assigned with the same sequence, opening the form view in debug mode raises an Owl client error due to duplicate keys in a t-foreach loop.

Image Image

Odoo Client Error UncaughtPromiseError > OwlError Uncaught Promise > Got duplicate key in t-foreach: 1

To Reproduce

Affected versions: 18.0

Steps to reproduce the behavior:

  1. Create a record that requires tier validation.
  2. Add two or more reviewers with the same sequence number.
  3. Open that record in form view.
  4. Activate debug/developer mode.
  5. The error appears immediately.

Expected behavior
The form view should display all reviewers correctly, regardless of whether they share the same sequence.

Additional context
For testing purposes, I updated the line in base_tier_validation.Collapse to have t-key='review.id' instead of the existing value, and with this change the error no longer occurs. Based on this, I believe the issue is caused by the use of a non-unique key (such as sequence) in the t-foreach loop.

If this assumption is correct, then adjusting the template to use a unique identifier (e.g., review.id or a combination of fields) should resolve the error permanently.

However, if this is not the right approach and the problem lies elsewhere, I would appreciate guidance on the actual root cause and the recommended solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions