nch(OpenERP) has proposed merging
lp:~openerp-dev/openobject-client/support_list_in_group_by into
lp:~openerp-dev/openobject-client/trunk-dev-client.
Requested reviews:
OpenERP sa GTK client R&D (openerp-dev-gtk)
This branch contains following improvements:
[1]:The vertical size layout of fields in the GTK client.
If you open a user, the height of the Access Rights fields was too small.
[2]:support for [] in group_by.
So one can pass context={'group_by':['field1',field2',...]}
Thanks,
nch(OpenERP)
--
https://code.launchpad.net/~openerp-dev/openobject-client/support_list_in_group_by/+merge/25427
Your team OpenERP sa GTK client R&D is requested to review the proposed merge
of lp:~openerp-dev/openobject-client/support_list_in_group_by into
lp:~openerp-dev/openobject-client/trunk-dev-client.
=== modified file 'bin/widget/view/form_gtk/parser.py'
--- bin/widget/view/form_gtk/parser.py 2010-05-12 06:48:31 +0000
+++ bin/widget/view/form_gtk/parser.py 2010-05-17 11:57:28 +0000
@@ -64,14 +64,13 @@
self.widget.show()
self.widget.connect('clicked', self.button_clicked)
-
+
default_width = self.widget.size_request()[0]
default_height = self.widget.size_request()[1]
max_width = self.widget.get_screen().get_width()/5
if default_width > max_width:
self.widget.set_size_request(max_width, default_height)
-
-
+
def grab_focus(self):
self.widget.grab_focus()
@@ -472,7 +471,7 @@
group_wid = hbox
else:
group_wid = frame
- container.wid_add(group_wid, colspan=int(attrs.get('colspan', 1)), expand=int(attrs.get('expand',0)), rowspan=int(attrs.get('rowspan', 1)), ypadding=0, fill=int(attrs.get('fill', 1)))
+ container.wid_add(group_wid, colspan=int(attrs.get('colspan', 1)), expand=int(attrs.get('expand',1)), rowspan=int(attrs.get('rowspan', 1)), ypadding=0, fill=int(attrs.get('fill', 1)))
container.new(int(attrs.get('col',4)))
widget, widgets, saws, on_write = self.parse(model, node, fields)
dict_widget.update(widgets)
=== modified file 'bin/widget_search/form.py'
--- bin/widget_search/form.py 2010-05-04 09:16:49 +0000
+++ bin/widget_search/form.py 2010-05-17 11:57:28 +0000
@@ -403,12 +403,16 @@
for x in self.widgets.values() + self.custom_widgets.values():
domain += x[0].value.get('domain',[])
ctx = x[0].value.get('context',{})
- if ctx.get('group_by', False):
- if not ctx['group_by'] in self.groupby:
- self.groupby.append(ctx['group_by'])
- elif ctx.get('remove_group',False):
- if ctx['remove_group'] in self.groupby:
- self.groupby.remove(ctx['remove_group'])
+ ctx_groupby = ctx.get('group_by', False)
+ ctx_remove_group = ctx.get('remove_group',False)
+ if ctx_groupby:
+ if not isinstance(ctx_groupby, list):
+ ctx_groupby = [ctx_groupby]
+ [self.groupby.append(x) for x in ctx_groupby if x not in self.groupby]
+ elif ctx_remove_group:
+ if not isinstance(ctx_remove_group, list):
+ ctx_remove_group = [ctx_remove_group]
+ [self.groupby.remove(x) for x in ctx_remove_group if x in self.groupby]
else:
context.update(ctx)
if self.groupby:
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp