RGA(Open ERP) has proposed merging
lp:~openerp-dev/openobject-client/search_view_domain into lp:openobject-client.
Requested reviews:
OpenERP sa GTK client R&D (openerp-dev-gtk)
hello,
If the field available in search view and the same field has domain
available in python file, and then when we try to search that field from the
gtk it gives the error.
Try: accounting/ ../journal items, scrum/product backlog/project
--
https://code.launchpad.net/~openerp-dev/openobject-client/search_view_domain/+merge/29393
Your team OpenERP sa GTK client R&D is requested to review the proposed merge
of lp:~openerp-dev/openobject-client/search_view_domain into
lp:openobject-client.
=== modified file 'bin/widget_search/char.py'
--- bin/widget_search/char.py 2010-06-15 09:05:13 +0000
+++ bin/widget_search/char.py 2010-07-07 14:01:01 +0000
@@ -51,8 +51,7 @@
if s:
if self.attrs.get('domain',False):
domain = tools.expr_eval(self.attrs['domain'], {'self': s})
- else:
- domain = [(self.name,self.attrs.get('comparator','ilike'),s)]
+ domain += [(self.name,self.attrs.get('comparator','ilike'),s)]
context = tools.expr_eval(self.attrs.get('context',"{}"), {'self': s})
return {
'domain':domain,
=== modified file 'bin/widget_search/form.py'
--- bin/widget_search/form.py 2010-07-01 16:32:10 +0000
+++ bin/widget_search/form.py 2010-07-07 14:01:01 +0000
@@ -172,12 +172,13 @@
if visval:
continue
if node.localName=='field':
+ self.fields[str(attrs['name'])]['domain'] = []
type = attrs.get('widget', self.fields[str(attrs['name'])]['type'])
self.fields[str(attrs['name'])].update(attrs)
self.fields[str(attrs['name'])]['model']=self.model
if type not in widgets_type:
continue
- widget_act = widgets_type[type][0](str(attrs['name']), self.parent, self.fields[attrs['name']],screen=call[0])
+ widget_act = widgets_type[type][0](str(attrs['name']), self.parent, self.fields[attrs['name']], screen=call[0])
if 'string' in self.fields[str(attrs['name'])]:
label = self.fields[str(attrs['name'])]['string']+' :'
else:
@@ -396,7 +397,6 @@
res1 = domain[:-2]
res2 = domain[-1:]
domain = res1 + res2
-
return {'domain':domain, 'context':context}
def _value_set(self, value):
_______________________________________________
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