Merge lp:~openerp-dev/openerp-web/trunk-bug-1101840-bth into lp:openerp-web

Proposed by Bhumi Thakkar (Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/trunk-bug-1101840-bth
Merge into: lp:openerp-web
Diff against target: 17 lines (+4/-1)
1 file modified
addons/web/static/src/js/views.js (+4/-1)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/trunk-bug-1101840-bth
Reviewer Review Type Date Requested Status
OpenERP R&D Web Team Pending
Review via email: mp+167912@code.launchpad.net

Description of the change

Hello,

    Fixed issue of group by on search view. If current model and model of context in action (active_model) are same then pass group by of context in action like action.context.group_by else [].
If models are different and passed fields in group by of context in action and if passed field is not in current model then will get error. Because of that this issue is raised and fixed by condition of matched model.

To post a comment you must log in.
Revision history for this message
Mohammed Shekha(Open ERP) (msh-openerp) wrote :

Hello,

It has already been fixed in revision 3888 with better fix, also the current fix was removing default groupy_by of action context.

For now there is no need of this branch as it has already been merged in trunk.

Thanks.

Revision history for this message
Bern Schneider (mia-11ngola) wrote :

Hello,

This patch resolve this bug but in dashboard, all filters are lost!!

Is there more solutions about that??

Thx,
Vitasoa

Unmerged revisions

3750. By Nicolas JEUDY (njeudy)

[IMP]If model and action_context's model are same then passed group by of action_context else [].

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/js/views.js'
2--- addons/web/static/src/js/views.js 2013-05-23 05:14:07 +0000
3+++ addons/web/static/src/js/views.js 2013-06-07 09:09:54 +0000
4@@ -767,9 +767,12 @@
5 }).done(function (results) {
6 self.dataset._model = new instance.web.Model(
7 self.dataset.model, results.context, results.domain);
8+ var default_groupby = (self.dataset.model === action_context.active_model)
9+ ? action_context.group_by
10+ : [];
11 var groupby = results.group_by.length
12 ? results.group_by
13- : action_context.group_by;
14+ : default_groupby;
15 if (_.isString(groupby)) {
16 groupby = [groupby];
17 }