Merge lp:~openerp-dev/openerp-web/7.0-opw-597026-chandni into lp:openerp-web/7.0

Proposed by Chandni Machchhar(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/7.0-opw-597026-chandni
Merge into: lp:openerp-web/7.0
Diff against target: 22 lines (+7/-5)
1 file modified
addons/web/static/src/js/view_list.js (+7/-5)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-opw-597026-chandni
Reviewer Review Type Date Requested Status
Vinay Rana (OpenERP) Pending
Naresh(OpenERP) Pending
Review via email: mp+187445@code.launchpad.net

Description of the change

Hello,

I have fixed the error "Uncaught TypeError: Cannot read property 'controller' of undefined". Error comes while clicking on graph view after click on line of tree view.

Steps to reproduce :

--> Active the debug mode.
--> Goto Menu Reporting > Lead Analysis > Edit Action
    Remove the context 'group_by_no_leaf':1
--> Now refresh window Remove the filter from search view so that lines will be displayed in tree view. Now click on line then click on Graph view. It will give you error.

This is because after clicking on line it will assume that form view should open but if form view is not defined then it will give you Error.

Thanks,
Chandni

To post a comment you must log in.

Unmerged revisions

4028. By Chandni Machchhar(OpenERP)

[FIX] Error while clicking on graph view after click on line of tree view.

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/view_list.js'
2--- addons/web/static/src/js/view_list.js 2013-06-10 07:10:36 +0000
3+++ addons/web/static/src/js/view_list.js 2013-09-25 06:09:54 +0000
4@@ -454,11 +454,13 @@
5 * @param {String} [view="page"] the view type to switch to
6 */
7 select_record:function (index, view) {
8- view = view || index == null ? 'form' : 'form';
9- this.dataset.index = index;
10- _.delay(_.bind(function () {
11- this.do_switch_view(view);
12- }, this));
13+ view = view || index == null ? 'form' : (this.ViewManager.views['form'] ? 'form': null);
14+ if (view) {
15+ this.dataset.index = index;
16+ _.delay(_.bind(function () {
17+ this.do_switch_view(view);
18+ }, this));
19+ }
20 },
21 do_show: function () {
22 this._super();