Skip to content

[FIX] l10n_latam_check_ux: reject checks within the company that holds them - #1178

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

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

Conversation

@cav-adhoc

Copy link
Copy Markdown
Contributor

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

Qué corrige

El wizard de rechazo aceptaba un diario de cualquier compañía. check_company no lo frena porque en branches Odoo acepta registros de la compañía padre sobre una hija, así que los pagos se creaban en otra compañía, el _compute_company_id del cheque lo seguía y el cheque migraba de compañía como efecto colateral del rechazo, con la deuda del cliente quedando en la compañía equivocada. Ahora el dominio del diario se acota a la compañía del cheque y se valida al confirmar.

wizards/account_check_reject_wizard.py, wizards/account_check_reject_wizard_view.xml

Tests

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

@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

…s them

The rejected journal had no company in its domain and the wizard had no
company_id nor _check_company_auto, so the payments could be created in another
company of the branch tree. check_company does not catch it because Odoo accepts
records of a parent company on a branch, so the _compute_company_id of the check
followed the payment and the check migrated of company as a side effect of the
rejection, leaving the customer debt in the wrong company.

Restrict the journal to the company of the checks and validate it on confirm.
@rov-adhoc

Copy link
Copy Markdown
Contributor

@roboadhoc r+ bump

roboadhoc pushed a commit that referenced this pull request Oct 9, 2026
…s them

The rejected journal had no company in its domain and the wizard had no
company_id nor _check_company_auto, so the payments could be created in another
company of the branch tree. check_company does not catch it because Odoo accepts
records of a parent company on a branch, so the _compute_company_id of the check
followed the payment and the check migrated of company as a side effect of the
rejection, leaving the customer debt in the wrong company.

Restrict the journal to the company of the checks and validate it on confirm.

closes #1178

Signed-off-by: rov-adhoc <rov@adhoc.com.ar>
roboadhoc added a commit that referenced this pull request Oct 9, 2026
@roboadhoc roboadhoc closed this Oct 9, 2026
@roboadhoc
roboadhoc deleted the 19.0-t-72540-cav branch October 9, 2026 14:59

This branch was previously deployed

1 inactive deployment
merge — 8286ff63 Deployed Oct 9, 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