changeset 7462e64a0a9d in trytond:6.4
details: https://hg.tryton.org/trytond?cmd=changeset&node=7462e64a0a9d
description:
        Do not copy module fields when copying translations

        issue11628
        review413431003
        (grafted from 61b9460496075cfb629037cb7302ab02e3ca931a)
diffstat:

 trytond/ir/translation.py |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diffs (17 lines):

diff -r 7f5d5c20b13e -r 7462e64a0a9d trytond/ir/translation.py
--- a/trytond/ir/translation.py Sat May 07 10:58:45 2022 +0200
+++ b/trytond/ir/translation.py Mon Aug 08 22:16:56 2022 +0200
@@ -626,6 +626,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')

Reply via email to