Merge lp:~openerp-dev/openerp-web/7.0-opw-593605-cpa into lp:openerp-web/7.0

Proposed by Chirag Patel (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/7.0-opw-593605-cpa
Merge into: lp:openerp-web/7.0
Diff against target: 12 lines (+1/-1)
1 file modified
addons/web/static/src/js/views.js (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-opw-593605-cpa
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+169774@code.launchpad.net

Description of the change

Hello,

Group_by passed in wrong model.

Demo: Project
1) Group by 'Parent'
2) select list view.
3) Open any record.
4) Click on 'Timesheets' or 'Tasks' button.

Observed :

assert groupby_def and groupby_def._classic_write, "Fields in 'groupby' must be regular database-persisted fields (no function or related fields), or function fields with store=True"

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

Thanks

To post a comment you must log in.
Revision history for this message
Bern Schneider (mia-11ngola) wrote :

Hi,

Thanks for this patch, this resolve the bug but all group by in dashbord are lost with this patch!!

Is there more solutions about that?

Thx,
Vitasoa

Unmerged revisions

3974. By Chirag Patel <email address hidden>

[FIX] Fixed group_by passed in wrong model.

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-13 11:22:02 +0000
3+++ addons/web/static/src/js/views.js 2013-06-17 12:42:28 +0000
4@@ -776,7 +776,7 @@
5 self.dataset.model, results.context, results.domain);
6 var groupby = results.group_by.length
7 ? results.group_by
8- : action_context.group_by;
9+ : (self.dataset.model === action_context.active_model) ? action_context.group_by : [];
10 if (_.isString(groupby)) {
11 groupby = [groupby];
12 }