Daily updates from Odoo
Saturday, December 6, 2025
2 changes · master
Resolved issues and error corrections
This update resolves a crash that occurred when users attempted to add bank statement lines to journals other than the default. The fix ensures the correct journal is selected during transaction creation, preventing data inconsistencies and improving stability.
Original PR description
The system will crash when user tries to create new bank statement line. **Steps to produce:** - Install `Invoicing` module without demo data. - Go to `Configuration > Journals` and duplicate the…
The system will crash when user tries to create new bank statement line. **Steps to produce:** - Install `Invoicing` module without demo data. - Go to `Configuration > Journals` and duplicate the default Bank journal to create `Bank (Copy)`. - Dashboard and `Click on 3 dots` of Bank(Copy) and click on Transactions. - Create a new transaction and set the Statement also(Create new and assign it). - Go to that statements and Add a line and set the `foreign currency` as USD. **Error:** `ValueError: Wrong value for account.bank.statement.journal_id: account.journal(7, 6)` **Cause:** - When we try to create a transaction in a statement of a non-default journal, its journal is not set by default, resulting in two records being fetched. At line [1], our code attempts to read `statement_id.journal_id` , but encounters multiple records, causing the issue. **Solution:** - Here I added context to pass `journal_id` as default and made `payment_ref` required(because at [2], also we do the same). - Also added hidden `journal_id` field in the list view. [1]: https://github.com/odoo/odoo/blob/ec2d8d026d9f13c8fb869ad1f7b8026a144e85ec/addons/account/models/account_move.py#L887 [2]: https://github.com/odoo/enterprise/blob/bff451101bb23b4f9acc7982ed1138d7cefa13b9/account_accountant/views/bank_rec_widget_views.xml#L220 **sentry-6928858335** **opw-5256565** Forward-Port-Of: odoo/enterprise#98995
This update significantly speeds up VAT report generation by removing a slow check and cleaning up outdated data. It also corrects a critical issue where users lacked access to returns, preventing accurate reporting across all company branches. This ensures data integrity and a smoother user experience for financial reporting.
Original PR description
The "No negative amount in VAT report" return check was too slow, we removed it and clean the database. On the other hand, refreshing checks had issues with the access rights when there was company branches. task-id: 5145537 Forward-Port-Of: odoo/enterprise#98633 Forward-Port-Of: odoo/enterprise#97125