From 06f0e2d749d1cb9e2e573dc771a36d55ef76de48 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Thu, 16 Jun 2022 14:29:15 +0200 Subject: [PATCH] Clear invoiced progress when copying works issue11545 review423331004 --- project.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/project.py b/project.py index c958b6f2e4..68ae3b9fa1 100644 --- a/project.py +++ b/project.py @@ -206,6 +206,15 @@ class Progress: origins.append(invoiced_progress) return origins + @classmethod + def copy(cls, records, default=None): + if default is None: + default = {} + else: + default = default.copy() + default.setdefault('invoiced_progress', None) + return super().copy(records, default=default) + class Timesheet: __slots__ = ()