changeset 61b946049607 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset&node=61b946049607
description:
Do not copy module fields when copying translations
issue11628
review413431003
diffstat:
trytond/ir/translation.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diffs (17 lines):
diff -r 02fa6f9e3d64 -r 61b946049607 trytond/ir/translation.py
--- a/trytond/ir/translation.py Sun Aug 07 23:42:57 2022 +0200
+++ b/trytond/ir/translation.py Mon Aug 08 22:16:56 2022 +0200
@@ -627,6 +627,13 @@
return cls._translation_report_cache.get(key, {}).get(text, text)
@classmethod
+ def copy(cls, translations, default=None):
+ default = default.copy() if default is not None else {}
+ default.setdefault('module')
+ default.setdefault('overriding_module')
+ return super().copy(translations, default=default)
+
+ @classmethod
def delete(cls, translations):
pool = Pool()
Message = pool.get('ir.message')