Merge lp:~openerp-dev/openerp-web/6.1-opw-579054-msh into lp:openerp-web/6.1

Proposed by Mohammed Shekha(Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/6.1-opw-579054-msh
Merge into: lp:openerp-web/6.1
Diff against target: 70 lines (+30/-1)
3 files modified
addons/web_dashboard/static/src/css/dashboard.css (+5/-0)
addons/web_dashboard/static/src/js/dashboard.js (+24/-0)
addons/web_dashboard/static/src/xml/web_dashboard.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/6.1-opw-579054-msh
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+124863@code.launchpad.net

Description of the change

Hello,

Add the feature of view open on dashboard title click.

Demo :- Click on title of each view of dashboard, previously it was supported in 6.0, hence also make it supported in 6.1.

Thanks.

To post a comment you must log in.
2459. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2460. By Olivier Dony (Odoo)

[FIX] OPW 577261, 573269: properly refresh one2many records after clicking on a form button

This patch reverts the previous patch for OPW 573269
that did not properly fix all cases (workflow buttons
for instance). This is a backport of the trunk fix.

previous fix: rev-id: <email address hidden>
trunk fix: r.3104 rev-id: <email address hidden>

Revision history for this message
Mohammed Shekha(Open ERP) (msh-openerp) wrote :

Hello,

Re-fixed this and opened the views according to view_mode instead of opening list_view as a default first.

Thanks.

2461. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2462. By Mohammed Shekha(Open ERP)

[FIX]Refixed the issue of dashboard and remove extra previous commit.

Unmerged revisions

2462. By Mohammed Shekha(Open ERP)

[FIX]Refixed the issue of dashboard and remove extra previous commit.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web_dashboard/static/src/css/dashboard.css'
2--- addons/web_dashboard/static/src/css/dashboard.css 2012-02-06 10:41:38 +0000
3+++ addons/web_dashboard/static/src/css/dashboard.css 2012-10-03 05:18:22 +0000
4@@ -24,6 +24,11 @@
5 background: white url("/web/static/src/img/box-a-header-a.gif") 0% 0% repeat-x;
6 }
7
8+.openerp .oe-dashboard-action .oe-dashboard-action-header span:first-child:hover {
9+ text-decoration: underline;
10+ cursor: pointer;
11+}
12+
13 .openerp h2.oe-dashboard-action-header {
14 margin: 0;
15 padding:4px 4px;
16
17=== modified file 'addons/web_dashboard/static/src/js/dashboard.js'
18--- addons/web_dashboard/static/src/js/dashboard.js 2012-05-18 08:51:05 +0000
19+++ addons/web_dashboard/static/src/js/dashboard.js 2012-10-03 05:18:22 +0000
20@@ -30,6 +30,11 @@
21 this.$element.delegate('.oe-dashboard-column .oe-dashboard-fold', 'click', this.on_fold_action);
22 this.$element.delegate('.oe-dashboard-column .ui-icon-closethick', 'click', this.on_close_action);
23
24+ this.$element.find('h2.oe-dashboard-action-header span').click(function(ev){
25+ if(ev.target === ev.currentTarget)
26+ self.on_header_string($(ev.target).parent());
27+ });
28+
29 // Init actions
30 _.each(this.node.children, function(column, column_index) {
31 _.each(column.children, function(action, action_index) {
32@@ -67,6 +72,25 @@
33 self.do_change_layout(layout);
34 });
35 },
36+ on_header_string: function(target){
37+ var self = this;
38+ var $action = target.parents('.oe-dashboard-action:first'),
39+ id = parseInt($action.attr('data-id'), 10);
40+ action = _(self.action_managers).detect(function(act){
41+ return act.inner_action.id === id;
42+ });
43+
44+ var views;
45+ action = action.inner_action;
46+ views = action.views;
47+ this.do_action({
48+ res_model : action.res_model,
49+ views: views,
50+ domain: action.domain,
51+ type: "ir.actions.act_window",
52+ context: action.context
53+ });
54+ },
55 do_change_layout: function(new_layout) {
56 var $dashboard = this.$element.find('.oe-dashboard');
57 var current_layout = $dashboard.attr('data-layout');
58
59=== modified file 'addons/web_dashboard/static/src/xml/web_dashboard.xml'
60--- addons/web_dashboard/static/src/xml/web_dashboard.xml 2012-02-14 14:29:54 +0000
61+++ addons/web_dashboard/static/src/xml/web_dashboard.xml 2012-10-03 05:18:22 +0000
62@@ -23,7 +23,7 @@
63 <t t-name="DashBoard.action">
64 <div t-att-data-id="action.attrs.name" class="oe-dashboard-action">
65 <h2 t-attf-class="oe-dashboard-action-header #{action.attrs.string ? '' : 'oe-dashboard-action-header-empty'}">
66- <t t-esc="action.attrs.string"/>
67+ <span><t t-esc="action.attrs.string"/></span>
68 <t t-if="!action.attrs.string">&amp;nbsp;</t>
69 <button t-if="action.attrs.creatable and action.attrs.creatable !== 'false'" class="oe_button oe_dashboard_button_create">Create</button>
70 <span class='ui-icon ui-icon-closethick'></span>