# HG changeset patch
# User Sergi Almacellas Abellana <sergi@koolpi.com>
# Date 1655292239 -7200
#      Wed Jun 15 13:23:59 2022 +0200
# Node ID f8f7b284a8e52290e0af7daceaafeecdfd68afd7
# Parent  2120f026ab26050c3bdfb1dc2d7e8ebbcc14b71f
Clear PUID when copying parties. Fixes bug #47740

diff -r 2120f026ab26 -r f8f7b284a8e5 tryton/health/health.py
--- a/tryton/health/health.py	Wed Jun 08 18:59:35 2022 +0100
+++ b/tryton/health/health.py	Wed Jun 15 13:23:59 2022 +0200
@@ -726,6 +726,15 @@
         return super(Party, cls).create(vlist)
 
     @classmethod
+    def copy(cls, parties, default=None):
+        if default is None:
+            default = {}
+        else:
+            default = default.copy()
+        default.setdefault('ref', None)
+        return super().copy(parties, default=default)
+
+    @classmethod
     def __setup__(cls):
         super(Party, cls).__setup__()
         t = cls.__table__()
