fix argument given to changestate form selection stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 21 Sep 2009 12:52:17 +0200
branchstable
changeset 3339 d1d643ef37f7
parent 3338 cd137d90f896
child 3340 7dfccf5612ed
fix argument given to changestate form selection
web/views/workflow.py
--- a/web/views/workflow.py	Mon Sep 21 12:15:32 2009 +0200
+++ b/web/views/workflow.py	Mon Sep 21 12:52:17 2009 +0200
@@ -60,8 +60,12 @@
         transition = self.req.entity_from_eid(self.req.form['treid'])
         dest = transition.destination()
         _ = self.req._
-        form = self.vreg['forms'].select('changestate', self.req, entity=entity,
-                                         redirect_path=self.redirectpath(entity))
+        # specify both rset/row/col and entity in case implements selector (and
+        # not entity_implements) is used on custom form
+        form = self.vreg['forms'].select(
+            'changestate', self.req, rset=self.rset, row=row, col=col,
+            entity=entity, treid=transition.eid,
+            redirect_path=self.redirectpath(entity))
         self.w(form.error_message())
         self.w(u'<h4>%s %s</h4>\n' % (_(transition.name),
                                       entity.view('oneline')))