diff --git a/addons/account/account_bank.py b/addons/account/account_bank.py index acb0e640a7af4..71c126530d44c 100644 --- a/addons/account/account_bank.py +++ b/addons/account/account_bank.py @@ -69,7 +69,8 @@ def post_write(self, cr, uid, ids, context=None): # 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 @@ def post_write(self, cr, uid, ids, context=None): '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, diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index ab46cd9672cf3..22da37cc8d76c 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 'https://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 || {};