Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions l10n_ar_arba_ws/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ msgstr ""
#. module: l10n_ar_arba_ws
#. odoo-python
#: code:addons/l10n_ar_arba_ws/models/l10n_ar_dj_arba.py:0
msgid "DDJJ could not be opened, the withholding cannot be created"
msgstr "La DDJJ no puede ser abierta, la retención no puede ser creada"
msgid "DDJJ could not be opened, the withholding cannot be created (%s)"
msgstr "La DDJJ no puede ser abierta, la retención no puede ser creada (%s)"

#. module: l10n_ar_arba_ws
#: model:ir.model.fields,field_description:l10n_ar_arba_ws.field_l10n_ar_dj_arba__date
Expand Down
2 changes: 1 addition & 1 deletion l10n_ar_arba_ws/i18n/l10n_ar_arba_ws.pot
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ msgstr ""
#. module: l10n_ar_arba_ws
#. odoo-python
#: code:addons/l10n_ar_arba_ws/models/l10n_ar_dj_arba.py:0
msgid "DDJJ could not be opened, the withholding cannot be created"
msgid "DDJJ could not be opened, the withholding cannot be created (%s)"
msgstr ""

#. module: l10n_ar_arba_ws
Expand Down
2 changes: 1 addition & 1 deletion l10n_ar_arba_ws/models/l10n_ar_dj_arba.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def _create_withholding(self, wh_line):
try:
ddjj = self._ensure_dj(wh_line.payment_id.date, wh_line.company_id)
if ddjj.state != "open":
open_ddjj_error = self.env._("DDJJ could not be opened, the withholding cannot be created")
open_ddjj_error = self.env._("DDJJ could not be opened, the withholding cannot be created (%s)", ddjj)
except (UserError, ValidationError) as exp:
Comment on lines 138 to 141
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En el mensaje se está interpolando el recordset ddjj directamente. Eso suele renderizarse como l10n_ar.dj.arba(12,) (poco legible para el usuario) y puede disparar name_get()/consultas implícitas en una ruta de error. Para dar “más detalle” de forma clara, interpolar un valor explícito (p. ej. ddjj.display_name, ddjj.name o ddjj.id) y, si aplica, asegurar ddjj.ensure_one() antes de formatear.

Copilot uses AI. Check for mistakes.
self.env.cr.rollback()
open_ddjj_error = str(exp)
Expand Down
Loading