From c9e18975c5b165a39fd83b260357615c0dc3ce3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 27 Mar 2013 22:50:08 +0100 Subject: [PATCH 1/3] Fix group loading when using '*' Prevent to load unnecessary records due to wrong loaded matching. issue3069 review744003 --- tryton/gui/window/view_form/model/record.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tryton/gui/window/view_form/model/record.py b/tryton/gui/window/view_form/model/record.py index 816494abb3..0acab7abd3 100644 --- a/tryton/gui/window/view_form/model/record.py +++ b/tryton/gui/window/view_form/model/record.py @@ -48,6 +48,11 @@ class Record(SignalEvent): (field.attrs.get('loading', 'eager') for field in self.group.fields.itervalues()), 'eager') + # Set a valid name for next loaded check + for fname, field in self.group.fields.iteritems(): + if field.attrs.get('loading', 'eager') == loading: + name = fname + break else: loading = self.group.fields[name].attrs.get('loading', 'eager') if self in self.group and loading == 'eager': From 6918e7f133a5c77ba129060906b639134460e830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 27 Mar 2013 22:52:48 +0100 Subject: [PATCH 2/3] Add missing initialization of bars in Bar issue3073 review730002 --- tryton/gui/window/view_form/view/graph_gtk/bar.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tryton/gui/window/view_form/view/graph_gtk/bar.py b/tryton/gui/window/view_form/view/graph_gtk/bar.py index d216068f60..8abebb5bee 100644 --- a/tryton/gui/window/view_form/view/graph_gtk/bar.py +++ b/tryton/gui/window/view_form/view/graph_gtk/bar.py @@ -12,6 +12,10 @@ import tryton.rpc as rpc class Bar(Graph): + def __init__(self, *args, **kwargs): + super(Bar, self).__init__(*args, **kwargs) + self.bars = [] + def drawGraph(self, cr, width, height): def drawBar(bar): From 784c2ab8829fd4b380c68fee6024290c30f100f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 27 Mar 2013 22:54:07 +0100 Subject: [PATCH 3/3] Less strict test on paste if value was set correctly review725002 --- tryton/gui/window/view_form/view/list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/view/list.py b/tryton/gui/window/view_form/view/list.py index fb1897c473..13f5c6eb4c 100644 --- a/tryton/gui/window/view_form/view/list.py +++ b/tryton/gui/window/view_form/view/list.py @@ -481,7 +481,7 @@ class ViewList(ParserView): cell = self.widget_tree.cells[col.name] if cell.get_textual_value(record) != value: cell.value_from_text(record, value) - if cell.get_textual_value(record) != value: + if value and not cell.get_textual_value(record): # Stop setting value if a value is correctly set idx = len(group) break