Merge lp:~openerp-dev/openerp-web/7.0-opw-604815-msh into lp:openerp-web/7.0

Proposed by Mohammed Shekha(Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/7.0-opw-604815-msh
Merge into: lp:openerp-web/7.0
Diff against target: 54 lines (+6/-6)
2 files modified
addons/web/static/src/js/search.js (+4/-4)
addons/web/static/src/xml/base.xml (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-opw-604815-msh
Reviewer Review Type Date Requested Status
Xavier (Open ERP) Pending
Naresh(OpenERP) Pending
Martin Trigaux (OpenERP) Pending
Review via email: mp+210737@code.launchpad.net

Description of the change

Hello,

Advance Filter with Integer or Float field doesn't allow you to enter other decimal separator then .(dot).

Demo: Set your language configuration and add ,(comma) as a decimal separtor, now go to Chrome and try to search in advance filter for integer or float type field with value something like 455,92, You will not get expected result or you may get validation message(depends on chrome version)

Reason: We have used input field type=number and as it is number type field then you can only enter number with .(dot) as a decimal separator.

Thanks.

To post a comment you must log in.

Unmerged revisions

4151. By Mohammed Shekha(OpenERP)<email address hidden>

[FIX]Web Advance Search: Fixed the issue of Advance Search, integer or float field doesn't allow to enter other decimal then dot(.) in chrome browser.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'addons/web/static/src/js/search.js'
--- addons/web/static/src/js/search.js 2014-03-11 10:49:47 +0000
+++ addons/web/static/src/js/search.js 2014-03-13 05:10:36 +0000
@@ -2108,14 +2108,14 @@
2108 {value: "∄", text: _lt("is not set")}2108 {value: "∄", text: _lt("is not set")}
2109 ],2109 ],
2110 toString: function () {2110 toString: function () {
2111 return this.$el.val();2111 return instance.web.format_value(this.get_value(), {'widget': 'integer'});
2112 },2112 },
2113 get_value: function() {2113 get_value: function() {
2114 try {2114 try {
2115 var val =this.$el.val();2115 var val =this.$el.val();
2116 return instance.web.parse_value(val == "" ? 0 : val, {'widget': 'integer'});2116 return instance.web.parse_value(val == "" ? 0 : val, {'widget': 'integer'});
2117 } catch (e) {2117 } catch (e) {
2118 return "";2118 return 0;
2119 }2119 }
2120 }2120 }
2121});2121});
@@ -2135,14 +2135,14 @@
2135 {value: "∄", text: _lt("is not set")}2135 {value: "∄", text: _lt("is not set")}
2136 ],2136 ],
2137 toString: function () {2137 toString: function () {
2138 return this.$el.val();2138 return instance.web.format_value(this.get_value(), {'widget': 'float'});
2139 },2139 },
2140 get_value: function() {2140 get_value: function() {
2141 try {2141 try {
2142 var val =this.$el.val();2142 var val =this.$el.val();
2143 return instance.web.parse_value(val == "" ? 0.0 : val, {'widget': 'float'});2143 return instance.web.parse_value(val == "" ? 0.0 : val, {'widget': 'float'});
2144 } catch (e) {2144 } catch (e) {
2145 return "";2145 return 0.00;
2146 }2146 }
2147 }2147 }
2148});2148});
21492149
=== modified file 'addons/web/static/src/xml/base.xml'
--- addons/web/static/src/xml/base.xml 2013-10-22 16:25:19 +0000
+++ addons/web/static/src/xml/base.xml 2014-03-13 05:10:36 +0000
@@ -1667,10 +1667,10 @@
1667 <span/>1667 <span/>
1668</t>1668</t>
1669<t t-name="SearchView.extended_search.proposition.integer">1669<t t-name="SearchView.extended_search.proposition.integer">
1670 <input type="number" class="field_integer" value = "0" step="1"/>1670 <input class="field_integer" value = "0"/>
1671</t>1671</t>
1672<t t-name="SearchView.extended_search.proposition.float">1672<t t-name="SearchView.extended_search.proposition.float">
1673 <input type="number" class="field_float" value = "0.0" step="0.01"/>1673 <input class="field_float" value = "0.0"/>
1674</t>1674</t>
1675<t t-name="SearchView.extended_search.proposition.selection">1675<t t-name="SearchView.extended_search.proposition.selection">
1676 <select>1676 <select>