details: https://code.tryton.org/tryton/commit/eef55ab1c5ae
branch: 7.0
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 db44783a358e -r eef55ab1c5ae modules/stock/period.py
--- a/modules/stock/period.py Mon Mar 02 23:14:26 2026 +0100
+++ b/modules/stock/period.py Mon Mar 02 14:15:14 2026 +0100
@@ -79,6 +79,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):