use form.form_field_vocabulary instead of entity.vocabulary tls-sprint
authorsylvain.thenault@logilab.fr
Fri, 27 Mar 2009 17:11:02 +0100
branchtls-sprint
changeset 1186 58b4ec2a77f5
parent 1185 ffe1b6f495e8
child 1234 4d5ff6a3d539
use form.form_field_vocabulary instead of entity.vocabulary
web/views/editviews.py
--- a/web/views/editviews.py	Fri Mar 27 17:10:37 2009 +0100
+++ b/web/views/editviews.py	Fri Mar 27 17:11:02 2009 +0100
@@ -125,7 +125,10 @@
         eid = entity.eid
         pending_inserts = self.req.get_pending_inserts(eid)
         rtype = rschema.type
-        for eview, reid in entity.vocabulary(rschema, target, self.limit):
+        form = self.vreg.select_object('forms', 'edition', self.req,
+                                       entity=entity)
+        field = form.field_by_name(rschema, target)
+        for eview, reid in form.form_field_vocabulary(field, self.limit):
             if reid is None:
                 options.append('<option class="separator">-- %s --</option>'
                                % html_escape(eview))