[IMP] models: improve the rendering of large fields

one2many, many2many, text and html fields should take all space in a form view
for a better rendering instead of taking only 2 col or not having the label in
front the field.
This commit is contained in:
Martin Trigaux
2016-09-02 15:40:56 +02:00
parent e8db098bac
commit fb337383bc
+6 -3
View File
@@ -1242,11 +1242,14 @@ class BaseModel(object):
for fname, field in self._fields.iteritems():
if field.automatic:
continue
group.append(E.field(name=fname))
if field.type == 'text':
elif field.type in ('one2many', 'many2many', 'text', 'html'):
group.append(E.newline())
group.append(E.field(name=fname, colspan="4"))
group.append(E.newline())
else:
group.append(E.field(name=fname))
group.append(E.separator())
return E.form(group, string=self._description)
return E.form(E.sheet(group, string=self._description))
@api.model
def _get_default_search_view(self):