97 """display primary entity edition form""" |
97 """display primary entity edition form""" |
98 __regid__ = 'edition' |
98 __regid__ = 'edition' |
99 # add yes() so it takes precedence over deprecated views in baseforms, |
99 # add yes() so it takes precedence over deprecated views in baseforms, |
100 # though not baseforms based customized view |
100 # though not baseforms based customized view |
101 __select__ = one_line_rset() & non_final_entity() & yes() |
101 __select__ = one_line_rset() & non_final_entity() & yes() |
|
102 form_id = 'edition' |
102 |
103 |
103 title = _('modification') |
104 title = _('modification') |
104 |
105 |
105 def cell_call(self, row, col, **kwargs): |
106 def cell_call(self, row, col, **kwargs): |
106 entity = self.cw_rset.complete_entity(row, col) |
107 entity = self.cw_rset.complete_entity(row, col) |
107 self.render_form(entity) |
108 self.render_form(entity) |
108 |
109 |
109 def render_form(self, entity): |
110 def render_form(self, entity): |
110 """fetch and render the form""" |
111 """fetch and render the form""" |
111 self.form_title(entity) |
112 self.form_title(entity) |
112 form = self._cw.vreg['forms'].select('edition', self._cw, entity=entity, |
113 form = self._cw.vreg['forms'].select(self.form_id, self._cw, |
|
114 entity=entity, |
113 submitmsg=self.submited_message()) |
115 submitmsg=self.submited_message()) |
114 self.init_form(form, entity) |
116 self.init_form(form, entity) |
115 form.render(w=self.w) |
117 form.render(w=self.w) |
116 |
118 |
117 def init_form(self, form, entity): |
119 def init_form(self, form, entity): |