From 1367643bd02c84150fc5bd027fa266d17026b65e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 2 Mar 2026 14:15:14 +0100 Subject: [PATCH] Do not copy caches of stock periods Closes #14639 --- modules/stock/period.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/stock/period.py b/modules/stock/period.py index 66d0f24b5e..1ef8c6d3d0 100644 --- a/modules/stock/period.py +++ b/modules/stock/period.py @@ -77,6 +77,12 @@ class Period(Workflow, ModelSQL, ModelView): def get_rec_name(self, name): 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')