272 def has_perm(self, action): |
272 def has_perm(self, action): |
273 return self.e_schema.has_perm(self._cw, action, eid=self.eid) |
273 return self.e_schema.has_perm(self._cw, action, eid=self.eid) |
274 |
274 |
275 def view(self, __vid, __registry='views', **kwargs): |
275 def view(self, __vid, __registry='views', **kwargs): |
276 """shortcut to apply a view on this entity""" |
276 """shortcut to apply a view on this entity""" |
277 view = self._cw.vreg[__registry].select(vid, self._cw, rset=self.cw_rset, |
277 view = self._cw.vreg[__registry].select(__vid, self._cw, rset=self.cw_rset, |
278 row=self.cw_row, col=self.cw_col, |
278 row=self.cw_row, col=self.cw_col, |
279 **kwargs) |
279 **kwargs) |
280 return view.render(row=self.cw_row, col=self.cw_col, **kwargs) |
280 return view.render(row=self.cw_row, col=self.cw_col, **kwargs) |
281 |
281 |
282 def absolute_url(self, *args, **kwargs): |
282 def absolute_url(self, *args, **kwargs): |