diff --git a/l10n_br_stock_account/models/stock_picking.py b/l10n_br_stock_account/models/stock_picking.py index 47d09e7af92b..9d459d07199b 100644 --- a/l10n_br_stock_account/models/stock_picking.py +++ b/l10n_br_stock_account/models/stock_picking.py @@ -10,8 +10,8 @@ class StockPicking(models.Model): @api.model def _default_fiscal_operation(self): - company = self.env.user.company_id - fiscal_operation = self.env.user.company_id.stock_fiscal_operation_id + company = self.env.company + fiscal_operation = company.stock_fiscal_operation_id picking_type_id = self.env.context.get("default_picking_type_id") if picking_type_id: picking_type = self.env["stock.picking.type"].browse(picking_type_id)