diff -r 2f23148d0870 -r 1eeef3cbf528 web/views/autoform.py --- a/web/views/autoform.py Thu Feb 18 11:08:00 2010 +0100 +++ b/web/views/autoform.py Thu Feb 18 12:13:36 2010 +0100 @@ -169,14 +169,14 @@ :attr etype: the entity type being created in the inline form """ __regid__ = 'inline-creation' - __select__ = (match_kwargs('peid', 'rtype') + __select__ = (match_kwargs('peid', 'petype', 'rtype') & specified_etype_implements('Any')) + _select_attrs = InlineEntityEditionFormView._select_attrs + ('petype',) @property def removejs(self): entity = self._entity() - ttype = self._cw.entity_from_eid(self.peid).__regid__ - rdef = entity.e_schema.rdef(self.rtype, neg_role(self.role), ttype) + rdef = entity.e_schema.rdef(self.rtype, neg_role(self.role), self.petype) card= rdef.role_cardinality(self.role) # when one is adding an inline entity for a relation of a single card, # the 'add a new xxx' link disappears. If the user then cancel the addition, @@ -209,7 +209,7 @@ :attr card: the cardinality of the relation according to role of `peid` """ __regid__ = 'inline-addnew-link' - __select__ = (match_kwargs('peid', 'rtype') + __select__ = (match_kwargs('peid', 'petype', 'rtype') & specified_etype_implements('Any')) _select_attrs = InlineEntityCreationFormView._select_attrs + ('card',) @@ -220,8 +220,8 @@ divid = "addNew%s%s%s:%s" % (self.etype, self.rtype, self.role, self.peid) self.w(u'