Skip to content

T3358-Communication-config-creation - #2130

Open
loris-fab wants to merge 1 commit into
18.0from
T3358-Communication-config-creation
Open

T3358-Communication-config-creation#2130
loris-fab wants to merge 1 commit into
18.0from
T3358-Communication-config-creation

Conversation

@loris-fab

@loris-fab loris-fab commented Aug 6, 2026

Copy link
Copy Markdown

Goal

Creating or editing a communication config (communication rule) threw an RPC_ERROR during the onchange, blocking the UI and preventing the record from being saved.

Technical aspect

  • partner_communication_revision/models/communication_revision.py: _compute_display_name concatenated config_id.name and lang directly. On a brand new revision, the record the web client snapshots for the onchange , both are still False, hence TypeError: unsupported operand type(s) for +: 'bool' and 'str'.
  • The compute now falls back to "New" while the config is not set, and only appends the language suffix when lang has a value. The displayed name is unchanged once both fields are filled.
  • The revisions list is editable="bottom" in the config form (views/communication_config_view.xml), so every line added there went through this path.

Misc

No misc

_compute_display_name concatenated config_id.name and lang directly,
which are still empty on a new record. Adding a line in the editable
revisions list of the communication config raised a TypeError.

Copilot AI 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.

Pull request overview

Fixes an Odoo onchange crash (RPC_ERROR) when creating/editing a communication config revision by making the revision’s computed display_name resilient to unset config_id and lang values during new-record snapshots.

Changes:

  • Update _compute_display_name to fall back to a translatable "New" when config_id.name is not yet set.
  • Append the language suffix only when lang has a value, avoiding type errors on brand-new revisions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@loris-fab
loris-fab requested a review from ecino August 6, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants