summaryrefslogtreecommitdiff
path: root/odoo/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'odoo/models.py')
-rw-r--r--odoo/models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/odoo/models.py b/odoo/models.py
index 7178f27f24c..8ebd58f4b1d 100644
--- a/odoo/models.py
+++ b/odoo/models.py
@@ -4311,11 +4311,12 @@ Fields:
if vals['lang'] == old.env.lang and field.translate is True:
# force a source if the new_val was not changed by copy override
if new_val == old[name]:
- vals['source'] = old_wo_lang[name]
+ new_wo_lang[name] = old_wo_lang[name]
+ vals['src'] = old_wo_lang[name]
# the value should be the new value (given by copy())
vals['value'] = new_val
vals_list.append(vals)
- Translation.create(vals_list)
+ Translation._upsert_translations(vals_list)
@api.multi
@api.returns('self', lambda value: value.id)