Do not copy caches of stock periods

Closes #14639
This commit is contained in:
Cédric Krier
2026-03-02 14:15:14 +01:00
parent 3d41e8c42b
commit 1367643bd0
+6
View File
@@ -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')