From 07e5b120e608f43973c7250b831800ca637d2e5b Mon Sep 17 00:00:00 2001 From: "Bharat Devnani (OpenERP)" Date: Fri, 22 Jun 2012 17:16:01 +0530 Subject: [PATCH 01/51] [IMP] improved the view of project related modules bzr revid: bde@tinyerp.com-20120622114601-58ivi12560qpw51l --- addons/project/project_view.xml | 2 +- addons/project_issue/project_issue_view.xml | 5 ++++- .../project_issue_sheet_view.xml | 14 +++++++++----- .../project_long_term/project_long_term_view.xml | 4 ++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index f883f007bd6..f6c72655a41 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -361,10 +361,10 @@ + - diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 2b93cfec105..5b48fc8d987 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -90,7 +90,6 @@ - @@ -111,6 +110,10 @@ + + + + diff --git a/addons/project_issue_sheet/project_issue_sheet_view.xml b/addons/project_issue_sheet/project_issue_sheet_view.xml index 2a98f186922..d883fadf2d9 100644 --- a/addons/project_issue_sheet/project_issue_sheet_view.xml +++ b/addons/project_issue_sheet/project_issue_sheet_view.xml @@ -10,11 +10,15 @@ on_change_project(project_id) - - - + + + + + + + diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 18babab66a4..8750c98728f 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -212,7 +212,7 @@ - +

