File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 11# Copyright 2020 Camptocamp SA (http://www.camptocamp.com)
22# Copyright 2020 Akretion (http://www.akretion.com)
3+ # Copyright 2026 Michael Tietz (MT Software) <mtietz@mt-software.de>
34# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
45
56from werkzeug .exceptions import BadRequest
@@ -304,3 +305,23 @@ class BaseShopfloorProcess(AbstractComponent):
304305
305306 _requires_header_menu = True
306307 _requires_header_profile = True
308+
309+ @property
310+ def env (self ):
311+ env = super ().env ()
312+ if (
313+ not hasattr (self , "work" )
314+ or not hasattr (self .work , "menu" )
315+ or not hasattr (self .work .menu , "picking_type_ids" )
316+ ):
317+ return env
318+ company = self .work .menu .picking_type_ids .company_id
319+ if not company :
320+ return env
321+ context = dict (self .collection .env .context )
322+ context .update (
323+ {
324+ "allowed_company_ids" : company .ids ,
325+ }
326+ )
327+ return env (context = context )
You can’t perform that action at this time.
0 commit comments