Corregida incidencia: #5

This commit is contained in:
onecluster 2021-12-06 16:45:11 -05:00
parent 951e27f70c
commit fc8f2d79d8
1 changed files with 3 additions and 4 deletions

View File

@ -15,7 +15,6 @@ from .exceptions import ErroresGenerales
from trytond.i18n import gettext
logger = logging.getLogger(__name__)
@ -89,18 +88,18 @@ class Purchase(metaclass=PoolMeta):
Invoice.save([invoice])
Invoice.validate_invoice(invoices)
Invoice.post(invoices)
shipment_returns = purchase.shipment_returns
if shipment_returns:
print("shipment_returns")
for shipment_return in shipment_returns:
if shipment_return.from_location != configuration.one_click_to_location:
shipment_return.from_location = configuration.one_click_to_location
shipment_return.effective_date = purchase.purchase_date
shipment_return.assign_force([shipment_return])
shipment_return.wait([shipment_return])
shipment_return.assign_try([shipment_return])
shipment_return.done([shipment_return])
shipment_return.save()
#assert not purchase.shipments
moves = purchase.moves
if moves:
for move in moves: