details:   https://code.tryton.org/tryton/commit/7438b1a7106d
branch:    7.6
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 dd354c982cd4 -r 7438b1a7106d modules/stock/period.py
--- a/modules/stock/period.py   Sun Mar 08 13:03:34 2026 +0100
+++ b/modules/stock/period.py   Mon Mar 02 14:15:14 2026 +0100
@@ -78,6 +78,12 @@
         return str(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