changeset 22c78aeeae8a in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset;node=22c78aeeae8a
description:
Use but_remove only if One2Many has attribute add_remove
issue8305
review261361002
diffstat:
tryton/gui/window/view_form/view/form_gtk/one2many.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 42b72616c498 -r 22c78aeeae8a
tryton/gui/window/view_form/view/form_gtk/one2many.py
--- a/tryton/gui/window/view_form/view/form_gtk/one2many.py Fri Apr 26
12:05:31 2019 +0200
+++ b/tryton/gui/window/view_form/view/form_gtk/one2many.py Fri Apr 26
12:06:44 2019 +0200
@@ -194,7 +194,7 @@
if (event.keyval in [Gdk.KEY_Delete, Gdk.KEY_KP_Delete]
and widget == self.screen.widget):
remove = not (event.state & Gdk.ModifierType.CONTROL_MASK)
- if remove:
+ if remove and self.attrs.get('add_remove'):
but = self.but_remove
else:
but = self.but_del