Skip to content

Comments

[FIX] account_payment_pro: Ensure company_id change validation only occurs if original company_id is set#922

Closed
rov-adhoc wants to merge 1 commit intoingadhoc:18.0from
adhoc-dev:18.0-h-173512-rov
Closed

[FIX] account_payment_pro: Ensure company_id change validation only occurs if original company_id is set#922
rov-adhoc wants to merge 1 commit intoingadhoc:18.0from
adhoc-dev:18.0-h-173512-rov

Conversation

@rov-adhoc
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 23, 2026 19:14
@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 corrige un problema en el método _onchange_company_id del modelo account.payment. El método ejecutaba remove_all() incorrectamente al crear nuevos registros de pago, ya que la condición self.company_id != self._origin.company_id siempre se evaluaba como verdadera cuando _origin.company_id estaba vacío (registros nuevos).

Changes:

  • Se añade una verificación adicional self._origin.company_id antes de comparar el cambio de compañía, asegurando que el método solo limpie las líneas a pagar cuando realmente hay un cambio de compañía en un registro existente, no en registros nuevos.

@cav-adhoc
Copy link
Contributor

@roboadhoc r+ nobump

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