← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~numerigraphe-team/ocb-web/7.0-hide-oe_read_only into lp:ocb-web

 

Lionel Sausin - Numérigraphe has proposed merging lp:~numerigraphe-team/ocb-web/7.0-hide-oe_read_only into lp:ocb-web.

Requested reviews:
  Stefan Rijnhart (Therp) (stefan-therp)
Related bugs:
  Bug #1156898 in OpenERP Community Backports (Web): "Hide fields in a form in edit-mode as it is possible for view-mode"
  https://bugs.launchpad.net/ocb-web/+bug/1156898

For more details, see:
https://code.launchpad.net/~numerigraphe-team/ocb-web/7.0-hide-oe_read_only/+merge/213016

This patch backported from the trunk makes the style "oe_read_only" hide contents in "edit mode", in a way similar to "oe_edit_only" hiding them in "read only" mode.
It is not a bugfix but an small improvement, but :
- I don't see any risk of regression
- modules that would use "oe_read_only" would work equally well with the standard addons and OCB, only look prettier in OCB v7
- it's in trunk so the style's name should not change now.

The CSS file is only patched, not rebuilt from SASS because it's out of date on the official 7.0 branch (bug #1298267).

This branch runs green on Runbot : http://runbot.openerp.com/numerigraphe-team-7-0-hide-oe-read-only-31998/logs/
-- 
https://code.launchpad.net/~numerigraphe-team/ocb-web/7.0-hide-oe_read_only/+merge/213016
Your team OpenERP Community Backports Team is subscribed to branch lp:ocb-web.
=== modified file 'addons/web/static/src/css/base.css'
--- addons/web/static/src/css/base.css	2014-02-13 14:57:55 +0000
+++ addons/web/static/src/css/base.css	2014-03-27 10:39:22 +0000
@@ -2116,6 +2116,9 @@
 .openerp .oe_form_invisible {
   display: none !important;
 }
+.openerp .oe_form_editable .oe_read_only {
+  display: none !important;
+}
 .openerp .oe_form_readonly .oe_edit_only, .openerp .oe_form_readonly .oe_form_field:empty {
   display: none !important;
 }

=== modified file 'addons/web/static/src/css/base.sass'
--- addons/web/static/src/css/base.sass	2014-02-13 14:57:55 +0000
+++ addons/web/static/src/css/base.sass	2014-03-27 10:39:22 +0000
@@ -1677,6 +1677,9 @@
             @include box-shadow((0 1px 2px rgba(0, 0, 0, .1), 0 1px 1px rgba(255, 255, 255, .8) inset))
     .oe_form_invisible
         display: none !important
+    .oe_form_editable
+        .oe_read_only
+            display: none !important
     .oe_form_readonly
         .oe_edit_only, .oe_form_field:empty
             display: none !important


Follow ups