[FIX] purchase: seller selection

- Create an article with one supplierinfo (with a delivery delay and a
  min. quantity > 0) and a customer delivery delay
- Trigger the creation of a PO by a procurement order for this article

The supplier delivery delay is not taken into account in the date order
of the PO because the seller is not selected.

This is because the procurement quantity is not sent to the seller
selection.

opw-16702
Closes #16702
This commit is contained in:
Thomas Binsfeld
2017-05-04 17:01:50 +02:00
committed by Nicolas Martinelli
parent fb257353fa
commit d7afa84169
+1 -1
View File
@@ -817,7 +817,7 @@ class ProcurementOrder(models.Model):
@api.v8
def _get_purchase_order_date(self, schedule_date):
self.ensure_one()
seller_delay = int(self.product_id._select_seller(self.product_id).delay)
seller_delay = int(self.product_id._select_seller(product_id=self.product_id, quantity=self.product_qty).delay)
return schedule_date - relativedelta(days=seller_delay)
@api.v7