details:   https://code.tryton.org/tryton/commit/fa6c74745b62
branch:    7.8
user:      Cédric Krier <[email protected]>
date:      Mon Mar 02 14:15:14 2026 +0100
description:
        Do not copy caches of stock periods

        Closes #14639
        (grafted from 3233ab5e7921693d93369d7ae8f353f6da265c67)
diffstat:

 modules/stock/period.py |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 9900557fe484 -r fa6c74745b62 modules/stock/period.py
--- a/modules/stock/period.py   Fri Jan 23 19:09:31 2026 +0100
+++ b/modules/stock/period.py   Mon Mar 02 14:15:14 2026 +0100
@@ -78,6 +78,12 @@
         return Pool().get('ir.lang').get().strftime(self.date)
 
     @classmethod
+    def copy(cls, periods, default=None):
+        default = default.copy() if default is not None else {}
+        default.setdefault('caches')
+        return super().copy(periods, default=default)
+
+    @classmethod
     @ModelView.button
     @Workflow.transition('draft')
     def draft(cls, periods):

Reply via email to