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:
commit
0242ea14b1
@ -161,8 +161,9 @@ var UserProfile = Widget.extend({
|
|||||||
method: 'search_read',
|
method: 'search_read',
|
||||||
args: [[["code", "=", session.user_context.lang]], ['name', 'direction']],
|
args: [[["code", "=", session.user_context.lang]], ['name', 'direction']],
|
||||||
}).then(function(lang_data){
|
}).then(function(lang_data){
|
||||||
|
if (lang_data.length) {
|
||||||
var img_src = session.url('/web/image', {
|
var img_src = session.url('/web/image', {
|
||||||
model:'res.lang',
|
model: 'res.lang',
|
||||||
field: 'image',
|
field: 'image',
|
||||||
id: lang_data[0].id,
|
id: lang_data[0].id,
|
||||||
});
|
});
|
||||||
@ -186,6 +187,7 @@ var UserProfile = Widget.extend({
|
|||||||
link1.href = '/web/static/lib/rtl/flectra-rtl-custom.css';
|
link1.href = '/web/static/lib/rtl/flectra-rtl-custom.css';
|
||||||
head.appendChild(link1);
|
head.appendChild(link1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
$avatar.attr('src', avatar_src);
|
$avatar.attr('src', avatar_src);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user