diff --git a/addons/stock_account/report/stock_forecasted.py b/addons/stock_account/report/stock_forecasted.py index 85020ddf567..db29a54307f 100644 --- a/addons/stock_account/report/stock_forecasted.py +++ b/addons/stock_account/report/stock_forecasted.py @@ -11,7 +11,7 @@ class StockForecasted(models.AbstractModel): def _get_report_header(self, product_template_ids, product_ids, wh_location_ids): """ Overrides to computes the valuations of the stock. """ res = super()._get_report_header(product_template_ids, product_ids, wh_location_ids) - if not self.user_has_groups('stock.group_stock_manager'): + if not self.user_has_groups('stock.group_stock_manager') or not wh_location_ids: return res domain = self._product_domain(product_template_ids, product_ids) company = self.env['stock.location'].browse(wh_location_ids[0]).company_id