Merge lp:~credativ/ocb-web/7.0-lp1153853 into lp:ocb-web

Proposed by Craig Gowing (credativ)
Status: Rejected
Rejected by: Holger Brunn (Therp)
Proposed branch: lp:~credativ/ocb-web/7.0-lp1153853
Merge into: lp:ocb-web
Diff against target: 49 lines (+19/-5)
2 files modified
addons/web/static/src/js/view_form.js (+6/-4)
addons/web/static/src/xml/base.xml (+13/-1)
To merge this branch: bzr merge lp:~credativ/ocb-web/7.0-lp1153853
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Disapprove
Review via email: mp+222935@code.launchpad.net
To post a comment you must log in.
lp:~credativ/ocb-web/7.0-lp1153853 updated
4200. By Craig Gowing (credativ)

[FIX] Prevent form fields from turning into inputs, only fields in an embedded tree view

Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

please make a pull request for https://github.com/OCA/OCB if you still consider this fix relevant.

Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

Development for 7.0 has moved to github on https://github.com/OCA/ocb - please move your merge proposal there if it is still valid.

(I close and reject this in order to have a cleaner overview for 6.1 MPs which indeed have to be done on launchpad)

review: Disapprove

Unmerged revisions

4200. By Craig Gowing (credativ)

[FIX] Prevent form fields from turning into inputs, only fields in an embedded tree view

4199. By Craig Gowing (credativ)

[FIX] Allow readonly text fields to be updated with an onchange handler in a tree view

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'addons/web/static/src/js/view_form.js'
--- addons/web/static/src/js/view_form.js 2014-04-18 09:20:33 +0000
+++ addons/web/static/src/js/view_form.js 2014-06-24 09:32:08 +0000
@@ -2283,14 +2283,16 @@
2283 },2283 },
2284 render_value: function() {2284 render_value: function() {
2285 var show_value = this.format_value(this.get('value'), '');2285 var show_value = this.format_value(this.get('value'), '');
2286 if (!this.get("effective_readonly")) {2286 if (this.get("effective_readonly")) {
2287 this.$el.find('input').val(show_value);
2288 } else {
2289 if (this.password) {2287 if (this.password) {
2290 show_value = new Array(show_value.length + 1).join('*');2288 show_value = new Array(show_value.length + 1).join('*');
2291 }2289 }
2292 this.$(".oe_form_char_content").text(show_value);2290 if (this.get("effective_invisible") && this.get("readonly") && !this.get("invisible") && this.name != "sequence") {
2291 this.set({"effective_invisible": false});
2292 }
2293 }2293 }
2294 this.$el.find('input').val(show_value);
2295 this.$(".oe_form_char_content").text(show_value);
2294 },2296 },
2295 is_syntax_valid: function() {2297 is_syntax_valid: function() {
2296 if (!this.get("effective_readonly") && this.$("input").size() > 0) {2298 if (!this.get("effective_readonly") && this.$("input").size() > 0) {
22972299
=== modified file 'addons/web/static/src/xml/base.xml'
--- addons/web/static/src/xml/base.xml 2014-04-09 09:34:22 +0000
+++ addons/web/static/src/xml/base.xml 2014-06-24 09:32:08 +0000
@@ -1025,7 +1025,19 @@
1025 /><img class="oe_field_translate oe_input_icon" t-if="widget.field.translate" t-att-src='_s + "/web/static/src/img/icons/terp-translate.png"' width="16" height="16" border="0"/>1025 /><img class="oe_field_translate oe_input_icon" t-if="widget.field.translate" t-att-src='_s + "/web/static/src/img/icons/terp-translate.png"' width="16" height="16" border="0"/>
1026 </t>1026 </t>
1027 <t t-if="widget.get('effective_readonly')">1027 <t t-if="widget.get('effective_readonly')">
1028 <span class="oe_form_char_content"></span>1028 <t t-if="!widget.get('effective_invisible')">
1029 <span class="oe_form_char_content"></span>
1030 </t>
1031 <t t-if="widget.get('effective_invisible')">
1032 <input t-att-type="widget.password ? 'password' : 'text'"
1033 t-att-id="widget.id_for_label"
1034 t-att-tabindex="widget.node.attrs.tabindex"
1035 t-att-autofocus="widget.node.attrs.autofocus"
1036 t-att-placeholder="widget.node.attrs.placeholder"
1037 t-att-maxlength="widget.field.size"
1038 disabled="disabled"
1039 />
1040 </t>
1029 </t>1041 </t>
1030 </span>1042 </span>
1031</t>1043</t>

Subscribers

People subscribed via source and target branches