stock_valuation_xlsx: fix access right issue

This commit is contained in:
Alexis de Lattre
2022-03-30 17:22:27 +02:00
parent 6907302f8e
commit 1fdaf52787
2 changed files with 2 additions and 2 deletions

View File

@@ -97,7 +97,7 @@ class StockValuationXlsx(models.TransientModel):
raise UserError(_(
"The selected inventory (%s) is not in done state.")
% self.inventory_id.display_name)
cost_method_real_count = self.env['ir.property'].search([
cost_method_real_count = self.env['ir.property'].sudo().search([
('company_id', '=', company_id),
('name', '=', 'property_cost_method'),
('value_text', '=', 'real'),

View File

@@ -79,7 +79,7 @@ class StockVariationXlsx(models.TransientModel):
else:
if self.start_date >= present:
raise UserError(_("The start date must be in the past."))
cost_method_real_count = self.env['ir.property'].search([
cost_method_real_count = self.env['ir.property'].sudo().search([
('company_id', '=', company_id),
('name', '=', 'property_cost_method'),
('value_text', '=', 'real'),