summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphael Collet <rco@odoo.com>2019-09-30 09:29:31 +0000
committerRaphael Collet <rco@odoo.com>2019-09-30 15:42:36 +0000
commit8606fb3df896389cc09986242da0e913a8515576 (patch)
tree211beb9ef6d498868680fcb49672ce9deeb227d1
parent4b1cb41cf7a3f936a1e6d00a2bb6a6a29e82d711 (diff)
[FIX] models: copy() should recursively copy inactive records
-rw-r--r--odoo/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/models.py b/odoo/models.py
index 3efb5d6f598..0a076effedd 100644
--- a/odoo/models.py
+++ b/odoo/models.py
@@ -4447,7 +4447,7 @@ Record ids: %(records)s
"""
self.ensure_one()
- vals = self.copy_data(default)[0]
+ vals = self.with_context(active_test=False).copy_data(default)[0]
# To avoid to create a translation in the lang of the user, copy_translation will do it
new = self.with_context(lang=None).create(vals)
self.with_context(from_copy_translation=True).copy_translations(new, excluded=default or ())