Mohammed Shekha(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-client-web/6.0-opw-bug16778-msh into 
lp:openobject-client-web/6.0.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-bug16778-msh/+merge/74985

Hello,

This fix will solve two problems in web-client,

Following are the steps to generate problems

1. Go to -> Administration -> Customization  -> Reporting -> Custom Reports
   Edit any report then press "Open Report" which will open tree view in new 
tab, now press search button which will generate problem.

This is occuring due to blank context passed at server because we have puted 
one if condition in "eval_domain_context_request" function if ((!options.domain 
|| options.domain == '[]')....  so if this condition becomes true then we are 
returning -1 simply which will set context as {} in search.js

2. Go to any tree view, here for example product, now group the records by 
categories now switch the view to form -> again switch view to tree view and 
remove the category group, you will find that the group will not be removed 
from the tree view.

Thanks.

-- 
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-bug16778-msh/+merge/74985
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-client-web/6.0-opw-bug16778-msh.
=== modified file 'addons/openerp/controllers/search.py'
--- addons/openerp/controllers/search.py	2011-06-08 05:35:56 +0000
+++ addons/openerp/controllers/search.py	2011-09-12 12:49:43 +0000
@@ -360,7 +360,7 @@
                 domain.extend(selection_domain)
 
         if not domain:
-            domain = '[]'
+            domain = None
         if not isinstance(group_by_ctx, list):
             group_by_ctx = [group_by_ctx]
         if group_by_ctx:

=== modified file 'addons/openerp/widgets/listgroup.py'
--- addons/openerp/widgets/listgroup.py	2011-07-04 06:50:24 +0000
+++ addons/openerp/widgets/listgroup.py	2011-09-12 12:49:43 +0000
@@ -20,7 +20,7 @@
 ###############################################################################
 import random
 from operator import itemgetter
-
+import copy
 import cherrypy
 
 from openerp.utils import rpc
@@ -128,7 +128,7 @@
     def __init__(self, name, model, view, ids=[], domain=[], context={}, **kw):
 
         self.context = context or {}
-        self.domain = domain or []
+        self.domain = copy.deepcopy(domain) or []
         self.group_by_no_leaf = self.context.get('group_by_no_leaf', 0)
         self.selectable = kw.get('selectable', 0)
         self.editable = kw.get('editable', False)

_______________________________________________
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

Reply via email to