From 1b3d045ceed3fad80bc5740c41731791ec09b6cd Mon Sep 17 00:00:00 2001 From: "Vidhin Mehta (OpenERP)" Date: Wed, 31 Oct 2012 15:37:37 +0530 Subject: [PATCH 01/14] [FIX] added *.id* field manually. lp bug: https://launchpad.net/bugs/1071794 fixed bzr revid: vme@tinyerp.com-20121031100737-u0r015etp6jilo80 --- addons/web/controllers/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 72ffd9567f6..4dabc4c2846 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -1767,7 +1767,9 @@ class Export(View): def fields_info(self, req, model, export_fields): info = {} fields = self.fields_get(req, model) - + if ".id" in export_fields: + fields['.id'] = fields.pop('id', {'string': 'ID'}) + # To make fields retrieval more efficient, fetch all sub-fields of a # given field at the same time. Because the order in the export list is # arbitrary, this requires ordering all sub-fields of a given field From 16203707c3aa0772de2f9e5f1962e33671d80409 Mon Sep 17 00:00:00 2001 From: Arnaud Pineux Date: Thu, 22 Nov 2012 09:26:30 +0100 Subject: [PATCH 02/14] [IMP] change order for top menu item sequence number bzr revid: api@openerp.com-20121122082630-ujk49g77z1mb8gqg --- openerp/addons/base/res/res_partner_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index 28b9e960ebe..a12fa1285b3 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -6,7 +6,7 @@ + sequence="20"/> From e1d6502f7c62518163810492d74c6c70388ce401 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 22 Nov 2012 10:43:47 +0100 Subject: [PATCH 03/14] [FIX] problem with sidebar_eval_context bzr revid: nicolas.vanhoren@openerp.com-20121122094347-q8evcsk7np2ja8xb --- addons/web/static/src/js/views.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 08f15242c7d..81662ac6487 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -1334,7 +1334,7 @@ instance.web.View = instance.web.Widget.extend({ new instance.web.DataExport(this, this.dataset).open(); }, sidebar_eval_context: function () { - return $.when(); + return $.when({}); }, /** * Asks the view to reload itself, if the reloading is asynchronous should From 425ea97a392246306efa69794a804c38c7727a64 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 22 Nov 2012 11:07:38 +0100 Subject: [PATCH 04/14] [IMP] Corrected small stuff in Dialog widget and added documentation. bzr revid: nicolas.vanhoren@openerp.com-20121122100738-8hi8lcsnh5yf7xwt --- addons/web/static/src/js/chrome.js | 57 ++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 3bc2a010702..e800012afb1 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -52,8 +52,27 @@ instance.web.dialog = function(element) { return result; }; +/** + A useful class to handle dialogs. + + Attributes: + - $buttons: A jQuery element targeting a dom part where buttons can be added. It always exists + during the lifecycle of the dialog. +*/ instance.web.Dialog = instance.web.Widget.extend({ dialog_title: "", + /** + Constructor. + + @param {Widget} parent + @param {dictionary} options A dictionary that will be forwarded to jQueryUI Dialog. Additionaly, that + dictionary can contain the following keys: + - buttons: The buttons key is not propagated to jQueryUI Dialog. It must be a dictionary (key = button label, + value = click handler) or a list of dictionaries (each element in the dictionary is send to the corresponding + method of a jQuery element targeting the