[FIX] account_multicompany_ux: synchronize balances with amount_currency before write operations#287
Closed
cem-adhoc wants to merge 1 commit into
Closed
[FIX] account_multicompany_ux: synchronize balances with amount_currency before write operations#287cem-adhoc wants to merge 1 commit into
cem-adhoc wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Este PR ajusta el wizard de cambio de compañía (account.change.company) para sincronizar balance con amount_currency antes de ejecutar escrituras que pueden disparar validaciones de balanceo, evitando errores durante el cambio de compañía en asientos/facturas multi-moneda.
Changes:
- Se adelanta la llamada a
_sync_lines_balance_from_amount_currency(move)para que ocurra antes de writes que pueden disparar_check_balanced. - Se envuelve la sincronización en un contexto de
_disable_recursion(..., 'check_move_validity', ...)para evitar validaciones recursivas durante el ajuste. - Se elimina la sincronización tardía (previa al bloque final
_check_balanced/_sync_dynamic_lines) al final del método.
| # que dispare _check_balanced (eg. invoice_payment_term_id) | ||
| container = {'records': move} | ||
| with move._disable_recursion(container, 'check_move_validity', default=True, target=False): | ||
| self._sync_lines_balance_from_amount_currency(move) |
Comment on lines
+163
to
+168
| # Sincronizar balances con amount_currency antes de cualquier write | ||
| # que dispare _check_balanced (eg. invoice_payment_term_id) | ||
| container = {'records': move} | ||
| with move._disable_recursion(container, 'check_move_validity', default=True, target=False): | ||
| self._sync_lines_balance_from_amount_currency(move) | ||
|
|
…ncy before write operations
987a60f to
81696d8
Compare
Contributor
|
@roboadhoc r+ nobump |
roboadhoc
pushed a commit
that referenced
this pull request
May 26, 2026
…ncy before write operations closes #287 Signed-off-by: rov-adhoc <rov@adhoc.com.ar>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.