Sergi Almacellas Abellana pushed to branch branch/default at Tryton / Tryton


Commits:
92a2c368 by Sergi Almacellas Abellana at 2023-01-04T13:59:46+01:00
Clear requests when copying purchase lines

Closes #11989
- - - - -


1 changed file:

- modules/purchase_request/purchase.py


Changes:

=====================================
modules/purchase_request/purchase.py
=====================================
@@ -92,6 +92,12 @@
             })
 
     @classmethod
+    def copy(cls, lines, default=None):
+        default = default.copy() if default is not None else {}
+        default.setdefault('requests')
+        return super().copy(lines, default=default)
+
+    @classmethod
     def delete(cls, lines):
         pool = Pool()
         Request = pool.get('purchase.request')



View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/92a2c368e3f7920227fb310ba8c8b5310338cdbc

-- 
View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/92a2c368e3f7920227fb310ba8c8b5310338cdbc
You're receiving this email because of your account on foss.heptapod.net.


Reply via email to