changeset b556db5559b3 in modules/sale:6.2
details: https://hg.tryton.org/modules/sale?cmd=changeset&node=b556db5559b3
description:
        Do not copy resource when creating invoice and shipment

        The resources are already copied in the corresponding process method.

        issue11614
        review413391003
        (grafted from 1eea991d52aaebed1465df46661cff834dd9b2d8)
diffstat:

 sale.py |  6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diffs (23 lines):

diff -r 1e7ef2b55630 -r b556db5559b3 sale.py
--- a/sale.py   Wed Aug 03 23:49:15 2022 +0200
+++ b/sale.py   Mon Aug 01 10:59:26 2022 +0200
@@ -798,10 +798,6 @@
         if getattr(invoice, 'lines', None):
             invoice_lines = list(invoice.lines) + invoice_lines
         invoice.lines = invoice_lines
-        invoice.save()
-
-        invoice.update_taxes()
-        self.copy_resources_to(invoice)
         return invoice
 
     def _group_shipment_key(self, moves, move):
@@ -866,8 +862,6 @@
             shipment = self._get_shipment_sale(Shipment, key)
             shipment.moves = (list(getattr(shipment, 'moves', []))
                 + [x[1] for x in grouped_moves])
-            shipment.save()
-            self.copy_resources_to(shipment)
             shipments.append(shipment)
         return shipments
 

Reply via email to