changeset a6472b079457 in modules/sale:6.4
details: https://hg.tryton.org/modules/sale?cmd=changeset&node=a6472b079457
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 2d6295e85fa6 -r a6472b079457 sale.py
--- a/sale.py Wed Aug 03 23:47:34 2022 +0200
+++ b/sale.py Mon Aug 01 10:59:26 2022 +0200
@@ -813,10 +813,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):
@@ -881,8 +877,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