From 2d7a4327e8b48713934aeb46c5aaff2f1fc8b485 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 8 Jun 2012 13:23:58 +0200 Subject: [PATCH 01/75] [ADD] make clicking on the needaction tag/count enable a predefined filter by default bzr revid: xmo@openerp.com-20120608112358-wo8uwd8ad4esrmsx --- addons/web/static/src/js/chrome.js | 67 ++++++++++++++++++------------ 1 file changed, 40 insertions(+), 27 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index a36421f2b2b..2b0f755f75f 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -669,32 +669,36 @@ instance.web.Menu = instance.web.Widget.extend({ * * @param {Number} id the menu_id */ - menu_click: function(id) { - if (id) { - this.do_hide_more(); - // find back the menuitem in dom to get the action - var $item = this.$element.find('a[data-menu=' + id + ']'); - if (!$item.length) { - $item = this.$secondary_menus.find('a[data-menu=' + id + ']'); - } - var action_id = $item.data('action-id'); - // If first level menu doesnt have action trigger first leaf - if (!action_id) { - if(this.$element.has($item).length) { - $sub_menu = this.$secondary_menus.find('.oe_secondary_menu[data-menu-parent=' + id + ']'); - $items = $sub_menu.find('a[data-action-id]').filter('[data-action-id!=""]'); - if($items.length) { - action_id = $items.data('action-id'); - id = $items.data('menu'); - } + menu_click: function(id, needaction) { + if (!id) { return; } + + this.do_hide_more(); + // find back the menuitem in dom to get the action + var $item = this.$element.find('a[data-menu=' + id + ']'); + if (!$item.length) { + $item = this.$secondary_menus.find('a[data-menu=' + id + ']'); + } + var action_id = $item.data('action-id'); + // If first level menu doesnt have action trigger first leaf + if (!action_id) { + if(this.$element.has($item).length) { + var $sub_menu = this.$secondary_menus.find('.oe_secondary_menu[data-menu-parent=' + id + ']'); + var $items = $sub_menu.find('a[data-action-id]').filter('[data-action-id!=""]'); + if($items.length) { + action_id = $items.data('action-id'); + id = $items.data('menu'); } } - this.open_menu(id); - this.current_menu = id; - this.session.active_id = id; - if (action_id) { - this.trigger('menu_click', action_id, id, $item); - } + } + this.open_menu(id); + this.current_menu = id; + this.session.active_id = id; + if (action_id) { + this.trigger('menu_click', { + action_id: action_id, + needaction: needaction, + id: id + }, $item); } }, /** @@ -703,7 +707,8 @@ instance.web.Menu = instance.web.Widget.extend({ * @param {Event} ev the jquery event */ on_menu_click: function(ev) { - this.menu_click($(ev.currentTarget).data('menu')); + var needaction = !!$(ev.target).filter('div.oe_menu_counter').length; + this.menu_click($(ev.currentTarget).data('menu'), needaction); ev.stopPropagation(); return false; }, @@ -988,8 +993,16 @@ instance.web.WebClient = instance.web.Widget.extend({ this._current_state = _.clone(state); $.bbq.pushState(url); }, - on_menu_action: function(action) { - this.action_manager.do_action(action); + on_menu_action: function(options) { + var self = this; + this.rpc("/web/action/load", { action_id: options.action_id }) + .then(function (result) { + var action = result.result; + if (options.needaction) { + action.context.search_default_needaction_pending = true; + } + self.action_manager.do_action(action); + }); }, do_action: function(action) { var self = this; From 3c2c745fa61ed3c2c3df9e46602f763db7587649 Mon Sep 17 00:00:00 2001 From: "DBR (OpenERP)" Date: Wed, 20 Jun 2012 14:21:20 +0530 Subject: [PATCH 02/75] [IMP]purchase: improve the purchase form view bzr revid: dbr@tinyerp.com-20120620085120-l19503yk32ea1kkc --- addons/purchase/purchase_view.xml | 40 +++++++++---------- .../purchase_requisition_view.xml | 2 +- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index 5c107d984ce..72f50a78cf8 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -173,36 +173,34 @@ - + + - - From b9555aaa8a1e6bada62413f2245a4eebb79221d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 29 Jun 2012 10:57:03 +0200 Subject: [PATCH 48/75] [IMP] mail_group: cleaned form view. bzr revid: tde@openerp.com-20120629085703-230ysrp861pxydt1 --- addons/mail/mail_group_view.xml | 46 ++++++++++++----------- addons/mail/static/src/css/mail_group.css | 43 ++++++++++++++++++--- 2 files changed, 61 insertions(+), 28 deletions(-) diff --git a/addons/mail/mail_group_view.xml b/addons/mail/mail_group_view.xml index 921c3b528c4..4b9cfd09c3d 100644 --- a/addons/mail/mail_group_view.xml +++ b/addons/mail/mail_group_view.xml @@ -51,28 +51,30 @@
-
-
- -
-
-
-
-

-
-
- -
-
- -
-
-