Skip to content
Snippets Groups Projects
Commit 43d355c2 authored by Martin Trigaux's avatar Martin Trigaux
Browse files

[IMP] base: better default for translation overwrite


FP request: hide the field from the view as too technical
MAT analysis: it should be true by default as most expected behaviour
(it was the reason why it was displayed in the first place)

closes odoo/odoo#35679

Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
parent caa43300
Branches
Tags
No related merge requests found
......@@ -22,6 +22,7 @@ class BaseLanguageImport(models.TransientModel):
data = fields.Binary('File', required=True, attachment=False)
filename = fields.Char('File Name', required=True)
overwrite = fields.Boolean('Overwrite Existing Terms',
default=True,
help="If you enable this option, existing translations (including custom ones) "
"will be overwritten and replaced by those in this file")
......
......@@ -12,7 +12,7 @@
<field name="code" string="Code" placeholder="e.g. en_US"/>
<field name="data" filename="filename"/>
<field name="filename" invisible="1"/>
<field name="overwrite"/>
<field name="overwrite" groups="base.group_no_one"/>
</group>
<footer>
<button name="import_lang" string="_Import" type="object" class="btn-primary"/>
......
......@@ -266,6 +266,7 @@ class TestTranslationFlow(common.TransactionCase):
'code': 'fr_FR',
'data': export.data,
'filename': export.name,
'overwrite': False,
})
with mute_logger('odoo.addons.base.models.res_lang'):
import_fr.with_context(create_empty_translation=True).import_lang()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment