From a1bb59e54de101350d4356f8649a2aca2fb844bd Mon Sep 17 00:00:00 2001 From: Pierre Masereel Date: Fri, 25 Jan 2019 15:28:02 +0000 Subject: [PATCH] [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 --- addons/stock/models/stock_warehouse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/models/stock_warehouse.py b/addons/stock/models/stock_warehouse.py index dc270bff609..6d408154586 100644 --- a/addons/stock/models/stock_warehouse.py +++ b/addons/stock/models/stock_warehouse.py @@ -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)