Skip to content

T3493 UPD account_switzerland: import EBICS statements in separate jobs - #1841

Merged
ecino merged 1 commit into
18.0from
T3493-ebics-import-job
Oct 7, 2026
Merged

ecino merged 1 commit into
18.0from
T3493-ebics-import-job

Conversation

@ecino

@ecino ecino commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Migrates account_switzerland to 18.0 and reduces it to a single feature: importing each bank statement of an EBICS file in a separate job.

Changes

  • ebics.file._create_bank_statement_oca now enqueues _import_bank_statement_job with with_delay_sh (one job per statement), instead of importing everything inside the EBICS processing transaction.
  • The job calls the original import (account.statement.import.import_single_file), then _process_download_result to link the statements to the EBICS file, run the duplicate check and append the results to the processing notes.
  • The job is put on the ebics.file record rather than the transient import wizard, which could be vacuumed before the job runs.
  • Removed the old v14 views and JS; the module now depends on queue_job_optional, account_ebics and account_statement_import_camt.
  • Readme fragments added and README regenerated; module moved to the available addons.

Notes

Assisted-by: claude-opus-5-5, medium, claude-code
@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[High risk] Rewrites accounting module to process bank statements in background jobs.

No blocking issue was established; the missing statement-job tests are a non-blocking concern.

Findings

  1. P2 Statement jobs lack tests ▶

Reviews (1) · Last reviewed commit: "T3493 UPD account_switzerland: import EB..." · Reviewed by Greptile

Comment on lines +40 to +46
def _import_bank_statement_job(self, st_data):
"""Job importing a single statement and linking it to the EBICS file."""
self.ensure_one()
self = self.with_context(allowed_company_ids=self.env.user.company_ids.ids)
res = {"statement_ids": [], "notifications": []}
super()._create_bank_statement_oca(res, st_data)
self._process_download_result(res, file_format=self.download_process_method)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Statement jobs lack tests

The new jobs import financial records and update the same ebics.file, but no tests cover this flow. This is a non-blocking regression-coverage gap: changes could break statement links or retry behavior without a test catching them.

Add an Odoo test that processes two statements, runs both jobs, and checks that both statements stay linked and both results appear in note_process. Also cover a failed job followed by a retry.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Artifacts

Evidence from the check

  • This non-mutating Python check inventories base and head tests and related-repository interface usages, making the coverage evidence reproducible without claiming Odoo runtime validation.

Command output from the check

  • Ran the inventory against base 997f1b0 and all four related snapshots; the model is absent and no relevant tests are identified, establishing the comparison baseline.

Command output from the check

  • Ran the same inventory against head 94b14b5 and all four related snapshots; the new job source is present but no relevant tests are identified, confirming the coverage gap.

View artifacts

T-Rex Ran code and verified through T-Rex

@ecino
ecino merged commit 38e92d6 into 18.0 Oct 7, 2026
2 checks passed
@ecino
ecino deleted the T3493-ebics-import-job branch October 7, 2026 13:28
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.

1 participant