mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
Change diff issue13181002_1 for 4.0 series
This commit is contained in:
parent
2ab99ce8e9
commit
3fc77e30cf
|
@ -1,49 +1,37 @@
|
||||||
# HG changeset patch
|
diff -r a2294b0ec2e8 tryton/tryton/common/popup_menu.py
|
||||||
# User Sergi Almacellas Abellana <sergi@koolpi.com>
|
--- a/tryton/tryton/common/popup_menu.py Wed May 11 10:42:28 2016 +0200
|
||||||
save tree state when executing actions from list view menu
|
+++ b/tryton/tryton/common/popup_menu.py Mon May 30 15:16:30 2016 +0200
|
||||||
|
@@ -12,7 +12,7 @@
|
||||||
issue4771
|
|
||||||
review13181002
|
|
||||||
|
|
||||||
Index: tryton/tryton/common/popup_menu.py
|
|
||||||
===================================================================
|
|
||||||
|
|
||||||
--- a/tryton/tryton/common/popup_menu.py
|
|
||||||
+++ b/tryton/tryton/common/popup_menu.py
|
|
||||||
@@ -11,7 +11,7 @@
|
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
||||||
|
|
||||||
-def populate(menu, model, record, title='', field=None):
|
-def populate(menu, model, record, title='', field=None):
|
||||||
+def populate(menu, model, record, title='', field=None, parent_screen=None):
|
+def populate(menu, model, record, title='', field=None, parent_screen=None):
|
||||||
'''
|
'''
|
||||||
Fill menu with the actions of model for the record.
|
Fill menu with the actions of model for the record.
|
||||||
If title is filled, the actions will be put in a submenu.
|
If title is filled, the actions will be put in a submenu.
|
||||||
@@ -37,6 +37,8 @@
|
@@ -38,6 +38,8 @@
|
||||||
return record
|
return record
|
||||||
|
|
||||||
def activate(menuitem, action, atype):
|
def activate(menuitem, action, atype):
|
||||||
+ if parent_screen:
|
+ if parent_screen:
|
||||||
+ parent_screen.save_tree_state()
|
+ parent_screen.save_tree_state()
|
||||||
rec = load(record)
|
rec = load(record)
|
||||||
action = Action.evaluate(action, atype, rec)
|
action = Action.evaluate(action, atype, rec)
|
||||||
data = {
|
data = {
|
||||||
|
diff -r a2294b0ec2e8 tryton/tryton/gui/window/view_form/view/list.py
|
||||||
Index: tryton/tryton/gui/window/view_form/view/list.py
|
--- a/tryton/tryton/gui/window/view_form/view/list.py Wed May 11 10:42:28 2016 +0200
|
||||||
===================================================================
|
+++ b/tryton/tryton/gui/window/view_form/view/list.py Mon May 30 15:16:30 2016 +0200
|
||||||
|
@@ -872,7 +872,7 @@
|
||||||
--- a/tryton/tryton/gui/window/view_form/view/list.py
|
|
||||||
+++ b/tryton/tryton/gui/window/view_form/view/list.py
|
|
||||||
@@ -901,7 +901,7 @@
|
|
||||||
menu = gtk.Menu()
|
menu = gtk.Menu()
|
||||||
menu.popup(None, None, None, event.button, event.time)
|
menu.popup(None, None, None, event.button, event.time)
|
||||||
|
|
||||||
- def pop(menu, group, record):
|
- def pop(menu, group, record):
|
||||||
+ def pop(menu, group, record, screen):
|
+ def pop(menu, group, record, screen):
|
||||||
copy_item = gtk.ImageMenuItem('gtk-copy')
|
copy_item = gtk.ImageMenuItem('gtk-copy')
|
||||||
copy_item.connect('activate', lambda x: self.on_copy())
|
copy_item.connect('activate', lambda x: self.on_copy())
|
||||||
menu.append(copy_item)
|
menu.append(copy_item)
|
||||||
@@ -915,7 +915,8 @@
|
@@ -886,7 +886,8 @@
|
||||||
break
|
break
|
||||||
parent = parent.parent
|
parent = parent.parent
|
||||||
else:
|
else:
|
||||||
|
@ -53,7 +41,7 @@ Index: tryton/tryton/gui/window/view_form/view/list.py
|
||||||
for col in self.treeview.get_columns():
|
for col in self.treeview.get_columns():
|
||||||
if not col.get_visible() or not col.name:
|
if not col.get_visible() or not col.name:
|
||||||
continue
|
continue
|
||||||
@@ -932,10 +933,11 @@
|
@@ -903,10 +904,11 @@
|
||||||
if not model:
|
if not model:
|
||||||
continue
|
continue
|
||||||
label = field.attrs['string']
|
label = field.attrs['string']
|
||||||
|
@ -67,4 +55,3 @@ Index: tryton/tryton/gui/window/view_form/view/list.py
|
||||||
elif event.button == 2:
|
elif event.button == 2:
|
||||||
event.button = 1
|
event.button = 1
|
||||||
event.state |= gtk.gdk.MOD1_MASK
|
event.state |= gtk.gdk.MOD1_MASK
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue