common/mixins.py
changeset 3426 6ea4a2ff01c9
parent 3023 7864fee8b4ec
child 3451 6b46d73823f5
--- a/common/mixins.py	Wed Sep 23 13:27:05 2009 +0200
+++ b/common/mixins.py	Wed Sep 23 13:28:26 2009 +0200
@@ -155,7 +155,7 @@
 
     def root(self):
         """return the root object"""
-        return self.req.entity_from_eid(self.path()[0])
+        return self._cw.entity_from_eid(self.path()[0])
 
 
 class EmailableMixIn(object):
@@ -209,7 +209,7 @@
         done = set()
     entity = view.rset.get_entity(row, col)
     if entity.eid in done:
-        msg = entity.req._('loop in %(rel)s relation (%(eid)s)') % {
+        msg = entity._cw._('loop in %(rel)s relation (%(eid)s)') % {
             'rel': entity.tree_attribute,
             'eid': entity.eid
             }