summaryrefslogtreecommitdiff
path: root/odoo/addons/base/wizard/base_language_install.py
diff options
context:
space:
mode:
authorshs-odoo <shs@odoo.com>2020-06-23 11:20:05 +0000
committerBarad Mahendra <mba@openerp.com>2020-07-17 12:47:34 +0000
commitd35adaa030e68f18516af312c2cdf013e9397114 (patch)
treeec84a2c0ea9dad34d6ff5c8914dce920579cc7a2 /odoo/addons/base/wizard/base_language_install.py
parent00dd5b224b840ab2e9362184068c4c0560244614 (diff)
[IMP] base,base_setup: Improve general languages settings
Purpose of the task is, We saw that users encounter difficulties while installing languages so improve the user onboarding experience when user wants to install a new language. So in this commit, - Change the load langauge wizard title as 'Add Language' and rename the button as 'Add' - Removed documentation link as it is not up to date - Added the 'Add language' button to general settings and it will open the wizard to load the languages. and move the 'manage language' button to the debug mode. - After install added button 'switch to (lang) & close' to switch to newly added language. closes odoo/odoo#53581 Taskid: 2281393 Closes: #53581 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com> Co-authored-by: Nisha Patel <nit@odoo.com>
Diffstat (limited to 'odoo/addons/base/wizard/base_language_install.py')
-rw-r--r--odoo/addons/base/wizard/base_language_install.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/odoo/addons/base/wizard/base_language_install.py b/odoo/addons/base/wizard/base_language_install.py
index 40dd162fbeb..f9f495c56f8 100644
--- a/odoo/addons/base/wizard/base_language_install.py
+++ b/odoo/addons/base/wizard/base_language_install.py
@@ -55,3 +55,10 @@ class BaseLanguageInstall(models.TransientModel):
'type': 'ir.actions.client',
'tag': 'reload',
}
+
+ def switch_lang(self):
+ self.env.user.lang = self.lang
+ return {
+ 'type': 'ir.actions.client',
+ 'tag': 'reload_context',
+ }