Merge branch 'master-issue-105-switch-to-non-language' into 'master'

[FIX] Issue #105 switch the user to non language

See merge request flectra-hq/flectra!140
This commit is contained in:
Parthiv Patel 2018-08-30 14:31:49 +00:00
commit 0242ea14b1
1 changed files with 23 additions and 21 deletions

View File

@ -161,6 +161,7 @@ var UserProfile = Widget.extend({
method: 'search_read',
args: [[["code", "=", session.user_context.lang]], ['name', 'direction']],
}).then(function(lang_data){
if (lang_data.length) {
var img_src = session.url('/web/image', {
model: 'res.lang',
field: 'image',
@ -186,6 +187,7 @@ var UserProfile = Widget.extend({
link1.href = '/web/static/lib/rtl/flectra-rtl-custom.css';
head.appendChild(link1);
}
}
});
$avatar.attr('src', avatar_src);
});