Merge lp:~openerp-dev/openerp-web/7.0-bug-1121934-vme into lp:openerp-web/7.0

Proposed by Vidhin Mehta (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/7.0-bug-1121934-vme
Merge into: lp:openerp-web/7.0
Diff against target: 55 lines (+8/-9)
1 file modified
addons/web_view_editor/static/src/js/view_editor.js (+8/-9)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-bug-1121934-vme
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+155929@code.launchpad.net

Description of the change

Render selected record from list view in Manage View.

To post a comment you must log in.

Unmerged revisions

3868. By Vidhin Mehta (OpenERP)

[FIX]view editor's wrong view_id pass

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web_view_editor/static/src/js/view_editor.js'
2--- addons/web_view_editor/static/src/js/view_editor.js 2013-03-21 15:28:31 +0000
3+++ addons/web_view_editor/static/src/js/view_editor.js 2013-03-28 10:52:21 +0000
4@@ -15,7 +15,7 @@
5 }
6 evt.currentTarget.selectedIndex = 0;
7 }else{
8- return this._super.apply(this,arguments);
9+ return this._super.apply(this,arguments);
10 }
11 }
12 });
13@@ -73,12 +73,10 @@
14 $.when(this.action_manager.do_action(action)).done(function() {
15 var viewmanager = self.action_manager.inner_widget;
16 var controller = viewmanager.views[viewmanager.active_view].controller;
17- controller.on('view_loaded', self, function(){
18- $(controller.groups).bind({
19- 'selected': function(e, ids, records) {
20- self.main_view_id = ids[0];
21- }
22- });
23+ $(controller.groups).bind({
24+ 'selected': function(e, ids, records) {
25+ self.main_view_id = ids[0];
26+ }
27 });
28 });
29 },
30@@ -412,6 +410,7 @@
31 }},
32 {text: _t("Close"), click: function(){
33 self.action_manager.inner_widget.views[self.action_manager.inner_widget.active_view].controller.reload_content();
34+ self.main_view_id = self.parent.fields_view.view_id;
35 self.edit_xml_dialog.close();
36 }}
37 ]
38@@ -535,7 +534,7 @@
39 var field_dataset = new instance.web.DataSetSearch(this, this.model, null, null);
40 parent_tr = self.get_object_by_id(parseInt($(parent_tr).attr('id').replace(/[^0-9]+/g, '')), this.one_object['main_object'], [])[0].att_list[0];
41 _.each([tr, parent_tr],function(element) {
42- var value = _.has(_CHILDREN, element) ? element : _.str.include(html_tag, element)?"html_tag":false;
43+ var value = _.has(_CHILDREN, element) ? element : _.str.include(html_tag, element)?"html_tag":false;
44 property_to_check.push(value);
45 });
46 field_dataset.call( 'fields_get', []).done(function(result) {
47@@ -1186,7 +1185,7 @@
48 //e.g.:xyz 'td' : ['field']
49 };
50 // Generic html_tag list and can be added html tag in future. It's support above _CHILDREN dict's *html_tag* by default.
51-// For specific child node one has to define tag above and specify children tag in list. Like above xyz example.
52+// For specific child node one has to define tag above and specify children tag in list. Like above xyz example.
53 var html_tag = ['div','h1','h2','h3','h4','h5','h6','td','tr'];
54
55 var _ICONS = ['','STOCK_ABOUT', 'STOCK_ADD', 'STOCK_APPLY', 'STOCK_BOLD',