[api] use cw_*
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Wed, 23 Sep 2009 13:28:26 +0200
changeset 3426 6ea4a2ff01c9
parent 3425 4035fc72d73c
child 3427 78dfef45ee48
[api] use cw_*
appobject.py
common/mixins.py
--- a/appobject.py	Wed Sep 23 13:27:05 2009 +0200
+++ b/appobject.py	Wed Sep 23 13:28:26 2009 +0200
@@ -370,15 +370,15 @@
 
     @deprecated('[3.6] use self.cw_rset.limited_rql')
     def limited_rql(self):
-        return self.rset.limited_rql()
+        return self.cw_rset.limited_rql()
 
     @deprecated('[3.6] use self.cw_rset.complete_entity(row,col) instead')
     def complete_entity(self, row, col=0, skip_bytes=True):
-        return self.rset.complete_entity(row, col, skip_bytes)
+        return self.cw_rset.complete_entity(row, col, skip_bytes)
 
     @deprecated('[3.6] use self.cw_rset.get_entity(row,col) instead')
     def entity(self, row, col=0):
-        return self.rset.get_entity(row, col)
+        return self.cw_rset.get_entity(row, col)
 
     @deprecated('[3.6] use self._cw.user_rql_callback')
     def user_rql_callback(self, args, msg=None):
--- 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
             }