Daily updates from Odoo
Tuesday, August 26, 2025
20 changes
3 changes
Enhancements to existing features
Odoo removed an internal database checkpoint used while fetching OCR results for extracted documents. This should reduce performance slowdowns when many OCR updates are processed at once, with minimal impact on everyday document handling.
Original PR description
Very similar to commit 7f7ff8d, see full explanation in that commit message. This savepoint was also initiated in a loop which could cause performances issues when too many of them are active at the same time. This one is much less critical and can be removed without much trouble. It was only allowing to recover from a serialization failure, in the case where a user was concurrently editing a document while it was being updated by the OCR. Forward-Port-Of: odoo/enterprise#93000
This update adds automated checks for point of sale IoT device setup and core device behavior, including Six payment terminal flows. It helps reduce the risk of future changes breaking connected hardware or payment terminal integrations.
Original PR description
*: pos_iot, pos_iot_six In this commit: ------------------ - Loaded data for `iot.box`, `iot.device`, and `iot.channel` to test the complete IoT flow from setup to core device functionalities. - Added payment method records and validated the payment terminal integration using Six. task- 4945645 Related PR: https://github.com/odoo/odoo/pull/220801 Forward-Port-Of: odoo/enterprise#91117
The follow-up process now checks related accounting records in a clearer and safer way. This reduces the risk of internal query confusion and helps keep customer follow-up calculations reliable.
Original PR description
Refactored the SQL construction for checking the existence of related account.move records for res.partner entries. The account.move query is now built separately and referenced explicitly, making the code more readable and reducing the chance of ambiguity in field resolution. Using `SQL.identifier(query.table, "id")` ensures that the correct table is referenced in each condition, which is particularly important when dealing with multiple joins or subqueries. Forward-Port-Of: odoo/enterprise#90304 Forward-Port-Of: odoo/enterprise#83770
12 changes
Enhancements to existing features
The salary contract page was updated to use a newer internal web approach instead of older browser code. This helps keep the HR salary contract experience maintainable and aligned with current platform standards without changing core business workflows.
Original PR description
wip
Payroll teams can now manage salary adjustments directly from an employee record in a dedicated tab. The new view shows key details such as type, dates, amount, payment progress, remaining periods, and status, making salary attachment follow-up clearer and more centralized.
Original PR description
- Add a tab Salary Adjustments in the employee - Add a list view with Type, Start, Note, Amount, Until and Status (optional hide, Amount Paid (computed from payslips lines), Periods Left, End Date) -Add a line opens a form view popup. One column for the inputs, the other is for the description Task: 4930543
Brazilian localization users can now set a CFOP code directly on operation types, giving businesses more control over how fiscal operations are classified. This value is used consistently in tax calculation and electronic invoicing, reducing manual corrections and helping align invoices with local tax requirements.
Original PR description
In this PR: - Added `l10n_br_cfop_code` field to operation types in form view for providing users with greater flexibility in selecting the appropriate CFOP. - Modified Avatax tax calculation service to send the custom CFOP value when configured, overriding automatic determination. - Updated invoice line CFOP computation logic to prioritize operation type override over standard Avatax response. - Modified EDI submission to preserve CFOP overrides by re-applying them when reusing stored Avatax tax calculation data. Task-4947957
The OCR document processing flow no longer creates extra database checkpoints while fetching results. This reduces overhead when many documents are processed at once, improving performance with minimal user-facing change.
Original PR description
Very similar to commit 7f7ff8d, see full explanation in that commit message. This savepoint was also initiated in a loop which could cause performances issues when too many of them are active at the same time. This one is much less critical and can be removed without much trouble. It was only allowing to recover from a serialization failure, in the case where a user was concurrently editing a document while it was being updated by the OCR. Forward-Port-Of: odoo/enterprise#93000
French VAT report exports now combine tax declarations and related reimbursement requests into one submission. This reduces duplicate export steps and improves tracking of each included document through the external filing process.
Original PR description
This commit merges the tax export and tax reimbursements into a single export. New model `account_report_async_document` was created for handling document specific fields, like `deposit_uid`, `declaration_uid`, `state`, and the logs, as these fields are set from the response of the ASPone API. Before this commit, we couldn't merge multiple documents into a single export due to these fields. These fields were removed from the `account_report_async_export` models and moved to the `account_report_async_document`. Also, most methods in `account_report_async_document` are taken from `account_report_async_export` with minimal changes. The export creation was modified to account for handling multiple documents. task-4546529
Hong Kong payroll will no longer automatically include a 200 HKD internet allowance. This avoids applying an arbitrary allowance that is not considered common practice, helping payroll defaults better match typical business needs.
Original PR description
Removes the default 200 HKD of internet allowance, as it is not a common practice in any way to give it, and the 200 is arbitrary and is also not common practice of any kind. task-5010960
Manufacturing planners can now open a suggestion pop-up in the Master Production Schedule to estimate and fill forecasted demand for a selected product. Suggestions use historical or actual demand across periods, helping teams plan faster and with less manual entry.
Original PR description
This PR enables the user to use a pop-up suggestion for the MPS. The tool suggests for the user the forecasted demand and fills it out in all periods for the chosen product in the MPS based on historical demand (last year, before last year or actual demand). If the user chooses to apply the suggestion for a certain period and not all the periods in MPS, the suggestion will be based only on last year. Task-4827486
The departure process now gives HR teams the option to remove a departing employee’s linked user account when archiving the employee. This helps streamline offboarding and reduces the chance of inactive staff retaining system access.
Original PR description
When you archive an employee and he has a user we need to have the ability to remove this user from the departure wizard Task: 4680081
Mexican accounting now uses dedicated accounts for credit notes, discounts, bonuses, returns, and certain POS re-invoicing entries instead of mixing them with regular sales. This helps businesses comply with local accounting rules and better see how much revenue was reduced by these operations, while allowing users to customize the default accounts.
Original PR description
[IMP] l10n_mx_*: provide different account for credit notes modules: l10n_mx_reports, l10n_mx_edi, l10n_mx_edi_pos When handling credit notes for accounting purposes it's not correct (or even legal…
[IMP] l10n_mx_*: provide different account for credit notes modules: l10n_mx_reports, l10n_mx_edi, l10n_mx_edi_pos When handling credit notes for accounting purposes it's not correct (or even legal in mexico) to use the same account for anything related to credit notes (discounts, bonuses or returns). Instead, all of these are accounted for in a different account that reduces the sales but also tell us how much of the sales were reduced by this account. This commit provide an account for these cases, and make it customizable for the user to set the account he wants (with a setting in the 'Default Accounting' section). Also, POS returns are now associated with this account. A second account is created to handle the "re-invoicing" concept: when a pos order is done and the session is closed, if the customer wants to self-invoice the system perform a reversal of the session and create 2 new invoices, 1 for the customer and 1 for all other orders from the original session. The new account is associated to the debit lines of the reversal (not vat), the credit lines of the customer invoice (not vat) Task-4576187
Users can again mark individual invoices or journal items so they do not trigger customer payment follow-ups. Follow-up reports, exports, and reminder emails now exclude those marked items, while entries without due dates are shown as due rather than overdue.
Original PR description
During the [rework of the follow-up report][1], we removed the "No Follow-Up" field from journal items, making it impossible to exclude individual journal items from triggering a follow-up. In the…
During the [rework of the follow-up report][1], we removed the "No Follow-Up" field from journal items, making it impossible to exclude individual journal items from triggering a follow-up. In the related community commit, we re-introduce a field for that, since it is a common requirement to be able to exclude individual items from the follow-up reports. In this commit we do the following: 1. Adapt the Follow-Up Report and Customer Statement variants of the Partner Ledger to add a toggle for the "No Follow-Up" field on each report line, that toggles the field on the corresponding journal item(s). 2. Prevent the follow-up status on the partner to change when all of the overdue journal items are marked as "No Follow-Up". 3. Make sure users can toggle the "No Follow-Up" setting on the invoice level when opening the "Overdue Invoices" view from the partner's "Accounting" tab. 4. Make sure all receivable/payable lines without a due date (either from a manual miscellaneous entry or a PoS entry) are put under the "Due" section is the Follow-Up Report instead of the "Overdue" section. Since there is no due date, they can't be overdue. [1]: https://github.com/odoo/odoo/commit/67dc71588751c9f115e09959d774686c2207a1f9 [task-4632300](https://www.odoo.com/odoo/project.task/4632300) Related to https://github.com/odoo/odoo/pull/203329
Enterprise payroll and localization reporting tests were updated to follow the new default tax rounding behavior. This helps ensure Odoo's business calculations stay consistent across community and enterprise versions without requiring extra configuration.
Original PR description
**Purpose**: --- - Align enterprise tests with the community change setting 'Round per Tax Group' (round_globally) as the default tax rounding method. **Changes**: --- - Removed explicit round_globally configuration in tests (now default). - Updated “Round per Line” test cases to run under the global rounding setting. - Adjusted expected results to match the new computation behavior. community pr- https://github.com/odoo/odoo/pull/221027 task-4971648
Audit report PDFs now include the styling needed to display edited content more consistently and professionally. Layouts, checklists, icons, tables, and common formatting options render more clearly, making reports easier to read and present.
Original PR description
This commit embeds the required Bootstrap assets into the HTML pages used for generating audit report PDFs. By leveraging Bootstrap's styles, the reports now have a cleaner, more professional appearance, and many of the blocks from the HTML editor are rendered with consistent, high-quality formatting. The column layout (`/column`), the checklists (`/checklist`), the icons (`/image`), etc will be displayed properly on the PDF. In addition to that, the tables will span over the entire page width making them more readable and some of the Bootstrap utility class will now also be supported (such as `bg-100`). Note: `wkhtmltopdf` does not support CSS variables, which prevents some Bootstrap rules from applying as intended. To address this, `bootstrap_review_report.scss` includes targeted workarounds to replace certain variable-based properties, ensuring the styles remain consistent in the PDF output. Task-4989809
5 changes
Enhancements to existing features
The updated UBL BIS3 electronic invoice generation helpers are now enabled by default, improving consistency with the newer invoice creation process. Businesses can still opt out if needed by changing the related configuration setting.
Original PR description
In 0f3a9dee5cf15 we back-ported the new refactored helpers for UBL BIS3 generation to 18.0. However the new helpers would be used only if the `ir.config.parameter` `account_edi_ubl_cii.use_new_dict_to_xml_helpers` was set to True. This commit switches the new helpers on by default in 18.0 -> 18.3, but they can still be switched off by setting that parameter to False. task-none
SMS message generation can now receive extra contextual information from add-on modules. This makes it easier for businesses to customize automated SMS content without relying on fragile workarounds.
Original PR description
In add-ons may need to pass additional context to body render function, both `_render_field`, and `_render_template` support this but the `sms.composer` didn't implement a proper way to pass additional context to them. overwrite `_prepare_body_values` for just passing `add_context` to render functions is not a good practice. In this PR I add a `_get_body_additional_context` to it, so any module can overwrite that function to pass additional context to render functions.
This change speeds up an internal accounting localization test by adding temporary database indexes while test accounts are being deleted. It reduces build and validation time, helping developers and CI systems provide feedback faster without changing customer-facing accounting behavior.
Original PR description
During the second half of `test_all_l10n`, we keep deleting `account.account` records (hundreds to low thousand every iteration). This deletion turns out to account (heh) for about 15% of the test's…
During the second half of `test_all_l10n`, we keep deleting `account.account` records (hundreds to low thousand every iteration). This deletion turns out to account (heh) for about 15% of the test's run time running locally (5mn out of 30). And per the explain, this is largely from executing `ON DELETE` constraints: since accounts are rarely deleted, the forward-only M2Os (used to go from a record to an account) are not generally indexes, which causes a full scan of the non-account table on deletion of accounts, which... can be quite slow if the non-account table is large, e.g. sample `EXPLAIN ANALYZE` for one of the `DELETE FROM account_account`:
Trigger for constraint account_fiscal_position_account_account_src_id_fkey on account_account: time=30.040 calls=1000
Trigger for constraint account_fiscal_position_account_account_dest_id_fkey on account_account: time=20.977 calls=1000
Trigger for constraint account_account_tax_default_rel_account_id_fkey on account_account: time=16.423 calls=1000
Trigger for constraint account_account_res_company_rel_account_account_id_fkey on account_account: time=18.848 calls=1000
Trigger for constraint account_account_account_tag_account_account_id_fkey on account_account: time=12.396 calls=1000
Trigger for constraint account_journal_default_account_id_fkey on account_account: time=207.759 calls=1000
Trigger for constraint account_journal_suspense_account_id_fkey on account_account: time=131.019 calls=1000
Trigger for constraint account_journal_non_deductible_account_id_fkey on account_account: time=126.656 calls=1000
Trigger for constraint account_journal_profit_account_id_fkey on account_account: time=128.753 calls=1000
Trigger for constraint account_journal_loss_account_id_fkey on account_account: time=125.281 calls=1000
Trigger for constraint res_company_transfer_account_id_fkey on account_account: time=85.604 calls=1000
Trigger for constraint res_company_default_cash_difference_income_account_id_fkey on account_account: time=75.154 calls=1000
Trigger for constraint res_company_default_cash_difference_expense_account_id_fkey on account_account: time=73.173 calls=1000
Trigger for constraint res_company_account_journal_suspense_account_id_fkey on account_account: time=73.336 calls=1000
Trigger for constraint res_company_account_journal_early_pay_discount_gain_accoun_fkey on account_account: time=73.741 calls=1000
Trigger for constraint res_company_account_journal_early_pay_discount_loss_accoun_fkey on account_account: time=73.402 calls=1000
Trigger for constraint res_company_income_currency_exchange_account_id_fkey on account_account: time=74.586 calls=1000
Trigger for constraint res_company_expense_currency_exchange_account_id_fkey on account_account: time=74.678 calls=1000
Trigger for constraint res_company_account_default_pos_receivable_account_id_fkey on account_account: time=77.105 calls=1000
Trigger for constraint res_company_expense_accrual_account_id_fkey on account_account: time=77.000 calls=1000
Trigger for constraint res_company_revenue_accrual_account_id_fkey on account_account: time=76.399 calls=1000
Trigger for constraint res_company_account_cash_basis_base_account_id_fkey on account_account: time=77.996 calls=1000
Trigger for constraint res_company_account_discount_income_allocation_id_fkey on account_account: time=77.799 calls=1000
Trigger for constraint res_company_account_discount_expense_allocation_id_fkey on account_account: time=78.145 calls=1000
Trigger for constraint res_company_income_account_id_fkey on account_account: time=79.625 calls=1000
Trigger for constraint res_company_expense_account_id_fkey on account_account: time=79.421 calls=1000
Trigger for constraint account_tax_group_tax_payable_account_id_fkey on account_account: time=103.659 calls=1000
Trigger for constraint account_tax_group_tax_receivable_account_id_fkey on account_account: time=75.211 calls=1000
Trigger for constraint account_tax_group_advance_tax_payment_account_id_fkey on account_account: time=72.384 calls=1000
Trigger for constraint account_tax_cash_basis_transition_account_id_fkey on account_account: time=954.139 calls=1000
Trigger for constraint account_tax_repartition_line_account_id_fkey on account_account: time=1445.578 calls=1000
Trigger for constraint account_reconcile_model_line_account_id_fkey on account_account: time=71.619 calls=1000
Trigger for constraint account_move_line_account_id_fkey on account_account: time=140.720 calls=1000
Trigger for constraint account_payment_outstanding_account_id_fkey on account_account: time=17.682 calls=1000
Trigger for constraint account_payment_destination_account_id_fkey on account_account: time=6.791 calls=1000
Trigger for constraint account_payment_method_line_payment_account_id_fkey on account_account: time=75.530 calls=1000
Trigger for constraint account_analytic_line_general_account_id_fkey on account_account: time=81.989 calls=1000
Trigger for constraint account_automatic_entry_wizard_destination_account_id_fkey on account_account: time=8.967 calls=1000
Trigger for constraint account_payment_register_writeoff_account_id_fkey on account_account: time=9.166 calls=1000
Trigger for constraint account_accrued_orders_wizard_account_id_fkey on account_account: time=7.863 calls=1000
Trigger for constraint account_account_account_merge_wizard_re_account_account_id_fkey on account_account: time=7.338 calls=1000
Trigger for constraint account_merge_wizard_line_account_id_fkey on account_account: time=7.706 calls=1000
Trigger for constraint res_company_deferred_expense_account_id_fkey on account_account: time=126.271 calls=1000
Trigger for constraint res_company_deferred_revenue_account_id_fkey on account_account: time=98.607 calls=1000
Trigger for constraint account_account_account_auto_reconcile__account_account_id_fkey on account_account: time=8.921 calls=1000
Trigger for constraint account_reconcile_wizard_account_id_fkey on account_account: time=8.330 calls=1000
Trigger for constraint account_model_rel_account_account_id_fkey on account_account: time=27.264 calls=1000
Trigger for constraint account_transfer_model_line_account_id_fkey on account_account: time=39.033 calls=1000
Trigger for constraint account_fiscal_position_avatax_invoice_account_id_fkey on account_account: time=83.360 calls=1000
Trigger for constraint account_fiscal_position_avatax_refund_account_id_fkey on account_account: time=60.023 calls=1000
Trigger for constraint account_account_account_import_summary__account_account_id_fkey on account_account: time=8.251 calls=1000
Trigger for constraint res_company_account_revaluation_expense_provision_account__fkey on account_account: time=107.339 calls=1000
Trigger for constraint res_company_account_revaluation_income_provision_account_i_fkey on account_account: time=100.037 calls=1000
Trigger for constraint account_account_exclude_res_currency_pr_account_account_id_fkey on account_account: time=9.025 calls=1000
Trigger for constraint account_report_budget_item_account_id_fkey on account_account: time=7.600 calls=1000
Trigger for constraint account_payment_withholding_line_account_id_fkey on account_account: time=7.814 calls=1000
Trigger for constraint res_company_withholding_tax_base_account_id_fkey on account_account: time=116.893 calls=1000
Trigger for constraint account_payment_register_withholding_outstanding_account_i_fkey on account_account: time=8.580 calls=1000
Trigger for constraint account_payment_register_withholding_line_account_id_fkey on account_account: time=8.799 calls=1000
Trigger for constraint res_company_l10n_ee_rounding_difference_loss_account_id_fkey on account_account: time=115.461 calls=1000
Trigger for constraint res_company_l10n_ee_rounding_difference_profit_account_id_fkey on account_account: time=114.827 calls=1000
Trigger for constraint account_journal_l10n_tr_default_sales_return_account_id_fkey on account_account: time=305.506 calls=1000
Trigger for constraint res_company_account_production_wip_account_id_fkey on account_account: time=125.388 calls=1000
Trigger for constraint res_company_account_production_wip_overhead_account_id_fkey on account_account: time=117.769 calls=1000
Trigger for constraint stock_location_valuation_in_account_id_fkey on account_account: time=104.378 calls=1000
Trigger for constraint stock_location_valuation_out_account_id_fkey on account_account: time=67.309 calls=1000
Trigger for constraint stock_valuation_layer_revaluation_account_id_fkey on account_account: time=8.817 calls=1000
Trigger for constraint res_company_l10n_fr_rounding_difference_loss_account_id_fkey on account_account: time=127.732 calls=1000
Trigger for constraint res_company_l10n_fr_rounding_difference_profit_account_id_fkey on account_account: time=124.773 calls=1000
Trigger for constraint res_company_l10n_in_withholding_account_id_fkey on account_account: time=124.847 calls=1000
Trigger for constraint res_company_l10n_nl_rounding_difference_loss_account_id_fkey on account_account: time=131.094 calls=1000
Trigger for constraint res_company_l10n_nl_rounding_difference_profit_account_id_fkey on account_account: time=132.013 calls=1000
Trigger for constraint mrp_workcenter_expense_account_id_fkey on account_account: time=14.578 calls=1000
Trigger for constraint mrp_account_wip_accounting_line_account_id_fkey on account_account: time=8.530 calls=1000
Trigger for constraint account_payment_force_outstanding_account_id_fkey on account_account: time=11.336 calls=1000
Trigger for constraint pos_payment_method_outstanding_account_id_fkey on account_account: time=11.554 calls=1000
Trigger for constraint pos_payment_method_receivable_account_id_fkey on account_account: time=6.654 calls=1000
Trigger for constraint pos_close_session_wizard_account_id_fkey on account_account: time=7.825 calls=1000
Trigger for constraint res_company_downpayment_account_id_fkey on account_account: time=137.312 calls=1000
Trigger for constraint res_company_l10n_bd_corporate_tax_liability_fkey on account_account: time=143.026 calls=1000
Trigger for constraint res_company_l10n_bd_corporate_tax_expense_fkey on account_account: time=141.801 calls=1000
Trigger for constraint account_move_l10n_de_datev_main_account_id_fkey on account_account: time=3874.682 calls=1000
Trigger for constraint stock_landed_cost_lines_account_id_fkey on account_account: time=14.898 calls=1000
Trigger for constraint account_account_account_asset_rel_account_account_id_fkey on account_account: time=9.640 calls=1000
Trigger for constraint account_asset_account_asset_id_fkey on account_account: time=11.687 calls=1000
Trigger for constraint account_asset_account_depreciation_id_fkey on account_account: time=6.551 calls=1000
Trigger for constraint account_asset_account_depreciation_expense_id_fkey on account_account: time=6.300 calls=1000
Trigger for constraint res_company_gain_account_id_fkey on account_account: time=210.699 calls=1000
Trigger for constraint res_company_loss_account_id_fkey on account_account: time=180.965 calls=1000
Trigger for constraint asset_modify_account_asset_id_fkey on account_account: time=10.665 calls=1000
Trigger for constraint asset_modify_account_asset_counterpart_id_fkey on account_account: time=5.466 calls=1000
Trigger for constraint asset_modify_account_depreciation_id_fkey on account_account: time=5.353 calls=1000
Trigger for constraint asset_modify_account_depreciation_expense_id_fkey on account_account: time=5.438 calls=1000
Trigger for constraint res_company_l10n_ae_tax_report_liabilities_account_fkey on account_account: time=176.808 calls=1000
Trigger for constraint res_company_l10n_ae_tax_report_expenses_account_fkey on account_account: time=172.302 calls=1000
Trigger for constraint res_company_l10n_ae_tax_report_asset_account_fkey on account_account: time=170.480 calls=1000
Trigger for constraint res_company_l10n_ar_tax_base_account_id_fkey on account_account: time=171.774 calls=1000
Trigger for constraint soda_account_mapping_account_id_fkey on account_account: time=9.239 calls=1000
Trigger for constraint res_company_l10n_ec_tax_base_sale_account_id_fkey on account_account: time=176.779 calls=1000
Trigger for constraint res_company_l10n_ec_tax_base_purchase_account_id_fkey on account_account: time=175.159 calls=1000
Trigger for constraint account_loan_long_term_account_id_fkey on account_account: time=13.823 calls=1000
Trigger for constraint account_loan_short_term_account_id_fkey on account_account: time=7.044 calls=1000
Trigger for constraint account_loan_expense_account_id_fkey on account_account: time=5.934 calls=1000
Trigger for constraint res_company_l10n_cl_factoring_counterpart_account_id_fkey on account_account: time=193.722 calls=1000
Trigger for constraint res_company_exemption_doctor_master_account_id_fkey on account_account: time=201.309 calls=1000
Trigger for constraint res_company_exemption_bachelor_account_id_fkey on account_account: time=200.476 calls=1000
Trigger for constraint res_company_exemption_bachelor_capping_account_id_fkey on account_account: time=200.465 calls=1000
Trigger for constraint res_company_partner_id_fkey on res_company: time=0.208 calls=10
Trigger for constraint res_company_currency_id_fkey on res_company: time=0.018 calls=10
Trigger for constraint res_company_paperformat_id_fkey on res_company: time=0.014 calls=10
Trigger for constraint res_company_create_uid_fkey on res_company: time=0.015 calls=10
Trigger for constraint res_company_write_uid_fkey on res_company: time=0.009 calls=10
Trigger for constraint res_company_resource_calendar_id_fkey on res_company: time=0.023 calls=10
Trigger for constraint res_company_transfer_account_id_fkey on res_company: time=0.002 calls=9
Trigger for constraint res_company_default_cash_difference_income_account_id_fkey on res_company: time=0.055 calls=10
Trigger for constraint res_company_default_cash_difference_expense_account_id_fkey on res_company: time=0.030 calls=10
Trigger for constraint res_company_account_journal_suspense_account_id_fkey on res_company: time=0.002 calls=8
Trigger for constraint res_company_account_journal_early_pay_discount_gain_accoun_fkey on res_company: time=0.002 calls=7
Trigger for constraint res_company_account_journal_early_pay_discount_loss_accoun_fkey on res_company: time=0.001 calls=4
Trigger for constraint res_company_income_currency_exchange_account_id_fkey on res_company: time=0.029 calls=10
Trigger for constraint res_company_expense_currency_exchange_account_id_fkey on res_company: time=0.001 calls=5
Trigger for constraint res_company_batch_payment_sequence_id_fkey on res_company: time=0.016 calls=10
Trigger for constraint res_company_account_default_pos_receivable_account_id_fkey on res_company: time=0.001 calls=2
Trigger for constraint res_company_account_fiscal_country_id_fkey on res_company: time=0.015 calls=10
Trigger for constraint res_company_income_account_id_fkey on res_company: time=0.002 calls=6
Trigger for constraint res_company_expense_account_id_fkey on res_company: time=0.001 calls=3
Trigger for constraint res_company_deferred_expense_account_id_fkey on res_company: time=0.000 calls=1
Trigger for constraint res_company_nomenclature_id_fkey on res_company: time=0.012 calls=10
Trigger for constraint res_company_internal_transit_location_id_fkey on res_company: time=0.014 calls=10
Trigger for constraint res_company_stock_mail_confirmation_template_id_fkey on res_company: time=0.013 calls=10
Trigger for constraint res_company_documents_fleet_folder_fkey on res_company: time=0.016 calls=10
Trigger for constraint res_company_documents_hr_folder_fkey on res_company: time=0.010 calls=10
Trigger for constraint res_company_documents_employee_folder_id_fkey on res_company: time=0.011 calls=10
Trigger for constraint res_company_documents_project_folder_id_fkey on res_company: time=0.009 calls=10
Trigger for constraint res_company_stock_sms_confirmation_template_id_fkey on res_company: time=0.012 calls=10
Trigger for constraint res_company_recruitment_folder_id_fkey on res_company: time=0.010 calls=10
Trigger for constraint res_company_project_time_mode_id_fkey on res_company: time=0.019 calls=10
Trigger for constraint res_company_timesheet_encode_uom_id_fkey on res_company: time=0.011 calls=10
Trigger for constraint res_company_internal_project_id_fkey on res_company: time=0.015 calls=10
Trigger for constraint res_company_leave_timesheet_task_id_fkey on res_company: time=0.015 calls=10
Trigger for constraint res_company_rental_loc_id_fkey on res_company: time=0.011 calls=10
Trigger for constraint res_company_l10n_ch_delegate_country_id_fkey on res_company: time=0.013 calls=10
Trigger for constraint res_company_l10n_eg_annual_leave_type_id_fkey on res_company: time=0.014 calls=10
Accumulated across the entire test:
account_account_account_asset_rel_account_account_id_fkey: 367.89
account_account_account_auto_reconcile__account_account_id_fkey: 369.314
account_account_account_import_summary__account_account_id_fkey: 308.894
account_account_account_merge_wizard_re_account_account_id_fkey: 258.345
account_account_account_tag_account_account_id_fkey: 437.58
account_account_exclude_res_currency_pr_account_account_id_fkey: 364.079
account_account_res_company_rel_account_account_id_fkey: 676.195
account_account_tax_default_rel_account_id_fkey: 616.155
account_accrued_orders_wizard_account_id_fkey: 281.117
account_analytic_line_general_account_id_fkey: 2920.52
account_asset_account_asset_id_fkey: 435.021
account_asset_account_depreciation_expense_id_fkey: 225.966
account_asset_account_depreciation_id_fkey: 243.045
account_automatic_entry_wizard_destination_account_id_fkey: 333.281
account_fiscal_position_account_account_dest_id_fkey: 764.004
account_fiscal_position_account_account_src_id_fkey: 1127.7
account_fiscal_position_avatax_invoice_account_id_fkey: 2903.72
account_fiscal_position_avatax_refund_account_id_fkey: 2243.92
account_journal_default_account_id_fkey: 8123.53
account_journal_l10n_tr_default_sales_return_account_id_fkey: 13035
account_journal_loss_account_id_fkey: 4810.37
account_journal_non_deductible_account_id_fkey: 5057.85
account_journal_profit_account_id_fkey: 5063.26
account_journal_suspense_account_id_fkey: 5492.64
account_loan_expense_account_id_fkey: 222.776
account_loan_long_term_account_id_fkey: 553.955
account_loan_short_term_account_id_fkey: 259.905
account_merge_wizard_line_account_id_fkey: 265.135
account_model_rel_account_account_id_fkey: 927.993
account_move_l10n_de_datev_main_account_id_fkey: 122923
account_move_line_account_id_fkey: 4000.68
account_payment_destination_account_id_fkey: 265.653
account_payment_force_outstanding_account_id_fkey: 459.209
account_payment_method_line_payment_account_id_fkey: 2660.46
account_payment_outstanding_account_id_fkey: 575.21
account_payment_register_withholding_line_account_id_fkey: 319.363
account_payment_register_withholding_outstanding_account_i_fkey: 383.508
account_payment_register_writeoff_account_id_fkey: 341.615
account_payment_withholding_line_account_id_fkey: 286.658
account_reconcile_model_line_account_id_fkey: 2608.16
account_reconcile_wizard_account_id_fkey: 309.389
account_report_budget_item_account_id_fkey: 300.099
account_tax_cash_basis_transition_account_id_fkey: 31329.6
account_tax_group_advance_tax_payment_account_id_fkey: 2629.35
account_tax_group_tax_payable_account_id_fkey: 3554.27
account_tax_group_tax_receivable_account_id_fkey: 2772.1
account_tax_repartition_line_account_id_fkey: 47923.3
account_transfer_model_line_account_id_fkey: 1309.84
asset_modify_account_asset_counterpart_id_fkey: 207.683
asset_modify_account_asset_id_fkey: 454.126
asset_modify_account_depreciation_expense_id_fkey: 189.258
asset_modify_account_depreciation_id_fkey: 192.029
mrp_account_wip_accounting_line_account_id_fkey: 305.605
mrp_workcenter_expense_account_id_fkey: 565.317
pos_close_session_wizard_account_id_fkey: 285.536
pos_payment_method_outstanding_account_id_fkey: 432.131
pos_payment_method_receivable_account_id_fkey: 249.401
res_company_account_cash_basis_base_account_id_fkey: 5195.51
res_company_account_default_pos_receivable_account_id_fkey: 5357.29
res_company_account_discount_expense_allocation_id_fkey: 5113.98
res_company_account_discount_income_allocation_id_fkey: 5151.48
res_company_account_fiscal_country_id_fkey: 1
res_company_account_journal_early_pay_discount_gain_accoun_fkey: 5640.61
res_company_account_journal_early_pay_discount_loss_accoun_fkey: 5489.35
res_company_account_journal_suspense_account_id_fkey: 5811.88
res_company_account_production_wip_account_id_fkey: 8351.27
res_company_account_production_wip_overhead_account_id_fkey: 7914.54
res_company_account_revaluation_expense_provision_account__fkey: 8858.1
res_company_account_revaluation_income_provision_account_i_fkey: 8169.02
res_company_batch_payment_sequence_id_fkey: 0.995
res_company_create_uid_fkey: 2.96
res_company_currency_id_fkey: 1.081
res_company_default_cash_difference_expense_account_id_fkey: 6060.06
res_company_default_cash_difference_income_account_id_fkey: 6404.5
res_company_deferred_expense_account_id_fkey: 10447.3
res_company_deferred_revenue_account_id_fkey: 8923.24
res_company_documents_employee_folder_id_fkey: 0.875
res_company_documents_fleet_folder_fkey: 1.374
res_company_documents_hr_folder_fkey: 0.829
res_company_documents_project_folder_id_fkey: 0.779
res_company_downpayment_account_id_fkey: 8009.08
res_company_exemption_bachelor_account_id_fkey: 10964.3
res_company_exemption_bachelor_capping_account_id_fkey: 10860.6
res_company_exemption_doctor_master_account_id_fkey: 11117
res_company_expense_account_id_fkey: 5124.13
res_company_expense_accrual_account_id_fkey: 5246.67
res_company_expense_currency_exchange_account_id_fkey: 5352.77
res_company_external_report_layout_id_fkey: 0.308
res_company_gain_account_id_fkey: 14196.4
res_company_income_account_id_fkey: 5136.8
res_company_income_currency_exchange_account_id_fkey: 5441.56
res_company_internal_project_id_fkey: 1.151
res_company_internal_transit_location_id_fkey: 1.019
res_company_l10n_ae_tax_report_asset_account_fkey: 10908.2
res_company_l10n_ae_tax_report_expenses_account_fkey: 11365.8
res_company_l10n_ae_tax_report_liabilities_account_fkey: 11898.4
res_company_l10n_ar_tax_base_account_id_fkey: 10648.4
res_company_l10n_bd_corporate_tax_expense_fkey: 8098.52
res_company_l10n_bd_corporate_tax_liability_fkey: 8176.24
res_company_l10n_ch_delegate_country_id_fkey: 0.864
res_company_l10n_cl_factoring_counterpart_account_id_fkey: 10872.3
res_company_l10n_ec_tax_base_purchase_account_id_fkey: 10358.2
res_company_l10n_ec_tax_base_sale_account_id_fkey: 10547
res_company_l10n_ee_rounding_difference_loss_account_id_fkey: 8158.92
res_company_l10n_ee_rounding_difference_profit_account_id_fkey: 7896.55
res_company_l10n_eg_annual_leave_type_id_fkey: 0.887
res_company_l10n_fr_rounding_difference_loss_account_id_fkey: 8227.23
res_company_l10n_fr_rounding_difference_profit_account_id_fkey: 7965.89
res_company_l10n_in_withholding_account_id_fkey: 7820.82
res_company_l10n_nl_rounding_difference_loss_account_id_fkey: 7982.45
res_company_l10n_nl_rounding_difference_profit_account_id_fkey: 7874.47
res_company_leave_timesheet_task_id_fkey: 1.153
res_company_loss_account_id_fkey: 12688.6
res_company_nomenclature_id_fkey: 0.828
res_company_paperformat_id_fkey: 0.941
res_company_partner_id_fkey: 5.739
res_company_project_time_mode_id_fkey: 1.273
res_company_recruitment_folder_id_fkey: 0.816
res_company_rental_loc_id_fkey: 0.851
res_company_resource_calendar_id_fkey: 1.515
res_company_revenue_accrual_account_id_fkey: 5175.54
res_company_stock_mail_confirmation_template_id_fkey: 0.9
res_company_stock_sms_confirmation_template_id_fkey: 0.861
res_company_timesheet_encode_uom_id_fkey: 0.78
res_company_transfer_account_id_fkey: 7072.12
res_company_withholding_tax_base_account_id_fkey: 8502.05
res_company_write_uid_fkey: 0.743
soda_account_mapping_account_id_fkey: 398.04
stock_landed_cost_lines_account_id_fkey: 658.493
stock_location_valuation_in_account_id_fkey: 3940.27
stock_location_valuation_out_account_id_fkey: 2818.23
stock_valuation_layer_revaluation_account_id_fkey: 340.648
for a total of 661283ms = 11mn[^0].
This commit adds temporary indexes for every m2o field to account which is not already indexed[^1][^2] after all the l10n modules are installed, those indexes are then deleted at the end of the test to avoid polluting the database for the split tests.
This removes most of the cost of deleting accounts (not going to bother with the detail, the entire thing comes out at under a second), at a very minor cost (a few seconds) to create the indices though an increased overall load (due to having to update indexes).
Saves around 5mn on an unloaded 30mn build, and because it avoids a significant amount of parallelized seq scans it saves even more when running on a loaded runbot where parallel postgres workers are CPU starved (10~15mn out of 50~55).
Note: patched `load_file` because `l10n_tr` enables `tr_TR`, and then the tx subsystem complains about pretty much every module being installed because few to none of them have a tr_TR po file.
Backport of #217690
[^0]: `EXPLAIN ANALYZE`-ing everything slows down the test by a factor
of 2x, which is why this takes 11mn instead of the original 5, and
the test itself takes 1h instead of the original 30mn
[^1]: Kinda, currently it just checks if the field is `index` on the
Odoo side, so it's going to miss things like manual partial
indexes, or compound index (though in that case we should only
take in account cases where the account field is the first one),
etc...
[^2]: The specific missing indexes could have been enumerated and
created specifically but it doesn't seem worth the hassle, the
gain from trimming down the list would only be a fraction of a
second from creating a few less indexes, with the risk of missing
new missing indexes. A blacklist might make sense to avoid
creating indexes for constraints with extremely low costs (either
empty tables or already indexed) e.g. constraints with under 250ms
total runtime[^3].
[^3]: Note that the numbers above are full dumps of the trigger times,
a fair number of triggers in the dumps are *not* on accounts but
are due to ancillary deletions or deletion cascades. Pretty much
every trigger below triple digit (ms) runtime is a non-account
trigger, and this PR is not creating indexes for any of those.This update expands automated checks for several onboarding tours so issues are caught earlier during validation. It also speeds up tour execution and removes a duplicate sales test, helping keep release checks efficient without changing day-to-day user behavior.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The shop floor now remembers the user’s last selected work center when they leave and return using breadcrumbs. This keeps the view consistent while preserving the existing behavior when opening shop floor from Manufacturing work centers.
Original PR description
Description of the issue/feature this PR addresses: Incoherent selection of workcenters when using the breadcrumbs to come back to the shopfloor app:…
Description of the issue/feature this PR addresses: Incoherent selection of workcenters when using the breadcrumbs to come back to the shopfloor app: https://drive.google.com/file/d/1C1nVdDHgCss7s7zyXDOpbMj0k79HlJBH/view?usp=drivesdk Current behavior before PR: When leaving the shopfloor app via a WO (WO setting -> Open MO), we set the a **context flag workcenter_id** in the the currentCaller.action.context to save the selected workcenter for breadcrumb logic. The same **context flag workcenter_id** is used in the Manufacturing/workcenters view, when clicking on a workcenter. However, the intended use of the **workcenter_id flag** is different: - 1 From Manufacturing: Open shop floor with **only** workcenter_id selected + visible (no other workcenters visible). - 2 From Shopfloor breadcrumb : Go to shop floor with all previous workcenters same as when leaving. Additionally the current logic for setting the workcenter_id flag from the MrpDisplay record currently handles only the selection of isMyWO ([PR](https://github.com/odoo/enterprise/pull/52258)) Desired behavior after PR is merged: Keep the same behavior when coming from Manufacturing/workcenters ([PR](https://github.com/odoo/enterprise/pull/67318)) but make sure the user come back to same view when leaving shopfloor and coming back via breadcrumbs. task: [4629641](https://www.odoo.com/odoo/project/966/tasks/4629641) I confirm I have signed the CLA and read the PR guidelines at [www.odoo.com/submit-pr](http://www.odoo.com/submit-pr)