Skip to content

[FIX] l10n_latam_check_ux: partner check credit over the company hierarchy - #1176

Closed
cav-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-t-72538-cav
Closed

cav-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-t-72538-cav

Conversation

@cav-adhoc

Copy link
Copy Markdown
Contributor

Parte del review de multicompañía / branches de l10n_latam_check_ux (tarea 72538, subtarea de la 72037).

Qué corrige

El crédito por cheques del partner se sumaba solo con la compañía activa, mientras el _credit_debit_get de core agrega los apuntes con child_of sobre la raíz y bypass_access: parado en la casa central se veían las facturas de la sucursal pero no sus cheques, y los cheques de una compañía del árbol que el usuario no tenía habilitada se descartaban en silencio. Ahora usa child_of sobre root_id + sudo.

models/res_partner.py

Tests

tests/test_check_transfers.py::test_partner_check_credit_includes_branch_checks, verificado en rojo sin el fix y en verde con él.

@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

…archy

_credit_debit_get of core aggregates the journal items with child_of over the
root company and bypass_access, but the checks were added up for the active
company only: standing on the parent company the partner credit included the
invoices of the branch and not its checks, so add_check_credit stopped making
sense on any installation with branches. Checks of a company of the tree that
the user has not enabled were silently dropped as well.
@rov-adhoc

Copy link
Copy Markdown
Contributor

@roboadhoc r+ nobump

roboadhoc pushed a commit that referenced this pull request Oct 13, 2026
…archy

_credit_debit_get of core aggregates the journal items with child_of over the
root company and bypass_access, but the checks were added up for the active
company only: standing on the parent company the partner credit included the
invoices of the branch and not its checks, so add_check_credit stopped making
sense on any installation with branches. Checks of a company of the tree that
the user has not enabled were silently dropped as well.

closes #1176

Signed-off-by: rov-adhoc <rov@adhoc.com.ar>
@roboadhoc roboadhoc closed this Oct 13, 2026
@roboadhoc
roboadhoc deleted the 19.0-t-72538-cav branch October 13, 2026 12:25

This branch was previously deployed

1 inactive deployment
merge — 2d4e6a89 Deployed Oct 13, 2026 by roboadhoc
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