Nicolas Évrard pushed to branch branch/default at Tryton / Tryton
Commits: 08779343 by Nicolas Évrard at 2023-02-03T18:19:31+01:00 Do not trigger button on not selected records Closes #11824 - - - - - 2 changed files: - sao/src/view/list_form.js - tryton/tryton/gui/window/view_form/view/list_form.py Changes: ===================================== sao/src/view/list_form.js ===================================== @@ -9,6 +9,11 @@ }, set record(value) { this._record = value; + }, + button_clicked: function(event) { + if (Sao.common.compare(this.screen.selected_records, [this.record])) { + Sao.View.ListGroupViewForm._super.button_clicked.call(this, event); + } } }); ===================================== tryton/tryton/gui/window/view_form/view/list_form.py ===================================== @@ -23,6 +23,10 @@ def record(self, value): self._record = value + def button_clicked(self, widget): + if self.screen.selected_records == [self.record]: + super().button_clicked(widget) + class ListBoxItem(GObject.Object): View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/commit/08779343f15d8d37b859218172796e01692ac1db -- View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/commit/08779343f15d8d37b859218172796e01692ac1db You're receiving this email because of your account on foss.heptapod.net.