Merge lp:~openerp-dev/openerp-web/7.0-opw-595221-fka into lp:openerp-web/7.0

Proposed by Foram Katharotiya (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/7.0-opw-595221-fka
Merge into: lp:openerp-web/7.0
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/7.0-opw-595221-fka
Reviewer Review Type Date Requested Status
Csaba TOTH (community) duplicate Disapprove
OpenERP Core Team Pending
Review via email: mp+175460@code.launchpad.net

Description of the change

Hello,

To reproduce:
Go to Sale -> Customers and group by Country
choose customer and click on button "Quoation and Sales"

Fixed the issue of AssertionError: Fields in 'groupby' must be regular database-persisted fields (no function or related fields), or function fields with store=True.

Thanks,
FKA

To post a comment you must log in.
Revision history for this message
Csaba TOTH (tsabi) wrote :
review: Disapprove (duplicate)
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

4000. By Foram Katharotiya (OpenERP)

[FIX] AssertionError: Fields in 'groupby' must be regular database-persisted fields (no function or related fields), or function fields with store=True

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-06-21 12:44:49 +0000
3+++ addons/web/static/src/js/views.js 2013-07-18 07:45:35 +0000
4@@ -788,9 +788,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 }