diff --git a/bin/addons/base/ir/ir_ui_view.py b/bin/addons/base/ir/ir_ui_view.py index 2a65a8378ed..309841a7ac6 100644 --- a/bin/addons/base/ir/ir_ui_view.py +++ b/bin/addons/base/ir/ir_ui_view.py @@ -43,7 +43,6 @@ def _check_xml(self, cr, uid, ids, context={}): logger = netsvc.Logger() logger.notifyChannel('init', netsvc.LOG_ERROR, 'The view do not fit the required schema !') logger.notifyChannel('init', netsvc.LOG_ERROR, relaxng.error_log.last_error) - print view.arch return False return True diff --git a/bin/osv/expression.py b/bin/osv/expression.py index 49bdb50f755..ccac1bda1fa 100644 --- a/bin/osv/expression.py +++ b/bin/osv/expression.py @@ -52,10 +52,18 @@ class expression(object): """ transform the leafs of the expression """ def _rec_get(ids, table, parent): - if not ids: - return [] - ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context) - return ids + _rec_get(ids2, table, parent) + if table._parent_store: + doms = [] + for o in table.browse(cr, uid, ids, context=context): + if doms: + doms.insert(0,'|') + doms.append(['&',('parent_left','<',o.parent_right),('parent_left','>=',o.parent_left)]) + return table.search(cr, uid, doms, context=context) + else: + if not ids: + return [] + ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context) + return ids + _rec_get(ids2, table, parent) if not self.__exp: return self