@@ -325,7 +325,7 @@ form - + From 3ed27adc6d269e7a911d54f97f91def721a9be48 Mon Sep 17 00:00:00 2001 From: "Bharat Devnani (OpenERP)" Date: Fri, 22 Jun 2012 18:55:36 +0530 Subject: [PATCH 02/51] [IMP] improved views of project module under configuration wizard bzr revid: bde@tinyerp.com-20120622132536-3ig2s3zwm0n1x06n --- addons/hr_holidays/hr_holidays_view.xml | 4 ++-- addons/resource/resource_view.xml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml index edfff777c3e..31d30fc1d94 100644 --- a/addons/hr_holidays/hr_holidays_view.xml +++ b/addons/hr_holidays/hr_holidays_view.xml @@ -449,8 +449,8 @@ form - - + + diff --git a/addons/resource/resource_view.xml b/addons/resource/resource_view.xml index 4da1a465c42..f3c7deaa994 100644 --- a/addons/resource/resource_view.xml +++ b/addons/resource/resource_view.xml @@ -117,7 +117,7 @@ resource.calendar.attendance tree - + @@ -229,12 +229,12 @@ - - - + + + From 83d2af86765314ee40dac91a7dbc0e1f0f4a3414 Mon Sep 17 00:00:00 2001 From: "Bharat Devnani (OpenERP)" Date: Mon, 25 Jun 2012 13:00:40 +0530 Subject: [PATCH 03/51] [IMP] improved view for date fields bzr revid: bde@tinyerp.com-20120625073040-mtdcgxi9tkjqg0a1 --- addons/resource/resource_view.xml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/addons/resource/resource_view.xml b/addons/resource/resource_view.xml index f3c7deaa994..003bbd8810c 100644 --- a/addons/resource/resource_view.xml +++ b/addons/resource/resource_view.xml @@ -120,8 +120,8 @@ - - + + @@ -132,11 +132,16 @@ form
- - - - - + + + + + @@ -232,9 +237,12 @@ - - - + + From 2cd6293c0ba1a4e952297e32ccd1de9affb2ac05 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Wed, 27 Jun 2012 17:53:13 +0530 Subject: [PATCH 04/51] [REM]: Remove string from resource xml file for Working TIme bzr revid: atp@tinyerp.com-20120627122313-0ysw8fqrmwc1jnoj --- addons/resource/resource_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/resource/resource_view.xml b/addons/resource/resource_view.xml index f6e0eca9eb5..067c3b5cae2 100644 --- a/addons/resource/resource_view.xml +++ b/addons/resource/resource_view.xml @@ -211,7 +211,7 @@ - +
@@ -244,7 +244,7 @@ - + From 0e77215c1b19b53a93a41826b3ced78345f1c0f0 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Wed, 27 Jun 2012 18:36:32 +0530 Subject: [PATCH 05/51] [FIX]: Hours in same line bzr revid: atp@tinyerp.com-20120627130632-297u2vzg40srtwkf --- addons/resource/resource_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/resource/resource_view.xml b/addons/resource/resource_view.xml index 067c3b5cae2..4b9be764279 100644 --- a/addons/resource/resource_view.xml +++ b/addons/resource/resource_view.xml @@ -141,8 +141,8 @@
diff --git a/addons/project_issue_sheet/project_issue_sheet_view.xml b/addons/project_issue_sheet/project_issue_sheet_view.xml index d883fadf2d9..cb2d1f70c96 100644 --- a/addons/project_issue_sheet/project_issue_sheet_view.xml +++ b/addons/project_issue_sheet/project_issue_sheet_view.xml @@ -11,9 +11,8 @@ on_change_project(project_id)
- - + diff --git a/addons/resource/resource.py b/addons/resource/resource.py index c399e0333b0..9a7fadc4c82 100644 --- a/addons/resource/resource.py +++ b/addons/resource/resource.py @@ -262,8 +262,8 @@ class resource_calendar_attendance(osv.osv): 'name' : fields.char("Name", size=64, required=True), 'dayofweek': fields.selection([('0','Monday'),('1','Tuesday'),('2','Wednesday'),('3','Thursday'),('4','Friday'),('5','Saturday'),('6','Sunday')], 'Day of Week', required=True, select=True), 'date_from' : fields.date('Starting Date'), - 'hour_from' : fields.float('Work from', size=8, required=True, help="Working time will start from", select=True), - 'hour_to' : fields.float("Work to", size=8, required=True, help="Working time will end at"), + 'hour_from' : fields.float('Work from', size=8, required=True, help="Start and End time of working.", select=True), + 'hour_to' : fields.float("Work to", size=8, required=True), 'calendar_id' : fields.many2one("resource.calendar", "Resource's Calendar", required=True), } diff --git a/addons/resource/resource_view.xml b/addons/resource/resource_view.xml index 4b9be764279..4dde2ca4860 100644 --- a/addons/resource/resource_view.xml +++ b/addons/resource/resource_view.xml @@ -125,6 +125,7 @@ + @@ -139,7 +140,7 @@ - From 7af6fa7e8f78bef83d161325db7d4268b9bd0222 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 4 Jul 2012 11:56:55 +0200 Subject: [PATCH 13/51] [WIP] breadcrumb bzr revid: fme@openerp.com-20120704095655-kxdhcsb5n7i0i7i6 --- addons/web/static/src/js/views.js | 45 ++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index d623c889e55..56b85f0b876 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -17,7 +17,7 @@ instance.web.ActionManager = instance.web.Widget.extend({ }, start: function() { this._super.apply(this, arguments); - this.bread_crumb = new instance.web.BreadCrumb(this); + this.breadcrumb = new instance.web.BreadCrumb(this); }, dialog_stop: function () { if (this.dialog) { @@ -28,6 +28,7 @@ instance.web.ActionManager = instance.web.Widget.extend({ } }, content_stop: function () { + // TODO: problem with bread crumb here. Check if those references are needed if (this.inner_viewmanager) { this.inner_viewmanager.destroy(); this.inner_viewmanager = null; @@ -124,6 +125,7 @@ instance.web.ActionManager = instance.web.Widget.extend({ console.error("Action manager can't handle action of type " + action.type, action); return; } + console.log("Action", action); return this[type](action, on_close); }, null_action: function() { @@ -155,7 +157,7 @@ instance.web.ActionManager = instance.web.Widget.extend({ } else { this.dialog_stop(); //this.content_stop(); - this.bread_crumb.hide_all(); + this.breadcrumb.hide_all(); if(action.menu_id) { return this.getParent().do_action(action, function () { instance.webclient.menu.open_menu(action.menu_id); @@ -165,8 +167,8 @@ instance.web.ActionManager = instance.web.Widget.extend({ this.inner_viewmanager = new instance.web.ViewManagerAction(this, action); this.inner_viewmanager.appendTo(this.$element); this.inner_viewmanager.$element.addClass("oe_view_manager_" + action.target); - this.bread_crumb.add({ - view_manager: this.inner_viewmanager, + this.breadcrumb.add({ + widget: this.inner_viewmanager, action: action, title: action.name }); @@ -188,10 +190,16 @@ instance.web.ActionManager = instance.web.Widget.extend({ }); }, ir_actions_client: function (action) { - this.content_stop(); + //this.content_stop(); this.dialog_stop(); + this.breadcrumb.hide_all(); var ClientWidget = instance.web.client_actions.get_object(action.tag); (this.client_widget = new ClientWidget(this, action.params)).appendTo(this.$element); + this.breadcrumb.add({ + widget: this.client_widget, + action: action, + title: action.name + }); }, ir_actions_report_xml: function(action, on_closed) { var self = this; @@ -233,10 +241,11 @@ instance.web.BreadCrumb = instance.web.CallbackEnabled.extend({ }, add: function(item) { this.items.push(item); + console.log("BreadCrumb: add ", item); }, hide_all: function() { _.each(this.items, function(i) { - i.view_manager.$element.hide(); + i.widget.$element.hide(); }); }, get_title: function() { @@ -251,14 +260,30 @@ instance.web.BreadCrumb = instance.web.CallbackEnabled.extend({ for (var i = index + 1; i < this.items.length; i += 1) { this.remove_item(i); } - this.items[index].view_manager.$element.show(); + var item = this.items[index]; + if (item) { + item.widget.$element.show(); + } else { + console.warn("Breadcrumb: Can't select item at index", index); + } }, remove_item: function(index) { var item = this.items.splice(index, 1)[0]; if (item) { - item.view_manager.destroy(); + item.widget.destroy(); + } else { + console.warn("Breadcrumb: Can't remove item at index", index); } - } + }, + clear: function() { + while (this.items.length) { + this.remove_item(0); + } + }, + back: function() { + this.remove_item(this.items.length - 1); + this.select_item(this.items.length - 1); + }, }); instance.web.ViewManager = instance.web.Widget.extend({ @@ -752,7 +777,7 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({ display_title: function () { var am = this.getParent(); if (am) { - return am.bread_crumb.get_title(); + return am.breadcrumb.get_title(); } else { return _.escape(this.action.name); } From 793f31c2a7c66872ab368a0935f62510ee4a9e65 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Wed, 4 Jul 2012 15:40:58 +0530 Subject: [PATCH 14/51] [IMP]: Improve analytic_contract_project view bzr revid: atp@tinyerp.com-20120704101058-q31s9l6gaorwar8v --- .../analytic_contract_project_view.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/analytic_contract_project/analytic_contract_project_view.xml b/addons/analytic_contract_project/analytic_contract_project_view.xml index 545c8ac8691..2b7d965cd94 100644 --- a/addons/analytic_contract_project/analytic_contract_project_view.xml +++ b/addons/analytic_contract_project/analytic_contract_project_view.xml @@ -15,7 +15,9 @@ diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 9dbef53ddd6..5f4a1f95228 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -387,7 +387,7 @@ form - +