web/views/autoform.py
changeset 5557 1a534c596bff
parent 5464 c6c9a80ad1dd
child 5590 a56eb02f9ce7
--- a/web/views/autoform.py	Thu May 20 20:47:55 2010 +0200
+++ b/web/views/autoform.py	Thu May 20 20:50:00 2010 +0200
@@ -766,7 +766,7 @@
         """return a list of (relation schema, role) to edit for the entity"""
         if self.display_fields is not None:
             return self.display_fields
-        if self.edited_entity.has_eid() and not self.edited_entity.has_perm('update'):
+        if self.edited_entity.has_eid() and not self.edited_entity.cw_has_perm('update'):
             return []
         # XXX we should simply put eid in the generated section, no?
         return [(rtype, role) for rtype, _, role in self._relations_by_section(
@@ -869,7 +869,7 @@
             vvreg = self._cw.vreg['views']
             # display inline-edition view for all existing related entities
             for i, relentity in enumerate(related.entities()):
-                if relentity.has_perm('update'):
+                if relentity.cw_has_perm('update'):
                     yield vvreg.select('inline-edition', self._cw,
                                        rset=related, row=i, col=0,
                                        etype=ttype, rtype=rschema, role=role,