summaryrefslogtreecommitdiff
path: root/odoo/tools/translate.py
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2019-01-08 13:36:55 +0000
committerNicolas Lempereur <nle@odoo.com>2019-01-09 15:00:43 +0000
commited99544dfa88fa5769574a0b6db677e8f31edcd1 (patch)
tree6d8298f90cfd4959c9e62fe96ebf8cd5b664187a /odoo/tools/translate.py
parent82ea843585fe6c22108532e2c7918077f11a15d1 (diff)
[FIX] translate.py: really generate missing terms
With 12.0's (#28297) empty translations were no longer added by default with the idea that if needed the "Generate Missing Terms" wizard should be used. But that wizard itself used what was modified so also did not added empty translation. With this changeset, empty translations are added when using the "Generate Missing Terms" wizard. fixes #29184 closes #30037
Diffstat (limited to 'odoo/tools/translate.py')
-rw-r--r--odoo/tools/translate.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/odoo/tools/translate.py b/odoo/tools/translate.py
index ae552b6535e..e5e26799086 100644
--- a/odoo/tools/translate.py
+++ b/odoo/tools/translate.py
@@ -1098,8 +1098,8 @@ def trans_load_data(cr, fileobj, fileformat, lang, lang_name=None, verbose=True,
dic['lang'] = lang
dic.update(pycompat.izip(fields, row))
- # ignore empty value that may be set from base language
- if not dic['value']:
+ # do not import empty values
+ if not env.context.get('create_empty_translation', False) and not dic['value']:
return
if use_pot_reference: