From 6d92703060a2a33728b405617a2c69360d5bb06f Mon Sep 17 00:00:00 2001 From: Jan Prokop Date: Thu, 19 May 2022 10:55:40 +0200 Subject: [PATCH] change evaluation company_id --- stock_move_location/wizard/stock_move_location.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock_move_location/wizard/stock_move_location.py b/stock_move_location/wizard/stock_move_location.py index 48f3c0bc6..d2c4c5a8d 100644 --- a/stock_move_location/wizard/stock_move_location.py +++ b/stock_move_location/wizard/stock_move_location.py @@ -12,7 +12,7 @@ class StockMoveLocationWizard(models.TransientModel): _description = "Wizard move location" def _get_default_picking_type_id(self): - company_id = self.env.context.get("company_id") or self.env.user.company_id.id + company_id = self.env.context.get("company_id") or self.env.company.id return ( self.env["stock.picking.type"] .search( @@ -119,7 +119,7 @@ class StockMoveLocationWizard(models.TransientModel): def _get_locations_domain(self): return [ "|", - ("company_id", "=", self.env.user.company_id.id), + ("company_id", "=", self.env.company.id), ("company_id", "=", False), ]