Skip to content

[IMP] l10n_ar_arba_ws: more detail about the problematic DDJJ#974

Open
zaoral wants to merge 1 commit intoingadhoc:18.0from
adhoc-dev:18.0-h-114643-kz
Open

[IMP] l10n_ar_arba_ws: more detail about the problematic DDJJ#974
zaoral wants to merge 1 commit intoingadhoc:18.0from
adhoc-dev:18.0-h-114643-kz

Conversation

@zaoral
Copy link
Copy Markdown
Contributor

@zaoral zaoral commented Apr 7, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 7, 2026 00:21
@roboadhoc
Copy link
Copy Markdown
Contributor

Pull request status dashboard

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Este PR busca mejorar el diagnóstico cuando falla la apertura de una DDJJ ARBA, agregando más detalle en el mensaje que se muestra al intentar crear una retención.

Changes:

  • Se modifica el mensaje de error cuando la DDJJ no queda en estado open, agregando un placeholder (%s) con información adicional.
  • Se actualizan los archivos de traducción (.pot y es.po) para reflejar el nuevo msgid/msgstr.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
l10n_ar_arba_ws/models/l10n_ar_dj_arba.py Agrega detalle al mensaje de error al no poder abrir la DDJJ antes de crear la retención.
l10n_ar_arba_ws/i18n/l10n_ar_arba_ws.pot Actualiza el msgid con el placeholder (%s).
l10n_ar_arba_ws/i18n/es.po Actualiza la traducción al español para incluir el placeholder (%s).

Comment on lines 138 to 141
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:
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants