[entity] avoid getting w in cw_extra_kwargs when calling .view stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 12 May 2010 13:12:03 +0200
branchstable
changeset 5522 6be95896d49e
parent 5521 4c53a0cb186c
child 5523 4bf975c049a6
[entity] avoid getting w in cw_extra_kwargs when calling .view
entity.py
--- a/entity.py	Wed May 12 12:36:39 2010 +0200
+++ b/entity.py	Wed May 12 13:12:03 2010 +0200
@@ -432,12 +432,12 @@
     def has_perm(self, action):
         return self.e_schema.has_perm(self._cw, action, eid=self.eid)
 
-    def view(self, __vid, __registry='views', **kwargs):
+    def view(self, __vid, __registry='views', w=None, **kwargs):
         """shortcut to apply a view on this entity"""
         view = self._cw.vreg[__registry].select(__vid, self._cw, rset=self.cw_rset,
                                                 row=self.cw_row, col=self.cw_col,
                                                 **kwargs)
-        return view.render(row=self.cw_row, col=self.cw_col, **kwargs)
+        return view.render(row=self.cw_row, col=self.cw_col, w=w, **kwargs)
 
     def absolute_url(self, *args, **kwargs):
         """return an absolute url to view this entity"""