fix generated label for object relation 3.5
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 18 Sep 2009 09:16:40 +0200
branch3.5
changeset 3308 88f5f89d8d1b
parent 3307 d1230b89d887
child 3309 2538daa6651c
fix generated label for object relation
web/formfields.py
--- a/web/formfields.py	Fri Sep 18 09:16:20 2009 +0200
+++ b/web/formfields.py	Fri Sep 18 09:16:40 2009 +0200
@@ -514,7 +514,10 @@
         help = rschema.rproperty(targetschema, eschema, 'description')
     kwargs['required'] = card in '1+'
     kwargs['name'] = rschema.type
-    kwargs['label'] = (eschema.type, rschema.type)
+    if role == 'object':
+        kwargs['label'] = (eschema.type + '_object', rschema.type)
+    else:
+        kwargs['label'] = (eschema.type, rschema.type)
     kwargs.setdefault('help', help)
     if rschema.is_final():
         if skip_meta_attr and rschema in eschema.meta_attributes():