From d98ac716c18e78090ee0de32f52b886e104e2114 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 14 Aug 2015 10:40:57 +0200 Subject: [PATCH 1/2] [FIX] account: account type of account created on bank account creation When creating a new bank account e.g. Accounting > Configuration > Accounts > Setup your Bank Accounts When the user leaves the journal blank, a journal, and an account associated to this journal, are automatically created. The account type of the account created could be wrong, as it used the account type of the parent of the first account of internal type `Liquidity`, which could not be an account of account type Cash or Bank, but of account type 'View', and such an account type does not have the right delivery forward method, in order to report correctly the amounts when closing a fiscal year. Instead of using the account type of the parent, it should actually uses the account type of the sibbling, which have a correct delivery forward method opw-647311 --- addons/account/account_bank.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/account/account_bank.py b/addons/account/account_bank.py index acb0e640a7a..71c126530d4 100644 --- a/addons/account/account_bank.py +++ b/addons/account/account_bank.py @@ -69,7 +69,8 @@ class bank(osv.osv): # No liquidity account exists, no template available if not ids: continue - ref_acc_bank = obj_acc.browse(cr, uid, ids[0], context=context).parent_id + sibbling_acc_bank = obj_acc.browse(cr, uid, ids[0], context=context) + ref_acc_bank = sibbling_acc_bank.parent_id while True: new_code = str(ref_acc_bank.code.ljust(dig-len(str(current_num)), '0')) + str(current_num) ids = obj_acc.search(cr, uid, [('code', '=', new_code), ('company_id', '=', bank.company_id.id)]) @@ -81,7 +82,7 @@ class bank(osv.osv): 'name': name, 'code': new_code, 'type': 'liquidity', - 'user_type': ref_acc_bank.user_type.id, + 'user_type': sibbling_acc_bank.user_type.id, 'reconcile': False, 'parent_id': ref_acc_bank.id, 'company_id': bank.company_id.id, From 11cd8ba06c27014d2d73279601f4ca9be9dba7a0 Mon Sep 17 00:00:00 2001 From: Christophe Combelles Date: Fri, 14 Aug 2015 15:34:14 +0200 Subject: [PATCH 2/2] [FIX] web_kanban: access gravatar with current scheme When Odoo is accessed in https, inserting the gravatar image using the http protocol leads to a security alert in most browsers. Closes #3042 --- addons/web_kanban/static/src/js/kanban.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 60e7f1e6585..22da37cc8d7 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -991,7 +991,7 @@ instance.web_kanban.KanbanRecord = instance.web.Widget.extend({ email = _.str.trim(email || '').toLowerCase(); var default_ = _.str.isBlank(email) ? 'mm' : 'identicon'; var email_md5 = $.md5(email); - return 'http://www.gravatar.com/avatar/' + email_md5 + '.png?s=' + size + '&d=' + default_; + return '//www.gravatar.com/avatar/' + email_md5 + '.png?s=' + size + '&d=' + default_; }, kanban_image: function(model, field, id, cache, options) { options = options || {};