From 3c468b0185077626ef2d2f220294f24923dd504f Mon Sep 17 00:00:00 2001 From: Arnaud Baes Date: Wed, 21 Mar 2018 13:55:13 +0100 Subject: [PATCH] [FIX] stock: run scheduler the "company_id" value wasn't declared explicitly in the "_prepare_procurement_values" method, wich caused the procurement "run" method to set a company by default regardless of the company associated to the orderpoint. this caused issues in a multi-company config. ( see #23764 ) --- addons/stock/models/stock_warehouse.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/stock/models/stock_warehouse.py b/addons/stock/models/stock_warehouse.py index 5711400941e..9b5cebd9638 100644 --- a/addons/stock/models/stock_warehouse.py +++ b/addons/stock/models/stock_warehouse.py @@ -829,5 +829,6 @@ class Orderpoint(models.Model): 'date_planned': date or self._get_date_planned(product_qty, datetime.today()), 'warehouse_id': self.warehouse_id, 'orderpoint_id': self, + 'company_id': self.company_id, 'group_id': group or self.group_id, }