Skip to content

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

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

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

Conversation

@fw-bot-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.

Forward-Port-Of: #1176

@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

@fw-bot-adhoc

Copy link
Copy Markdown
Contributor Author

@cav-adhoc @rov-adhoc cherrypicking of pull request #1176 failed.

stdout:

Auto-merging l10n_latam_check_ux/tests/test_check_transfers.py
CONFLICT (content): Merge conflict in l10n_latam_check_ux/tests/test_check_transfers.py

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

:shipit: you can use git-fw to re-do the forward-port for you locally.

⚠️ after resolving this conflict, you will need to merge it via @roboadhoc.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

…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.

X-original-commit: dc8c350
@cav-adhoc
cav-adhoc force-pushed the 20.0-19.0-t-72538-cav-7986-fw branch from 92ee007 to 9cc50e0 Compare October 13, 2026 17:14
@cav-adhoc

Copy link
Copy Markdown
Contributor

@roboadhoc r+ nobump

@roboadhoc roboadhoc closed this in 4ea6e7d Oct 13, 2026
@roboadhoc roboadhoc added the 19.1 label Oct 13, 2026
@roboadhoc
roboadhoc deleted the 20.0-19.0-t-72538-cav-7986-fw branch October 13, 2026 17:27

This branch was previously deployed

1 inactive deployment
merge — 9cc50e09 Deployed Oct 13, 2026 by roboadhoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants