changeset 0674f903d814 in trytond:6.2
details: https://hg.tryton.org/trytond?cmd=changeset&node=0674f903d814
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 783000c930e3 -r 0674f903d814 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
@@ -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')

Reply via email to