Skip to content

[FIX] account_payment_pro: include to_pay_move_line_ids in _compute_to_pay_amount dependency#968

Open
rov-adhoc wants to merge 1 commit intoingadhoc:18.0from
adhoc-dev:18.0-h-113286-rov
Open

[FIX] account_payment_pro: include to_pay_move_line_ids in _compute_to_pay_amount dependency#968
rov-adhoc wants to merge 1 commit intoingadhoc:18.0from
adhoc-dev:18.0-h-113286-rov

Conversation

@rov-adhoc
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 27, 2026 14:23
@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 corrige el recálculo del importe “To Pay” en account_payment_pro, asegurando que se invalide/recalcule cuando cambian las líneas seleccionadas a pagar.

Changes:

  • Se añade to_pay_move_line_ids como dependencia de _compute_to_pay_amount.
  • Se fuerza el reseteo de to_pay_amount al ejecutar remove_all().


def remove_all(self):
self.to_pay_move_line_ids = False
self.to_pay_amount = 0.0
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

En remove_all() se escribe directamente to_pay_amount, que es un campo compute con inverse. Esto puede dejar unreconciled_amount sin resetear si currency_id todavía no está seteada (el inverse hace un guard con if rec.currency_id), o introducir ajustes negativos no deseados. Sería más seguro/resetear explícitamente unreconciled_amount (y dejar que _compute_to_pay_amount derive to_pay_amount) en lugar de escribir el campo compute.

Suggested change
self.to_pay_amount = 0.0
self.unreconciled_amount = 0.0

Copilot uses AI. Check for mistakes.
@rov-adhoc rov-adhoc force-pushed the 18.0-h-113286-rov branch 4 times, most recently from b904627 to 65b4b3f Compare March 30, 2026 19:50
@rov-adhoc rov-adhoc force-pushed the 18.0-h-113286-rov branch from 65b4b3f to 6b909e0 Compare April 1, 2026 12:25
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