-
Notifications
You must be signed in to change notification settings - Fork 248
[FIX] l10n_ar_tax: patch context to use active_test=True #1259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 19.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -55,8 +55,7 @@ def _compute_fiscal_position_id(self): | |||||||||
| rec.l10n_ar_fiscal_position_id = ( | ||||||||||
| self.env["account.fiscal.position"] | ||||||||||
| .with_company(rec.company_id) | ||||||||||
| # TODO revisar porque llega active_test=False acá | ||||||||||
| .with_context(l10n_ar_withholding=True, active_test=True) | ||||||||||
| .with_context(l10n_ar_withholding=True) | ||||||||||
| ._get_fiscal_position(address) | ||||||||||
| ) | ||||||||||
|
|
||||||||||
|
|
@@ -310,8 +309,10 @@ def _compute_withholdable_advanced_amount(self): | |||||||||
|
|
||||||||||
| @api.depends("l10n_ar_fiscal_position_id", "partner_id", "company_id", "date") | ||||||||||
| def _compute_l10n_ar_withholding_line_ids(self): | ||||||||||
| # no entiendo porque pero acá viene un active_test=False que se termina propagando a computed fields que | ||||||||||
| # también dependan de partner_id, por ahora forzamos active_test=True para que aguas arriba todo se compute bien | ||||||||||
|
Comment on lines
+312
to
+313
|
||||||||||
| # metodo completamente analogo a payment.register._compute_l10n_ar_withholding_ids | ||||||||||
|
||||||||||
| # metodo completamente analogo a payment.register._compute_l10n_ar_withholding_ids | |
| # método basado en payment.register._compute_l10n_ar_withholding_ids, con este parche extra de active_test |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo ortográfico: "analogo" debe llevar tilde → "análogo".
| # metodo completamente analogo a payment.register._compute_l10n_ar_withholding_ids | |
| # método completamente análogo a payment.register._compute_l10n_ar_withholding_ids |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistencia en el manejo de active_test: en _compute_fiscal_position_id (línea 58) se eliminó el active_test=True del contexto, pero en _compute_l10n_ar_withholding_line_ids (línea 315) se agrega. Ambos métodos interactúan con account.fiscal.position y pueden invocar a _get_fiscal_position. Esta inconsistencia podría causar comportamiento diferente entre los dos métodos compute. Se recomienda aplicar la misma estrategia en ambos lugares o documentar por qué un método necesita el parche y el otro no.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo en el comentario: "porque" debería ser "por qué" (con tilde y separado) cuando se formula una pregunta indirecta. También falta tilde en "acá" → "acá".