details: https://code.tryton.org/tryton/commit/98f084b6b8d3
branch: 6.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 e227deac080d -r 98f084b6b8d3 modules/stock/period.py
--- a/modules/stock/period.py Mon Mar 02 23:14:49 2026 +0100
+++ b/modules/stock/period.py Mon Mar 02 14:15:14 2026 +0100
@@ -72,6 +72,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):