entity.py
changeset 3418 7b49fa7e942d
parent 3405 9d31c9cb8103
child 3452 7c008d31ef1f
equal deleted inserted replaced
3412:368c68ffb99e 3418:7b49fa7e942d
   261     def has_perm(self, action):
   261     def has_perm(self, action):
   262         return self.e_schema.has_perm(self._cw, action, self.eid)
   262         return self.e_schema.has_perm(self._cw, action, self.eid)
   263 
   263 
   264     def view(self, vid, __registry='views', **kwargs):
   264     def view(self, vid, __registry='views', **kwargs):
   265         """shortcut to apply a view on this entity"""
   265         """shortcut to apply a view on this entity"""
   266         return self._cw.vreg[__registry].render(
   266         view = self._cw.vreg[__registry].select(vid, self._cw, rset=self.cw_rset)
   267             vid, self._cw, rset=self.rset, row=self.row, col=self.col, **kwargs)
   267         return view.render(row=self.cw_row, col=self.cw_col, **kwargs)
   268 
   268 
   269     def absolute_url(self, *args, **kwargs):
   269     def absolute_url(self, *args, **kwargs):
   270         """return an absolute url to view this entity"""
   270         """return an absolute url to view this entity"""
   271         # use *args since we don't want first argument to be "anonymous" to
   271         # use *args since we don't want first argument to be "anonymous" to
   272         # avoid potential clash with kwargs
   272         # avoid potential clash with kwargs