# HG changeset patch # User Sylvain Thénault # Date 1265716508 -3600 # Node ID cce343c7d18a5913885ea18fc2d0fc5c47b53f5d # Parent 5690bf6d60812fc9243d78c955bce8d05fe547ee fix bug w/ object relation used as inlined form diff -r 5690bf6d6081 -r cce343c7d18a web/views/autoform.py --- a/web/views/autoform.py Tue Feb 09 12:54:44 2010 +0100 +++ b/web/views/autoform.py Tue Feb 09 12:55:08 2010 +0100 @@ -725,7 +725,7 @@ ttype = ttypes[0].type if self.should_inline_relation_form(rschema, ttype, role): formviews = list(self.inline_edition_form_view(rschema, ttype, role)) - card = rschema.rdef(entity.e_schema, ttype).role_cardinality(role) + card = rschema.role_rdef(entity.e_schema, ttype, role).role_cardinality(role) # there is no related entity and we need at least one: we need to # display one explicit inline-creation view if self.should_display_inline_creation_form(rschema, formviews, card):