Repository navigation
T3493 UPD account_switzerland: import EBICS statements in separate jobs - #1841
Conversation
Assisted-by: claude-opus-5-5, medium, claude-code
|
| 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) |
There was a problem hiding this comment.
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
- 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.
- 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.
- 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.
Migrates
account_switzerlandto 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_ocanow enqueues_import_bank_statement_jobwithwith_delay_sh(one job per statement), instead of importing everything inside the EBICS processing transaction.account.statement.import.import_single_file), then_process_download_resultto link the statements to the EBICS file, run the duplicate check and append the results to the processing notes.ebics.filerecord rather than the transient import wizard, which could be vacuumed before the job runs.queue_job_optional,account_ebicsandaccount_statement_import_camt.Notes
IndexError(no account currency).