web/views/workflow.py
changeset 10669 155c29e0ed1c
parent 10666 7f6b5f023884
child 10688 fa29f3628a1b
equal deleted inserted replaced
10668:4fb62d791073 10669:155c29e0ed1c
   114         # selector (and not is_instance) is used on custom form
   114         # selector (and not is_instance) is used on custom form
   115         form = self._cw.vreg['forms'].select(
   115         form = self._cw.vreg['forms'].select(
   116             'changestate', self._cw, entity=entity, transition=transition,
   116             'changestate', self._cw, entity=entity, transition=transition,
   117             redirect_path=self.redirectpath(entity), **kwargs)
   117             redirect_path=self.redirectpath(entity), **kwargs)
   118         trinfo = self._cw.vreg['etypes'].etype_class('TrInfo')(self._cw)
   118         trinfo = self._cw.vreg['etypes'].etype_class('TrInfo')(self._cw)
   119         trinfo.eid = self._cw.varmaker.next()
   119         trinfo.eid = next(self._cw.varmaker)
   120         subform = self._cw.vreg['forms'].select('edition', self._cw, entity=trinfo,
   120         subform = self._cw.vreg['forms'].select('edition', self._cw, entity=trinfo,
   121                                                 mainform=False)
   121                                                 mainform=False)
   122         subform.field_by_name('wf_info_for', 'subject').value = entity.eid
   122         subform.field_by_name('wf_info_for', 'subject').value = entity.eid
   123         trfield = subform.field_by_name('by_transition', 'subject')
   123         trfield = subform.field_by_name('by_transition', 'subject')
   124         trfield.widget = fwdgs.HiddenInput()
   124         trfield.widget = fwdgs.HiddenInput()