Skip to content

Comments

[WIP] l10n_ar_payment_bundle: Add support for payment bundle in SC#905

Open
cav-adhoc wants to merge 1 commit intoingadhoc:19.0from
adhoc-dev:19.0-t-53600-2-cav
Open

[WIP] l10n_ar_payment_bundle: Add support for payment bundle in SC#905
cav-adhoc wants to merge 1 commit intoingadhoc:19.0from
adhoc-dev:19.0-t-53600-2-cav

Conversation

@cav-adhoc
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 11, 2026 20:46
@roboadhoc
Copy link
Contributor

Pull request status dashboard

Copy link

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 añade soporte para un nuevo método de pago "payment_bundle_sc" (SC = probablemente "Sin Comprobante" o variante específica) al módulo de payment bundle argentino. El cambio permite manejar dos variantes del método de pago múltiple: el original "payment_bundle" y el nuevo "payment_bundle_sc", que comparten la misma lógica y comportamiento.

Changes:

  • Se registra un nuevo método de pago "payment_bundle_sc" con variantes inbound/outbound
  • Se actualizan las validaciones y condiciones en los modelos para soportar ambos códigos de método de pago
  • Se elimina temporalmente (comentando) una constraint de validación de moneda en journals

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
account_payment_method_data.xml Añade registros XML para el nuevo método de pago "payment_bundle_sc" (inbound/outbound)
account_payment_method.py Registra información del método "payment_bundle_sc" en el diccionario de métodos de pago
account_payment.py Actualiza comparaciones para incluir "payment_bundle_sc" en cálculos de main_payment, preparación de líneas de movimiento y matched_amounts
account_journal.py Actualiza el filtro en create() para detectar journals con ambos métodos de pago; comenta constraint de validación de moneda

Comment on lines +14 to +19
<record id="account_payment_out_payment_bundle" model="account.payment.method">
<field name="name">Payment multiple SC</field>
<field name="code">payment_bundle_sc</field>
<field name="payment_type">outbound</field>
</record>
<record id="account_payment_in_payment_bundle" model="account.payment.method">
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

El XML ID "account_payment_out_payment_bundle" está duplicado. Los registros en las líneas 4 y 14 usan el mismo id, lo que causará un error al cargar el módulo. El segundo registro debería usar un id único como "account_payment_out_payment_bundle_sc".

Suggested change
<record id="account_payment_out_payment_bundle" model="account.payment.method">
<field name="name">Payment multiple SC</field>
<field name="code">payment_bundle_sc</field>
<field name="payment_type">outbound</field>
</record>
<record id="account_payment_in_payment_bundle" model="account.payment.method">
<record id="account_payment_out_payment_bundle_sc" model="account.payment.method">
<field name="name">Payment multiple SC</field>
<field name="code">payment_bundle_sc</field>
<field name="payment_type">outbound</field>
</record>
<record id="account_payment_in_payment_bundle_sc" model="account.payment.method">

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +19
<record id="account_payment_out_payment_bundle" model="account.payment.method">
<field name="name">Payment multiple SC</field>
<field name="code">payment_bundle_sc</field>
<field name="payment_type">outbound</field>
</record>
<record id="account_payment_in_payment_bundle" model="account.payment.method">
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

El XML ID "account_payment_in_payment_bundle" está duplicado. Los registros en las líneas 9 y 19 usan el mismo id, lo que causará un error al cargar el módulo. El segundo registro debería usar un id único como "account_payment_in_payment_bundle_sc".

Suggested change
<record id="account_payment_out_payment_bundle" model="account.payment.method">
<field name="name">Payment multiple SC</field>
<field name="code">payment_bundle_sc</field>
<field name="payment_type">outbound</field>
</record>
<record id="account_payment_in_payment_bundle" model="account.payment.method">
<record id="account_payment_out_payment_bundle_sc" model="account.payment.method">
<field name="name">Payment multiple SC</field>
<field name="code">payment_bundle_sc</field>
<field name="payment_type">outbound</field>
</record>
<record id="account_payment_in_payment_bundle_sc" model="account.payment.method">

Copilot uses AI. Check for mistakes.
@@ -1,27 +1,34 @@
from odoo import _, api, models
from odoo.exceptions import ValidationError
from odoo import api, models
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Se eliminan las importaciones de _ y ValidationError pero la constraint comentada en las líneas 7-16 todavía las referencia. Si en el futuro se descomenta este código, faltarán las importaciones necesarias. Considerar mantener las importaciones o eliminar completamente el código comentado si no se va a usar.

Copilot uses AI. Check for mistakes.
<field name="code">payment_bundle</field>
<field name="payment_type">inbound</field>
</record>
<record id="account_payment_out_payment_bundle" model="account.payment.method">
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Hay una inconsistencia de indentación. Esta línea tiene 8 espacios de indentación mientras que las líneas siguientes (15-18) tienen 4 espacios. La línea debería alinearse con el mismo nivel de indentación que los otros registros <record> (4 espacios).

Suggested change
<record id="account_payment_out_payment_bundle" model="account.payment.method">
<record id="account_payment_out_payment_bundle" model="account.payment.method">

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +23
<record id="account_payment_out_payment_bundle" model="account.payment.method">
<field name="name">Payment multiple SC</field>
<field name="code">payment_bundle_sc</field>
<field name="payment_type">outbound</field>
</record>
<record id="account_payment_in_payment_bundle" model="account.payment.method">
<field name="name">Payment multiple SC</field>
<field name="code">payment_bundle_sc</field>
<field name="payment_type">inbound</field>
</record>
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Se están agregando nuevos registros de datos XML (payment methods "payment_bundle_sc") sin incrementar la versión en __manifest__.py. Según las convenciones del proyecto, cuando se modifican datos XML o se agregan nuevos records, se debe realizar un bump de versión (por ejemplo, de "19.0.1.0.0" a "19.0.1.1.0").

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +32 to +35
rec.is_main_payment = rec.payment_method_line_id.payment_method_id.code in [
"payment_bundle",
"payment_bundle_sc",
]
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

La lista literal ["payment_bundle", "payment_bundle_sc"] se repite en múltiples lugares del código (líneas 32-35, 195, 287). Para mejorar la mantenibilidad, considerar definir una constante a nivel de clase o módulo, por ejemplo: PAYMENT_BUNDLE_CODES = ["payment_bundle", "payment_bundle_sc"]. Esto facilitará futuras modificaciones y reducirá el riesgo de inconsistencias.

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.

2 participants