summaryrefslogtreecommitdiff
path: root/addons/document
diff options
context:
space:
mode:
Diffstat (limited to 'addons/document')
-rw-r--r--addons/document/nodes.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/addons/document/nodes.py b/addons/document/nodes.py
index 998ea7706b2..639d0e9b9b8 100644
--- a/addons/document/nodes.py
+++ b/addons/document/nodes.py
@@ -392,10 +392,10 @@ class node_dir(node_database):
pass
def __eq__(self, other):
- if not self.context == other.context:
- return False
if type(self) != type(other):
return False
+ if not self.context == other.context:
+ return False
# Two directory nodes, for the same document.directory, may have a
# different context! (dynamic folders)
if self.dctx != other.dctx:
@@ -526,10 +526,10 @@ class node_res_dir(node_class):
self.dctx_dict['dctx_' + dfld.field] = dfld.expr
def __eq__(self, other):
- if not self.context == other.context:
- return False
if type(self) != type(other):
return False
+ if not self.context == other.context:
+ return False
# Two nodes, for the same document.directory, may have a
# different context! (dynamic folders)
if self.dctx != other.dctx:
@@ -640,10 +640,10 @@ class node_res_obj(node_class):
self.res_id = res_id
def __eq__(self, other):
- if not self.context == other.context:
- return False
if type(self) != type(other):
return False
+ if not self.context == other.context:
+ return False
if not self.res_model == other.res_model:
return False
if not self.res_id == other.res_id:
@@ -852,10 +852,10 @@ class node_file(node_class):
par = par.parent_id
def __eq__(self, other):
- if not self.context == other.context:
- return False
if type(self) != type(other):
return False
+ if not self.context == other.context:
+ return False
if self.dctx != other.dctx:
return False
return self.file_id == other.file_id