Added issue6294

This commit is contained in:
Sergi Carol 2017-07-03 14:12:00 +02:00
parent 49ad535108
commit 5c8c3fd422
2 changed files with 55 additions and 1 deletions

54
issue6294.diff Normal file
View File

@ -0,0 +1,54 @@
diff -r 475d3c2cc7f4 tryton/tryton/gui/window/view_form/view/screen_container.py
--- a/tryton/tryton/gui/window/view_form/view/screen_container.py Mon Jun 05 23:40:21 2017 +0200
+++ b/tryton/tryton/gui/window/view_form/view/screen_container.py Fri Jun 30 12:45:09 2017 +0200
@@ -340,31 +341,32 @@
self.do_search()
def bookmark_match(self):
- current_text = self.get_text()
- current_domain = self.screen.domain_parser.parse(current_text)
- self.search_entry.set_icon_activatable(gtk.ENTRY_ICON_SECONDARY,
- bool(current_text))
- self.search_entry.set_icon_sensitive(gtk.ENTRY_ICON_SECONDARY,
- bool(current_text))
icon_stock = self.search_entry.get_icon_stock(gtk.ENTRY_ICON_SECONDARY)
- for id_, name, domain in self.bookmarks():
- text = self.screen.domain_parser.string(domain)
- domain = self.screen.domain_parser.parse(text.decode('utf-8'))
- if (text == current_text
- or domain == current_domain):
- if icon_stock != 'tryton-star':
- self.search_entry.set_icon_from_stock(
- gtk.ENTRY_ICON_SECONDARY, 'tryton-star')
- self.search_entry.set_icon_tooltip_text(
- gtk.ENTRY_ICON_SECONDARY, _('Remove this bookmark'))
- return id_
+ current_text = self.get_text()
+ if current_text:
+ current_domain = self.screen.domain_parser.parse(current_text)
+ self.search_entry.set_icon_activatable(gtk.ENTRY_ICON_SECONDARY,
+ bool(current_text))
+ self.search_entry.set_icon_sensitive(gtk.ENTRY_ICON_SECONDARY,
+ bool(current_text))
+ for id_, name, domain in self.bookmarks():
+ text = self.screen.domain_parser.string(domain)
+ domain = self.screen.domain_parser.parse(text.decode('utf-8'))
+ if (text == current_text
+ or domain == current_domain):
+ if icon_stock != 'tryton-star':
+ self.search_entry.set_icon_from_stock(
+ gtk.ENTRY_ICON_SECONDARY, 'tryton-star')
+ self.search_entry.set_icon_tooltip_text(
+ gtk.ENTRY_ICON_SECONDARY, _('Remove this bookmark'))
+ return id_
if icon_stock != 'tryton-unstar':
self.search_entry.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY,
'tryton-unstar')
if current_text:
self.search_entry.set_icon_tooltip_text(gtk.ENTRY_ICON_SECONDARY,
_('Bookmark this filter'))
- else:
+ elif self.search_entry.get_icon_tooltip_text(gtk.ENTRY_ICON_SECONDARY):
self.search_entry.set_icon_tooltip_text(gtk.ENTRY_ICON_SECONDARY,
None)

2
series
View File

@ -48,7 +48,7 @@ issue5828-product.diff
commission-issue6322-issue6501.diff
sepa_sequence_type.diff
add_account_in_move_line_payable_receivable.diff
issue6249.diff
locale.diff
issue5917.diff # [tryton] - Reduce the number of request for tree_state (changeset 33c1a31d27bc)