web/views/editcontroller.py
branchstable
changeset 7182 09454384fff8
parent 6864 ea95004494a2
child 7584 e1881933f366
--- a/web/views/editcontroller.py	Wed Apr 06 09:57:28 2011 +0200
+++ b/web/views/editcontroller.py	Thu Mar 31 14:23:11 2011 +0200
@@ -182,7 +182,12 @@
         # process inlined relations at the same time as attributes
         # this will generate less rql queries and might be useful in
         # a few dark corners
-        formid = self._cw.form.get('__form_id', 'edition')
+        if is_main_entity:
+            formid = self._cw.form.get('__form_id', 'edition')
+        else:
+            # XXX inlined forms formid should be saved in a different formparams entry
+            # inbetween, use cubicweb standard formid for inlined forms
+            formid = 'edition'
         form = self._cw.vreg['forms'].select(formid, self._cw, entity=entity)
         eid = form.actual_eid(entity.eid)
         form.formvalues = {} # init fields value cache