Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
EdgarRetes committed Nov 22, 2024
1 parent 5f0c1f5 commit de6aa77
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fieldservice_stage_validation/models/validate_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import _
from odoo.exceptions import ValidationError


Expand All @@ -13,12 +14,6 @@ def validate_stage_fields(records):

for name in field_names:
if not values[0][name]:
lang_context = {"lang": records.env.context.get("lang", "en_US")}
# Asignar el contexto directamente a res.users
records.env.context = records.env.context.copy() # Asegurar que se copie el contexto
records.env.context.update(lang_context)

# Usar _() directamente para la traducción
raise ValidationError(
_(
"Cannot move to stage %(stage_name)s "
Expand Down

0 comments on commit de6aa77

Please sign in to comment.