From 23f6c03942c03bdd0823bbee44f7692250da6eb4 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Wed, 12 Oct 2011 10:25:34 +0200 Subject: [PATCH 01/11] [fix] forgot to return promise in the do_save() of the form view bzr revid: nicolas.vanhoren@openerp.com-20111012082534-dzz1upvvntjs4b1s --- addons/web/static/src/js/view_form.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index c940f4909e9..3121a91b7dc 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -405,6 +405,7 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView# } }; this.save_lock = this.save_lock.pipe(action, action); + return this.save_lock; }, do_save_edit: function() { this.do_save(); From 2e9c6392ea6c7b11e213db1a8d82793323aa47a4 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 12 Oct 2011 10:57:13 +0200 Subject: [PATCH 02/11] [FIX] remove default_home entirely bzr revid: xmo@openerp.com-20111012085713-upc0xto0dqf9k4fb --- addons/web/static/src/js/core.js | 1 - addons/web_default_home/po/da.po | 38 -------------------------------- 2 files changed, 39 deletions(-) delete mode 100644 addons/web_default_home/po/da.po diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 0d5b95ef669..da9c21bf551 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -74,7 +74,6 @@ openerp.web.qweb.debug = (window.location.search.indexOf('?debug') !== -1); } return this; } - // This should NOT be used, like callbackenable it's too hackish not enough javasish Class.include = function (properties) { for (var name in properties) { if (typeof properties[name] !== 'function' diff --git a/addons/web_default_home/po/da.po b/addons/web_default_home/po/da.po deleted file mode 100644 index a56583755e5..00000000000 --- a/addons/web_default_home/po/da.po +++ /dev/null @@ -1,38 +0,0 @@ -# Danish translation for openerp-web -# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 -# This file is distributed under the same license as the openerp-web package. -# FIRST AUTHOR , 2011. -# -msgid "" -msgstr "" -"Project-Id-Version: openerp-web\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2011-10-07 10:39+0200\n" -"PO-Revision-Date: 2011-10-11 14:02+0000\n" -"Last-Translator: Jonas Mortensen \n" -"Language-Team: Danish \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-10-12 04:44+0000\n" -"X-Generator: Launchpad (build 14124)\n" - -#: addons/web_default_home/static/src/xml/web_default_home.xml:0 -msgid "Welcome to your new OpenERP instance." -msgstr "Velkommen til din nye OpenERP instans." - -#: addons/web_default_home/static/src/xml/web_default_home.xml:0 -msgid "Remember to bookmark this page." -msgstr "Husk at tilføje denne side til dine favoritter." - -#: addons/web_default_home/static/src/xml/web_default_home.xml:0 -msgid "Remember your login:" -msgstr "Husk dit log ind:" - -#: addons/web_default_home/static/src/xml/web_default_home.xml:0 -msgid "Choose the first OpenERP Application you want to install.." -msgstr "Vælg den første OpenERP Applikation som du ønsker at installere." - -#: addons/web_default_home/static/src/xml/web_default_home.xml:0 -msgid "Install" -msgstr "Installér" From 12e97f3e8e0fa87da5eabcd62c61cf586ac48c6f Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Wed, 12 Oct 2011 10:58:52 +0200 Subject: [PATCH 03/11] [fix] problem with get_value() on o2m when it is called without calling is_dirty() first. bzr revid: nicolas.vanhoren@openerp.com-20111012085852-6tcqn1rmn00qoaqy --- addons/web/static/src/js/view_form.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 3121a91b7dc..55957388720 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2003,6 +2003,7 @@ openerp.web.form.FieldOne2Many = openerp.web.form.Field.extend({ var self = this; if (!this.dataset) return []; + this.save_form_view(); var val = this.dataset.delete_all ? [commands.delete_all()] : []; val = val.concat(_.map(this.dataset.ids, function(id) { var alter_order = _.detect(self.dataset.to_create, function(x) {return x.id === id;}); From bfbfbc4ac64bd135d5116f4094a78b24d31ba0f2 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Wed, 12 Oct 2011 11:03:57 +0200 Subject: [PATCH 04/11] [FIX] orm.copy(): corrected return value in docstring. bzr revid: vmt@openerp.com-20111012090357-2lt8md5s37qp2vm1 --- openerp/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index ad40ac66093..ac84d6df713 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -4598,7 +4598,7 @@ class BaseModel(object): :type default: dictionary :param context: context arguments, like lang, time zone :type context: dictionary - :return: True + :return: id of the newly created record """ if context is None: From bd8f7a36a65f40b8f9112de219297daa725ae320 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Wed, 12 Oct 2011 11:11:47 +0200 Subject: [PATCH 05/11] [fix] occasional problem when a form try to validate a o2m before it finished updating bzr revid: nicolas.vanhoren@openerp.com-20111012091147-k9nm1yzftm2oalo1 --- addons/web/static/src/js/view_form.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 55957388720..02832f49250 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2041,6 +2041,8 @@ openerp.web.form.FieldOne2Many = openerp.web.form.Field.extend({ }, validate: function() { this.invalid = false; + if (!this.viewmanager.views[this.viewmanager.active_view]) + return; var view = this.viewmanager.views[this.viewmanager.active_view].controller; if (this.viewmanager.active_view === "form") { for (var f in view.fields) { From a7a73ee0c0efa56144f2d6c9572b06079d2d3a92 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 12 Oct 2011 11:00:38 +0200 Subject: [PATCH 06/11] [FIX] don't hide errors under the carpet bzr revid: xmo@openerp.com-20111012090038-o52egjn334s53a1s --- addons/web_dashboard/controllers.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/addons/web_dashboard/controllers.py b/addons/web_dashboard/controllers.py index ebf74837899..37fe039366c 100644 --- a/addons/web_dashboard/controllers.py +++ b/addons/web_dashboard/controllers.py @@ -22,11 +22,7 @@ class Widgets(openerpweb.Controller): _cp_path = '/web_dashboard/widgets' @openerpweb.httprequest - def content(self, req, widget_id): - Widget = req.session.model('res.widget') - w = Widget.read([widget_id], ['content'], req.session.eval_context(req.context)) - if w: - r = WIDGET_CONTENT_PATTERN % w[0] - else: - r = "Widget unavailable" - return r + def content(self, request, widget_id): + return WIDGET_CONTENT_PATTERN % request.session.model('res.widget').read( + [widget_id], ['content'], request.session.eval_context(request.context) + )[0] From 8b00901409337144b339b32c6a3209ab7e452ac3 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 12 Oct 2011 11:03:35 +0200 Subject: [PATCH 07/11] [FIX] widgets not being correctly fetched: widget ids are integers, HTTP GET provides strings, need to convert bzr revid: xmo@openerp.com-20111012090335-f2ljdgmhmz7pyurg --- addons/web_dashboard/controllers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_dashboard/controllers.py b/addons/web_dashboard/controllers.py index 37fe039366c..0f6ae5dad7d 100644 --- a/addons/web_dashboard/controllers.py +++ b/addons/web_dashboard/controllers.py @@ -24,5 +24,5 @@ class Widgets(openerpweb.Controller): @openerpweb.httprequest def content(self, request, widget_id): return WIDGET_CONTENT_PATTERN % request.session.model('res.widget').read( - [widget_id], ['content'], request.session.eval_context(request.context) + [int(widget_id)], ['content'], request.session.eval_context(request.context) )[0] From 7a8d4be486e38b840329351308b45c00d1057ab1 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 12 Oct 2011 11:30:31 +0200 Subject: [PATCH 08/11] [FIX] Menus, manual triggering of menus does not work when folded bzr revid: fme@openerp.com-20111012093031-3htkczhktnascdcg --- addons/web/static/src/js/chrome.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 1955298ba27..3b08cc9d36d 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -823,7 +823,9 @@ openerp.web.Menu = openerp.web.Widget.extend(/** @lends openerp.web.Menu# */{ this.session.active_id = id; this.rpc('/web/menu/action', {'menu_id': id}, this.on_menu_action_loaded); } - ev.stopPropagation(); + if (ev) { + ev.stopPropagation(); + } return false; }, do_menu_click: function($clicked_menu, manual) { @@ -866,6 +868,7 @@ openerp.web.Menu = openerp.web.Widget.extend(/** @lends openerp.web.Menu# */{ $sub_menu.hide(); return true; } + return manual; } else { return true; } From 4d582fbd0628a6bb37b5b6499ab757205e03c568 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 12 Oct 2011 11:31:53 +0200 Subject: [PATCH 09/11] [IMP] Homepage: use manual menu triggering for application tiles bzr revid: fme@openerp.com-20111012093153-50sh65dvhw3cds8k --- addons/web_dashboard/static/src/js/dashboard.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/web_dashboard/static/src/js/dashboard.js b/addons/web_dashboard/static/src/js/dashboard.js index 3163453a122..545f453a27e 100644 --- a/addons/web_dashboard/static/src/js/dashboard.js +++ b/addons/web_dashboard/static/src/js/dashboard.js @@ -446,10 +446,8 @@ openerp.web_dashboard.ApplicationTiles = openerp.web.View.extend({ self.$element.append(tiles) .find('.oe-dashboard-home-tile') .click(function () { - var $this = $(this); - $this.closest('.openerp') - .find('.menu a[data-menu=' + $this.data('menuid') + ']') - .click();}); + openerp.webclient.menu.on_menu_click(null, $(this).data('menuid')) + }); }); return r; }, From 2ec5a68b255f3785766727b6487eb58d78f98e4e Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Wed, 12 Oct 2011 11:38:00 +0200 Subject: [PATCH 10/11] [fix] removed useless key record_id in many menu items in accounting, was useless and made web client crash bzr revid: nicolas.vanhoren@openerp.com-20111012093800-jhspdvekym3czv19 --- addons/account/test/account_change_currency.yml | 6 +++--- addons/account/wizard/account_automatic_reconcile_view.xml | 2 +- addons/account/wizard/account_change_currency_view.xml | 2 +- .../wizard/account_reconcile_partner_process_view.xml | 2 +- .../wizard/account_report_aged_partner_balance_view.xml | 2 +- .../account/wizard/account_report_partner_balance_view.xml | 2 +- .../account/wizard/account_report_partner_ledger_view.xml | 2 +- addons/account/wizard/account_state_open_view.xml | 2 +- addons/account/wizard/account_unreconcile_view.xml | 2 +- addons/account/wizard/account_validate_move_view.xml | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/addons/account/test/account_change_currency.yml b/addons/account/test/account_change_currency.yml index 479afd2f2e2..5ec7405d719 100644 --- a/addons/account/test/account_change_currency.yml +++ b/addons/account/test/account_change_currency.yml @@ -33,11 +33,11 @@ - !python {model: account.change.currency}: | self.view_init(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US', - "active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids": + "active_model": "account.invoice", "tz": False, "active_ids": [ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"), }) self.change_currency(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US', - "active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids": + "active_model": "account.invoice", "tz": False, "active_ids": [ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"), }) - @@ -71,7 +71,7 @@ - !python {model: account.change.currency}: | self.change_currency(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US', - "active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids": + "active_model": "account.invoice", "tz": False, "active_ids": [ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"), }) - diff --git a/addons/account/wizard/account_automatic_reconcile_view.xml b/addons/account/wizard/account_automatic_reconcile_view.xml index a18adaa0320..a2fe0b3c689 100644 --- a/addons/account/wizard/account_automatic_reconcile_view.xml +++ b/addons/account/wizard/account_automatic_reconcile_view.xml @@ -42,7 +42,7 @@ form tree,form - {'record_id':active_id} + {} new diff --git a/addons/account/wizard/account_change_currency_view.xml b/addons/account/wizard/account_change_currency_view.xml index 336766a2f42..4504f064a1d 100644 --- a/addons/account/wizard/account_change_currency_view.xml +++ b/addons/account/wizard/account_change_currency_view.xml @@ -25,7 +25,7 @@ form form - {'record_id' : active_id} + {} new diff --git a/addons/account/wizard/account_reconcile_partner_process_view.xml b/addons/account/wizard/account_reconcile_partner_process_view.xml index 457e144e4ab..d7ac5e85d07 100644 --- a/addons/account/wizard/account_reconcile_partner_process_view.xml +++ b/addons/account/wizard/account_reconcile_partner_process_view.xml @@ -28,7 +28,7 @@ form tree,form - {'record_id':active_id} + {} new diff --git a/addons/account/wizard/account_report_aged_partner_balance_view.xml b/addons/account/wizard/account_report_aged_partner_balance_view.xml index fb0952e4614..bd54b925eea 100644 --- a/addons/account/wizard/account_report_aged_partner_balance_view.xml +++ b/addons/account/wizard/account_report_aged_partner_balance_view.xml @@ -37,7 +37,7 @@ form tree,form - {'record_id':active_id} + {} new diff --git a/addons/account/wizard/account_report_partner_balance_view.xml b/addons/account/wizard/account_report_partner_balance_view.xml index 679ef1aa456..6dbe6d7b77b 100644 --- a/addons/account/wizard/account_report_partner_balance_view.xml +++ b/addons/account/wizard/account_report_partner_balance_view.xml @@ -29,7 +29,7 @@ form tree,form - {'record_id':active_id} + {} new This report is analysis by partner. It is a PDF report containing one line per partner representing the cumulative credit balance. diff --git a/addons/account/wizard/account_report_partner_ledger_view.xml b/addons/account/wizard/account_report_partner_ledger_view.xml index 97dcdf8d3f2..c3c731c1954 100644 --- a/addons/account/wizard/account_report_partner_ledger_view.xml +++ b/addons/account/wizard/account_report_partner_ledger_view.xml @@ -34,7 +34,7 @@ form tree,form - {'record_id':active_id} + {} new diff --git a/addons/account/wizard/account_state_open_view.xml b/addons/account/wizard/account_state_open_view.xml index 563a15bff73..d3b68cb5186 100644 --- a/addons/account/wizard/account_state_open_view.xml +++ b/addons/account/wizard/account_state_open_view.xml @@ -27,7 +27,7 @@ form form - {'record_id' : active_id} + {} new diff --git a/addons/account/wizard/account_unreconcile_view.xml b/addons/account/wizard/account_unreconcile_view.xml index 714d64fb400..2efe457b1e2 100644 --- a/addons/account/wizard/account_unreconcile_view.xml +++ b/addons/account/wizard/account_unreconcile_view.xml @@ -64,7 +64,7 @@ form form - {'record_id' : active_id} + {} new diff --git a/addons/account/wizard/account_validate_move_view.xml b/addons/account/wizard/account_validate_move_view.xml index fa3a2774a77..d12ae8d847f 100644 --- a/addons/account/wizard/account_validate_move_view.xml +++ b/addons/account/wizard/account_validate_move_view.xml @@ -66,7 +66,7 @@ form form - {'record_id' : active_id} + {} new This wizard will validate all journal entries of a particular journal and period. Once journal entries are validated, you can not update them anymore. From b8cba803b76a46b9348cbff501671aca55158546 Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Wed, 12 Oct 2011 16:53:02 +0530 Subject: [PATCH 11/11] [FIX]:use name field instead of default_filters because this group remove in group form view lp bug: https://launchpad.net/bugs/872743 fixed bzr revid: ksa@tinyerp.com-20111012112302-rjl3h3ir4i1ee7b9 --- addons/share/share_view.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/share/share_view.xml b/addons/share/share_view.xml index 98a10a3cec8..315f750a7f6 100644 --- a/addons/share/share_view.xml +++ b/addons/share/share_view.xml @@ -1,15 +1,15 @@ - + res.groups.form res.groups form - + - +