Skip to content

Conversation

@mkoeck
Copy link

@mkoeck mkoeck commented Dec 2, 2025

This PR ports the account_statement_import_online module to Odoo 19.0 and adapts it to framework and data model changes introduced in this version. It focuses on keeping the functional behavior unchanged while aligning with new conventions and APIs.

Changes

Menu & UI

  • Move the online_bank_statement_provider_menu under account.account_account_menu, since account.account_banks_menu no longer exists in Odoo 19.

Security & Actions

  • Update groups_id to group_ids on action_online_bank_statements_pull_wizard, reflecting the field rename in Odoo 19.

Tests

  • Remove the odoo_test_helper dependency in unit tests and use the newly introduced add_to_registry helper instead.
  • Manually create a suspense_account for the bank journal in tests, as a default suspense account is no longer provided due to changes in the demo data loading order (required to create bank.statement.line records).

Code Quality & API Updates

  • Replace imports of _ with self.env._ in line with pylint recommendations.
  • Fix string interpolations that did not follow Odoo/Python best practices.
  • Replace self.env.context.get("tz") occurrences with self.env.tz.
  • Migrate _sql_constraints definitions to models.Constraint to follow the new ORM API in Odoo 19.

NL66278 and others added 30 commits December 2, 2025 09:28
Also Rename account_bank_statement_import_online => account_statement_import_online
…f online.bank.statement.provider: avoid speading the information on 3 tabs. As there are just a few fields, let's keep all the information directly visible.

Fix warning on search view of online.bank.statement.provider
Fix some tests
Button on journal form view to access the wizard
The wizard now returns the bank statements of the journal(s)
Fix wired strings
Currently translated at 26.6% (24 of 90 strings)

Translation: bank-statement-import-14.0/bank-statement-import-14.0-account_statement_import_online
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-14-0/bank-statement-import-14-0-account_statement_import_online/it/
1. Find partner if ther already is a bank account with the right IBAN;
2. Store (and display) raw import data to help in problem determination;
3. Make it easy to extend the parsing of import data;
4. Apply some clean coding principles.
…port tests at install

Installing this module failed because `mock` couldn't be found. Indeed there was a migration problem.

However, I was not testing the module; just installing. At install, tests shouldn't be imported.

This file was being imported because the dummy model was expected to exist in database for tests. Using odoo-test-helper for that now.

@moduon MT-295
The 2 modules account_statement_import_online and
account_statement_import depend on account_statement_import_base (and
not on each other) and share common code, in particular a hook to update
the statement line. So we can now have reconciliation modules that use
this hook and therefore work both on file import and online import. More
details on OCA#481.

Improve bank statement line form view and journal form view.
Currently translated at 25.5% (24 of 94 strings)

Translation: bank-statement-import-15.0/bank-statement-import-15.0-account_statement_import_online
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-15-0/bank-statement-import-15-0-account_statement_import_online/it/
You may have an old value on online_bank_statement_provider, but
switched to another source, and thus, the button is still visible,
which is not correct.

Let's use the source selection as the invisible modifier.
****po-python-parse-format****
account_statement_import_online/i18n/es.po:136 Translation string couldn't be parsed correctly using str.format KeyError('excepction') - [po-python-parse-format]
It's useful to debug RAW data received from your online sources. With
this improvement, you can do it easily from the manual pull wizard. It's
only available for users in debug mode (or with technical features).

TT47238
Currently translated at 100.0% (96 of 96 strings)

Translation: bank-statement-import-16.0/bank-statement-import-16.0-account_statement_import_online
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-16-0/bank-statement-import-16-0-account_statement_import_online/es/
…e service is set

This prevents a flood of logs in case your journals are written very often.
Currently translated at 14.5% (14 of 96 strings)

Translation: bank-statement-import-16.0/bank-statement-import-16.0-account_statement_import_online
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-16-0/bank-statement-import-16-0-account_statement_import_online/tr/
mymage and others added 23 commits December 2, 2025 09:28
Currently translated at 100.0% (94 of 94 strings)

Translation: bank-statement-import-17.0/bank-statement-import-17.0-account_statement_import_online
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-17-0/bank-statement-import-17-0-account_statement_import_online/it/
Apply mute_logger in test that test graceful exception handling
Currently translated at 98.9% (93 of 94 strings)

Translation: bank-statement-import-18.0/bank-statement-import-18.0-account_statement_import_online
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-18-0/bank-statement-import-18-0-account_statement_import_online/tr/
…e statement creation.

Starting from Odoo 16, bank statements are optional. This commit introduces the option to create statements automatically or skip their creation.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: bank-statement-import-18.0/bank-statement-import-18.0-account_statement_import_online
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-18-0/bank-statement-import-18-0-account_statement_import_online/
Currently translated at 100.0% (97 of 97 strings)

Translation: bank-statement-import-18.0/bank-statement-import-18.0-account_statement_import_online
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-18-0/bank-statement-import-18-0-account_statement_import_online/it/
Currently translated at 98.9% (96 of 97 strings)

Translation: bank-statement-import-18.0/bank-statement-import-18.0-account_statement_import_online
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-18-0/bank-statement-import-18-0-account_statement_import_online/tr/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: bank-statement-import-18.0/bank-statement-import-18.0-account_statement_import_online
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-18-0/bank-statement-import-18-0-account_statement_import_online/
INFO odoo odoo.models.unlink: User OCA#1 deleted online.bank.statement.provider records with IDs: [12]
…tement reflect provider timezone instead of utc
@mkoeck
Copy link
Author

mkoeck commented Dec 2, 2025

Ah sorry I just noticed that the commit 5ee5f16 slipped through which is from another pull request. Need to remove that one.

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.