[FIX] stock: select seller date

When the function '_select_seller' in stock warehouse is called, a
datetime is passed to it. But the method needs a date, so we modify it.

OPW-1930264

closes odoo/odoo#30563
This commit is contained in:
Pierre Masereel
2019-01-28 09:07:14 +00:00
parent d259b5b8a6
commit a1bb59e54d
+1 -1
View File
@@ -929,7 +929,7 @@ class Orderpoint(models.Model):
# These days will be substracted when creating the PO
days += self.product_id._select_seller(
quantity=product_qty,
date=start_date,
date=fields.Date.context_today(self,start_date),
uom_id=self.product_uom).delay or 0.0
date_planned = start_date + relativedelta.relativedelta(days=days)
return date_planned.strftime(DEFAULT_SERVER_DATETIME_FORMAT)