web/views/autoform.py
branchstable
changeset 4585 912aba7e6400
parent 4579 19d73051eb57
child 4587 70d47389630c
--- a/web/views/autoform.py	Mon Feb 15 15:22:01 2010 +0100
+++ b/web/views/autoform.py	Mon Feb 15 17:47:50 2010 +0100
@@ -85,7 +85,10 @@
 
     def __init__(self, *args, **kwargs):
         for attr in self._select_attrs:
-            setattr(self, attr, kwargs.pop(attr, None))
+            # don't pop attributes from kwargs, so the end-up in
+            # self.cw_extra_kwargs which is then passed to the edition form (see
+            # the .form method)
+            setattr(self, attr, kwargs.get(attr))
         super(InlineEntityEditionFormView, self).__init__(*args, **kwargs)
 
     def _entity(self):