Skip to content

[IMP] l10n_latam_check_ux: Added tests with instructions#835

Open
feg-adhoc wants to merge 1 commit intoingadhoc:18.0from
adhoc-dev:18.0-test_l10n_latam_check_ux-feg
Open

[IMP] l10n_latam_check_ux: Added tests with instructions#835
feg-adhoc wants to merge 1 commit intoingadhoc:18.0from
adhoc-dev:18.0-test_l10n_latam_check_ux-feg

Conversation

@feg-adhoc
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings November 19, 2025 15:54
@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 agrega tests para validar la funcionalidad de 'Split Payment' al transferir cheques de terceros en el módulo l10n_latam_check_ux. Los tests verifican que cuando se habilita la opción split_payment, se cree un pago individual por cada cheque en lugar de agruparlos en un único pago.

  • Implementa un test completo que crea el entorno necesario (diarios, métodos de pago, cheques)
  • Valida que la funcionalidad de transferencia dividida funciona correctamente para múltiples cheques
  • Sigue las convenciones de testing de Odoo utilizando TransactionCase y métodos @classmethod para setup

Reviewed Changes

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

File Description
l10n_latam_check_ux/tests/test_third_party_check_transfer.py Agrega nueva clase de test TestThirdPartyCheckTransfer con métodos auxiliares para crear cheques de terceros y un test principal que valida la funcionalidad de split payment al transferir múltiples cheques
l10n_latam_check_ux/tests/init.py Importa el nuevo módulo de tests para que sea ejecutado por el framework de testing de Odoo

def setUpClass(cls):
super().setUpClass()

# Obtener la compañía principal
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

Comentario en español mientras que el resto de los comentarios del archivo están en inglés. Se recomienda mantener consistencia en el idioma. Si bien las reglas no exigen traducción, es mejor que todos los comentarios del archivo estén en el mismo idioma para mantener la consistencia.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines 226 to 228
self.assertNotEqual(payment_1.id, payment_2.id, "Payments 1 and 2 must have different IDs")
self.assertNotEqual(payment_1.id, payment_3.id, "Payments 1 and 3 must have different IDs")
self.assertNotEqual(payment_2.id, payment_3.id, "Payments 2 and 3 must have different IDs")
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

[nitpick] Las validaciones de unicidad de IDs en las líneas 226-228 son redundantes. Si ya has verificado que len(payment_1) == 1, len(payment_2) == 1, y len(payment_3) == 1, y que cada uno tiene un monto diferente (1000, 2000, 3000), entonces necesariamente son registros distintos. Estas aserciones adicionales no agregan valor y podrían eliminarse para simplificar el código.

Suggested change
self.assertNotEqual(payment_1.id, payment_2.id, "Payments 1 and 2 must have different IDs")
self.assertNotEqual(payment_1.id, payment_3.id, "Payments 1 and 3 must have different IDs")
self.assertNotEqual(payment_2.id, payment_3.id, "Payments 2 and 3 must have different IDs")

Copilot uses AI. Check for mistakes.
@feg-adhoc feg-adhoc force-pushed the 18.0-test_l10n_latam_check_ux-feg branch from e2064b5 to 01a2187 Compare November 19, 2025 16:04
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