[IMP] l10n_ar_arba_ws: more detail about the problematic DDJJ#974
Open
zaoral wants to merge 1 commit intoingadhoc:18.0from
Open
[IMP] l10n_ar_arba_ws: more detail about the problematic DDJJ#974zaoral wants to merge 1 commit intoingadhoc:18.0from
zaoral wants to merge 1 commit intoingadhoc:18.0from
Conversation
Contributor
There was a problem hiding this comment.
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 (
.potyes.po) para reflejar el nuevomsgid/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: |
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.