Thursday, January 30, 2025
16 changes · master
Enhancements to existing features
The room booking module’s automated tests were moved to a newer testing framework. This is an internal quality improvement that helps maintain reliability without changing how users book or manage rooms.
Original PR description
This PR aims to convert QUnit tests to hoot. Part of Task-3818666
This update refreshes specific Mexico electronic invoicing payment test cases to better reflect expected behavior when payments and invoices use different currencies. It helps maintain confidence that Mexican localization workflows continue to calculate and validate payment balances correctly.
Original PR description
updating the below-mentioned test cases: - test_foreign_curr_payment_comp_curr_invoice_forced_balance - test_comp_curr_payment_foreign_curr_invoice_forced_balance task - 3707383 Community PR - https://github.com/odoo/odoo/pull/165077 Enterprise PR - https://github.com/odoo/enterprise/pull/62442 Upgrade PR - https://github.com/odoo/upgrade/pull/6014
Code cleanup and technical improvements
This change updates Field Service and Studio screens to reuse cached field information instead of repeatedly requesting it directly. It should make related pages more efficient without changing how users work.
Original PR description
The field service caches fields_get results. Here we replace some direct calls to fields_get via the orm by calls to the method loadFields of field service.
Miscellaneous changes
Issue: Translations for terms "month", "year," and "week" are missing in the eCommerce subscription. Steps to reproduce: - Navigate to the website shop. - Pick a subscription product. - Change the language. "month" (along with the other two alternatives) is not translated. opw-4404734 Forward-Port-Of: odoo/enterprise#77395
Original PR description
Issue: Translations for terms "month", "year," and "week" are missing in the eCommerce subscription. Steps to reproduce: - Navigate to the website shop. - Pick a subscription product. - Change the language. "month" (along with the other two alternatives) is not translated. opw-4404734 Forward-Port-Of: odoo/enterprise#77395
This internal change updates spreadsheet-related test utilities so they return the test environment needed by related checks. It helps keep spreadsheet sales and list testing aligned with the main platform changes, reducing maintenance risk without changing user-facing behavior.
Original PR description
This commit is the counterpart of https://github.com/odoo/odoo/pull/195552 Task: 4525938
When opening the Invoice Overdue through the partner form: 1 - Create over due MISC entries (through deferred entries for example) 2 - Open a partner 3 - Go the the Accounting tab 4 - Click the Overdue Invoices button -> Some MISC entries show while we only want to view sale document. This commit fixes that by adding a filter on the domain to reduce the search scope to only sale documents. task-4523037 Forward-Port-Of: odoo/enterprise#78095
Original PR description
When opening the Invoice Overdue through the partner form: 1 - Create over due MISC entries (through deferred entries for example) 2 - Open a partner 3 - Go the the Accounting tab 4 - Click the Overdue Invoices button -> Some MISC entries show while we only want to view sale document. This commit fixes that by adding a filter on the domain to reduce the search scope to only sale documents. task-4523037 Forward-Port-Of: odoo/enterprise#78095
Steps to reproduce: - Create a new accounting report - Create a new line - Set a value in the groupby field -> A warning appears, stating that the line uses a custom user-defined "group by" value. This warning is only useful when modifying a groupby value for a line that has a xmlid. task-4286306 Forward-Port-Of: odoo/enterprise#78067 Forward-Port-Of: odoo/enterprise#74526
Original PR description
Steps to reproduce: - Create a new accounting report - Create a new line - Set a value in the groupby field -> A warning appears, stating that the line uses a custom user-defined "group by" value. This warning is only useful when modifying a groupby value for a line that has a xmlid. task-4286306 Forward-Port-Of: odoo/enterprise#78067 Forward-Port-Of: odoo/enterprise#74526
### Description: When creating a loan, users encounter a memory error if they have used accounting. This occurs because the `currency_id` field is related to the company's `currency_id` and is not readonly, causing the ORM to perform an inverse related and update the company's `currency_id`. This is problematic since changing the currency triggers a massive recompute of nearly all accounting records unnecessarily. For example, in the case of this customer, it was trying to update 191219 account
Original PR description
### Description: When creating a loan, users encounter a memory error if they have used accounting. This occurs because the `currency_id` field is related to the company's `currency_id` and is not…
### Description: When creating a loan, users encounter a memory error if they have used accounting. This occurs because the `currency_id` field is related to the company's `currency_id` and is not readonly, causing the ORM to perform an inverse related and update the company's `currency_id`. This is problematic since changing the currency triggers a massive recompute of nearly all accounting records unnecessarily. For example, in the case of this customer, it was trying to update 191219 account.analytic.line, which caused this memory error. The initial design aimed to show the monetary symbol on the form when the `onchange` in `web/models/models.py` was triggered, but this approach led to the issue. ### Fix: By adding `company_id` to the view as an invisible field, the onchange can retrieve it to display the monetary symbol without triggering the problem. This change is backward-compatible; customers who haven't updated their views will only miss the monetary symbols on the form view until the record is saved. ### Reference: opw-4486739 Forward-Port-Of: odoo/enterprise#77990
Using a newly created payslip structure for Mexico it is not possible to generate payslips Steps to reproduce: - With an MX Company setup - Go to Payroll > Configuration > Salary > Structures - Create new structure with the following attributes: - Type: "Mexico: employee" - Country: "Mexico" - Go to Payroll > Payslips > Batches, create a new batch - Click "Generate Payslips" - Select the freshly created salary structure in the wizard, then click "Generate" Issue: An error is ra
Original PR description
Using a newly created payslip structure for Mexico it is not possible to generate payslips Steps to reproduce: - With an MX Company setup - Go to Payroll > Configuration > Salary > Structures - Create new structure with the following attributes: - Type: "Mexico: employee" - Country: "Mexico" - Go to Payroll > Payslips > Batches, create a new batch - Click "Generate Payslips" - Select the freshly created salary structure in the wizard, then click "Generate" Issue: An error is raised while creating the payslip Error: float() argument must be a string or a real number, not 'NoneType' This occurs because we don't have a fallback in `_get_paid_amount` opw-4328900 Forward-Port-Of: odoo/enterprise#78058 Forward-Port-Of: odoo/enterprise#77277
Steps to reproduce: 1) install document_hr_recruit module 2) create an application and upload an attachment to it 3) go to the kanban view and click on the attachment icon on the right bottom 4) it will lead you to the document view instead of the document Cause : In the document settings, there’s a recruitment option to select the folder for job positions and application documents. By default, the setting should be 'Recruitment', but the visibility is not configured in the code Fix:
Original PR description
Steps to reproduce: 1) install document_hr_recruit module 2) create an application and upload an attachment to it 3) go to the kanban view and click on the attachment icon on the right bottom 4) it will lead you to the document view instead of the document Cause : In the document settings, there’s a recruitment option to select the folder for job positions and application documents. By default, the setting should be 'Recruitment', but the visibility is not configured in the code Fix: We will provide 'view' access to the folder Task-4348197 Forward-Port-Of: odoo/enterprise#77794 Forward-Port-Of: odoo/enterprise#74950
Steps to reproduce: ----- - Create a FSM task - Add products - Mark as done - Create invoice - Duplicate the task Issue: ----- The newly created task is linked to the invoice of the duplicated task. This comportment is not intended. Fix: ---- Creation of the copy method so the sale_order_id and the sale_line_id get set to false when duplicating a record. opw-4393596 Forward-Port-Of: odoo/enterprise#77797 Forward-Port-Of: odoo/enterprise#76547
Original PR description
Steps to reproduce: ----- - Create a FSM task - Add products - Mark as done - Create invoice - Duplicate the task Issue: ----- The newly created task is linked to the invoice of the duplicated task. This comportment is not intended. Fix: ---- Creation of the copy method so the sale_order_id and the sale_line_id get set to false when duplicating a record. opw-4393596 Forward-Port-Of: odoo/enterprise#77797 Forward-Port-Of: odoo/enterprise#76547
The `MRR Evolution` dashboard contained a relation filter that would wrongly refer to the model `sale.temporal.recurrence` even tough its field matching pointed towards `sale.subscription.plan`. From a setup POV, the filter was invalid but the only part we use is the field matching, which was correct in itself. The issue came when we wanted to edit the filter in a database which did not have the model `sale.temporal.recurrence`. task-4467133 opw-4432567 Forward-Port-Of: odoo/enterprise#7803
Original PR description
The `MRR Evolution` dashboard contained a relation filter that would wrongly refer to the model `sale.temporal.recurrence` even tough its field matching pointed towards `sale.subscription.plan`. From a setup POV, the filter was invalid but the only part we use is the field matching, which was correct in itself. The issue came when we wanted to edit the filter in a database which did not have the model `sale.temporal.recurrence`. task-4467133 opw-4432567 Forward-Port-Of: odoo/enterprise#78034 Forward-Port-Of: odoo/enterprise#76877
Change an f-string into an sql.identifier for injection prevention Forward-Port-Of: odoo/enterprise#77956
Original PR description
Change an f-string into an sql.identifier for injection prevention Forward-Port-Of: odoo/enterprise#77956
**Steps to reproduce:** - Install stock_barcode and Sales - In Inventory settings, enable "Multi-Step Routes" - Go to "Inventory / Configuration / Warehouse Management / Routes" - Configure the rule of "Deliver in 1 step (ship)": * Propagation of Procurement Group: Fixed * Fixed Procurement Group: [create a new one] - Create a product tracked by lot - Update the quantity (e.g. 100) of the created product and assign it to a lot - Create a SO for a customer with the created product -
Original PR description
**Steps to reproduce:** - Install stock_barcode and Sales - In Inventory settings, enable "Multi-Step Routes" - Go to "Inventory / Configuration / Warehouse Management / Routes" - Configure the rule…
**Steps to reproduce:** - Install stock_barcode and Sales - In Inventory settings, enable "Multi-Step Routes" - Go to "Inventory / Configuration / Warehouse Management / Routes" - Configure the rule of "Deliver in 1 step (ship)": * Propagation of Procurement Group: Fixed * Fixed Procurement Group: [create a new one] - Create a product tracked by lot - Update the quantity (e.g. 100) of the created product and assign it to a lot - Create a SO for a customer with the created product - Confirm the SO - Create another SO for the same customer with the same product => A delivery order should be created with 2 operations with the same product - Open the delivery order in Barcode - Scan the source location - Select the 2nd line - Scan the lot **Issue:** The first line is incremented instead of the second one. Even when all the products for the first line will be scanned, it will not be possible to scan the lot to increment the second line. **Cause:** The selected line is not taken into account when searching the line on which the scanned lot should be applied. **Solution:** Unshift the selected line to the first position of the array of lines to prioritize it when searching for the adequate line for a scanned lot. opw-4208612 Forward-Port-Of: odoo/enterprise#78122 Forward-Port-Of: odoo/enterprise#76713
**Before this PR:** Upload fails(normal) but there is no proper error message. **Technical:** We previously received an error message in the "handleUploadError" function, such as "result.error." However, after the commit https://github.com/odoo/enterprise/commit/a32825ee00f2b330d99113f4d8c1488903fe744e, the error now appears directly in the "result". **After this PR:** An appropriate error message will be shown. Task-4357390 Forward-Port-Of: odoo/enterprise#75344
Original PR description
**Before this PR:** Upload fails(normal) but there is no proper error message. **Technical:** We previously received an error message in the "handleUploadError" function, such as "result.error." However, after the commit https://github.com/odoo/enterprise/commit/a32825ee00f2b330d99113f4d8c1488903fe744e, the error now appears directly in the "result". **After this PR:** An appropriate error message will be shown. Task-4357390 Forward-Port-Of: odoo/enterprise#75344
**Issue:** A error shows up when trying to insert a grouped and ordered list into spreadsheet. **Expected:** The displayed list, even if groups or orders are applied, should be insertable into spreadsheet. **Steps to reproduce:** - Activate Employees app (or any app using lists and allowing to group results) and enter in it; - Display employees as a list; - Add a `Group By` constraint (e.g. `Manager`) and order it by clicking the 2 arrows (appearing on hover);  - Open a toggled section; - Select several (or all) employees; - Using `Actions`, try `Insert in spreadsheet`. **Cause:** The list renderer doesn't manage the `Group By` constraints. **Fix:** Ignore grouped constraints. opw-4254376 Forward-Port-Of: odoo/enterprise#78022 Forward-Port-Of: odoo/enterprise#76283