From fb337383bc6c9e4eb3131e1937e5529b09ffdaf9 Mon Sep 17 00:00:00 2001 From: Martin Trigaux <mat@odoo.com> Date: Mon, 29 Aug 2016 17:00:12 +0200 Subject: [PATCH] [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. --- openerp/models.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openerp/models.py b/openerp/models.py index a4a833422fdd..ce12cdd75b74 100644 --- a/openerp/models.py +++ b/openerp/models.py @@ -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): -- GitLab