Merge lp:~openerp-dev/openobject-client-web/6.0-opw-381586-msh into lp:openobject-client-web

Proposed by Mohammed Shekha(Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-client-web/6.0-opw-381586-msh
Merge into: lp:openobject-client-web
Diff against target: 24 lines (+0/-15)
1 file modified
addons/openerp/static/javascript/search.js (+0/-15)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client-web/6.0-opw-381586-msh
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+89199@code.launchpad.net

Description of the change

Hello,

Fixed the issue of new filter which does not work when we do anding on same field, it do the oring by default for same field.

In web we have done a small code which is specifically do oring when there is a same field but if we do oring on same field then it will not work in greater than and less then option which is used with same field, here this will always do an oring so we will not get proper result of anding like less than some date and greated then some date.

Demo:- Go to any search view and create a new filter and select any one field now again select the same field which you have previously selected so you will see it is automatically become OR.

So changed the code accordingly to fix it.

Thanks.

To post a comment you must log in.

Unmerged revisions

4756. By Mohammed Shekha(Open ERP)

[FIX]Fixed the issue of filter which does not work in AND operation for same field.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/openerp/static/javascript/search.js'
2--- addons/openerp/static/javascript/search.js 2011-07-27 11:03:26 +0000
3+++ addons/openerp/static/javascript/search.js 2012-01-19 09:21:28 +0000
4@@ -59,21 +59,6 @@
5 $new_tr.show();
6 }
7
8- var index_row;
9- var $curr_body = $position_tr.closest('tbody');
10- $curr_body.find('#filterlabel').each(function(k, v) {
11-
12- if (jQuery(v).text() != selected_txt) { return; }
13- index_row = k;
14- $new_tr.find('select.expr').hide();
15- $new_tr_lbl.hide();
16- $new_tr.find('label.and_or').remove();
17- jQuery('<label>', {'class': 'and_or'}).text('OR').insertBefore($new_tr_qstring);
18- });
19-
20- if(index_row >= 0) {
21- $position_tr = $curr_body.find('tr.filter_row_class')[index_row];
22- }
23 jQuery($position_tr).after($new_tr);
24 }
25