84 'changestate', self._cw, entity=entity, transition=transition, |
84 'changestate', self._cw, entity=entity, transition=transition, |
85 redirect_path=self.redirectpath(entity), **kwargs) |
85 redirect_path=self.redirectpath(entity), **kwargs) |
86 trinfo = self._cw.vreg['etypes'].etype_class('TrInfo')(self._cw) |
86 trinfo = self._cw.vreg['etypes'].etype_class('TrInfo')(self._cw) |
87 trinfo.eid = self._cw.varmaker.next() |
87 trinfo.eid = self._cw.varmaker.next() |
88 subform = self._cw.vreg['forms'].select('edition', self._cw, entity=trinfo, |
88 subform = self._cw.vreg['forms'].select('edition', self._cw, entity=trinfo, |
89 mainform=False) |
89 mainform=False) |
90 subform.field_by_name('by_transition').widget = fwdgs.HiddenInput() |
90 subform.field_by_name('wf_info_for', 'subject').value = entity.eid |
|
91 trfield = subform.field_by_name('by_transition', 'subject') |
|
92 trfield.widget = fwdgs.HiddenInput() |
|
93 trfield.value = transition.eid |
91 form.add_subform(subform) |
94 form.add_subform(subform) |
92 return form |
95 return form |
93 |
96 |
94 |
97 |
95 class WFHistoryView(EntityView): |
98 class WFHistoryView(EntityView): |