diff options
| author | Fabien Meghazi <fme@openerp.com> | 2012-06-04 13:44:33 +0200 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2012-06-04 13:44:33 +0200 |
| commit | 1317543d72ed42ab079dbced6209388200532b13 (patch) | |
| tree | 0c88a11ec7d3ad75cfc86bf7cefda3e06e2ae9cd /addons/web/static/src | |
| parent | 4d80adac5b029e1a71e823fb21fe4994a452131d (diff) | |
[IMP] Hide empty fields in form readonly
bzr revid: fme@openerp.com-20120604114433-4dvm68xvdmln0ck6
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/css/base.css | 3 | ||||
| -rw-r--r-- | addons/web/static/src/css/base.sass | 3 | ||||
| -rw-r--r-- | addons/web/static/src/js/view_form.js | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 6f4fcde3e95..3ee93c21b16 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1893,6 +1893,9 @@ .openerp .oe_form .oe_form_group_cell .oe_kanban_view { position: static; } +.openerp .oe_form .oe_form_readonly .oe_form_field:empty { + display: none; +} .openerp .oe_form .oe_form_button.oe_button { height: 22px; white-space: nowrap; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 4283a9633b3..1d1dabe3c6d 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1520,6 +1520,9 @@ $colour4: #8a89ba .oe_form_group_cell .oe_kanban_view // Hack due to absolute positioning of kanban view messing with o2m position: static + + .oe_form_readonly .oe_form_field:empty + display: none // }}} // FormView.buttons {{{ .oe_form diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 6bc708527af..be78ce8f006 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -1004,7 +1004,7 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt this.process($new_sheet); }, process_form: function($form) { - if ($form.find('> sheet').length == 0) { + if ($form.find('> sheet').length === 0) { $form.addClass('oe_form_nosheet'); } var $new_form = this.render_element('FormRenderingForm', $form.getAttributes()); |
