details: https://code.tryton.org/tryton/commit/6715ccac77ff
branch: default
user: Cédric Krier <[email protected]>
date: Thu Dec 18 00:44:36 2025 +0100
description:
Do not create chat if there is not current reference
Closes #14427
diffstat:
sao/src/tab.js | 8 +++++---
tryton/tryton/gui/window/form.py | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r 2d8bed1160c9 -r 6715ccac77ff sao/src/tab.js
--- a/sao/src/tab.js Thu Dec 18 00:39:38 2025 +0100
+++ b/sao/src/tab.js Thu Dec 18 00:44:36 2025 +0100
@@ -1406,9 +1406,11 @@
if (chat.length) {
chat.remove();
} else {
- this._chat = new Sao.Chat(this.screen.current_reference);
- this._chat.refresh();
- this.sidebar_content.append(this._chat.el);
+ if (this.screen.current_reference) {
+ this._chat = new Sao.Chat(this.screen.current_reference);
+ this._chat.refresh();
+ this.sidebar_content.append(this._chat.el);
+ }
}
this.update_sidebar();
},
diff -r 2d8bed1160c9 -r 6715ccac77ff tryton/tryton/gui/window/form.py
--- a/tryton/tryton/gui/window/form.py Thu Dec 18 00:39:38 2025 +0100
+++ b/tryton/tryton/gui/window/form.py Thu Dec 18 00:44:36 2025 +0100
@@ -265,7 +265,7 @@
button.props.active = True
return
- if button.get_active():
+ if button.get_active() and self.screen.current_reference:
self._chat = Chat(self.screen.current_reference)
self.chat.pack_start(self._chat.widget, True, True, padding=3)
self.chat.show_all()