Thursday, March 21, 2024
5 changes · saas-17.1
Enhancements to existing features
Expense prices tied to product categories are now updated more efficiently. The change limits recalculations to relevant unsubmitted expenses, helping improve performance without changing the normal expense workflow.
Original PR description
This enhancement optimizes the computation of prices for expenses associated with product categories. Previously, the computation was inefficient, relying on a stored computed field directly linked to product_id.standard_price. This commit overrides the write method on the product to only update unsubmitted expenses using the product as a category. The dependence is also changed to product_id instead of product_id.standard_price for better performance. Both changes aim to improve the performance. task-3741886
Resolved issues and error corrections
Fixes an issue where moving a manufacturing work order to another work center appeared to work on the shop floor screen but was lost after refreshing. The change ensures the move is saved in the backend, helping production teams rely on accurate work center assignments.
Original PR description
**Steps to reproduce the bug:** - Create a storable product P1 with BoM: - Workorder: OP1 workcenter: Assembly 1 - Create a MO with P1 and confirm it - Go to the shop floor: - Select “Assembly 1” and…
**Steps to reproduce the bug:**
- Create a storable product P1 with BoM:
- Workorder: OP1 workcenter: Assembly 1
- Create a MO with P1 and confirm it
- Go to the shop floor:
- Select “Assembly 1” and “Drill 1”
- Go to assembly 1 > select the workorder OP1
- on the right side of the footer in as ": (option)" button, which opens a pop-up window with additional options for the work order
- click on “Move to workcenter”
- Select “Drill 1”
**Problem:**
Change is applied in the frontend view (JS side) but not in the backend. If you refresh the page, the change will be lost. This is due to this commit:
https://github.com/odoo/odoo/commit/6bd2c1fdfb5722b1f2d4fc2684f20ed067b93b7d The purpose of this commit is to no longer save the record of an x2many when an autosave field is applied to an update
**Solution:**
Revert the changes made in this commit:
https://github.com/odoo/enterprise/commit/518dcd935094e30c8a39982be9b3ddb161bd03cd#diff-7df14ba8355f342f6f776e8ea293eb97ab75660c0f57245f5941e8d1da9a49bbR42-R45
opw-3816964This fixes an issue where moving a manufacturing work order to another workcenter appeared to work on the shop floor screen but was lost after refreshing. The change ensures the new workcenter is saved properly, preventing confusion and duplicate planning effort for production teams.
Original PR description
**Steps to reproduce the bug:** - Create a storable product P1 with BoM: - Workorder: OP1 workcenter: Assembly 1 - Create a MO with P1 and confirm it - Go to the shop floor: - Select “Assembly 1” and…
**Steps to reproduce the bug:**
- Create a storable product P1 with BoM:
- Workorder: OP1 workcenter: Assembly 1
- Create a MO with P1 and confirm it
- Go to the shop floor:
- Select “Assembly 1” and “Drill 1”
- Go to assembly 1 > select the workorder OP1
- on the right side of the footer in as ": (option)" button, which opens a pop-up window with additional options for the work order
- click on “Move to workcenter”
- Select “Drill 1”
**Problem:**
Change is applied in the frontend view (JS side) but not in the backend. If you refresh the page, the change will be lost. This is due to this commit:
https://github.com/odoo/odoo/commit/6bd2c1fdfb5722b1f2d4fc2684f20ed067b93b7d The purpose of this commit is to no longer save the record of an x2many when an autosave field is applied to an update
**Solution:**
Revert the changes made in this commit:
https://github.com/odoo/enterprise/commit/518dcd935094e30c8a39982be9b3ddb161bd03cd#diff-7df14ba8355f342f6f776e8ea293eb97ab75660c0f57245f5941e8d1da9a49bbR42-R45
opw-3816964This update fixes a bug that prevented invoices with specific UBL-CII tax formats (ubl_bis3 and nlcius_1) from confirming correctly. The fix ensures the system correctly processes these invoices, allowing users to complete the confirmation process without errors. This improves the reliability of electronic invoicing.
Original PR description
**Current behavior:** Creating a fixed tax with the edi formats ubl_bis3 and nlcius_1 then creating an invoice with this tax tied to a product will cause a traceback when a user tries to confirm the…
**Current behavior:**
Creating a fixed tax with the edi formats ubl_bis3 and nlcius_1
then creating an invoice with this tax tied to a product will
cause a traceback when a user tries to confirm the invoice.
**Expected behavior:**
The invoice will post as any other might.
**Steps to reproduce:**
1. Create a NL company with l10n_nl_edi accounting
2. Create a tax with the following field values:
*tax computation: fixed*
*affect base of subsequent taxes: True*
*base affected by previous taxes: True*
3. In the customer invoices journal for the created company,
go to the 'Advanced Settings' notebook tab and enable the
NLCIUS and Peppol options under 'Electronic Invoicing'
4. Create a new invoice with some product and attach the newly
created tax to it, then try to confirm the invoice to see
the traceback
**Cause of the issue:**
The edi format tags invoke different instances of the
get_invoice_line_allowance_vals_list() method. This method
returns a dict list where the dicts only sometimes contain the
key 'allowance_charge_reason_code'. A subsequent expression
expects this key in the dict which can cause a KeyError.
**Fix:**
Check instead for a 'charge_indicator' key, which is present in
both the ubl_bis3 and nlcius_1 val dicts, allowing the correct
total to be summed and reflected in the EDI document output.
opw-3680527
Forward-Port-Of: odoo/odoo#157221
Forward-Port-Of: odoo/odoo#152229This fix ensures that new projects correctly utilize the selected analytic plan. Previously, the system defaulted to a 'Projects' plan regardless of user settings. This update resolves a discrepancy in how the analytic plan is applied, improving the accuracy of timesheet and project accounting.
Original PR description
Currently, the `plan_id` used to create analytic accounts is not the one set in the settings. Steps to reproduce: ------------------- * Go to the **Settings** * Enable developper mode * Select **User…
Currently, the `plan_id` used to create analytic accounts is not the one set in the settings. Steps to reproduce: ------------------- * Go to the **Settings** * Enable developper mode * Select **User & Companies** > **Groups** * Select `Technical/Analytic Accounting` * Add user * Go to the **Project** app * Select **Configuration** > **Settings** * Under **Time Management**, enable Timesheets * Under **Analytics** > **Analytic Plan**, select Projects * Create a new project * Go into the settings of the project * Under the **Settings** tab, select the internal link for the **Analytic Account** > **Observation**: The Plan is set to Projects * Go to **Conffiguration** > **Settings** * Under **Analytics** > **Analytic Plan**, change Projects to Departments * Create a new project * Go into the settings of the project * Under the **Settings** tab, select the internal link for the **Analytic Account** > **Observation**: The Plan is still set to Projects Why the fix: ------------ When creating, an analytic account, the plan is computed with `_get_all_plans()`. https://github.com/odoo/odoo/blob/e365e22485dc45f1cbe87ae93395b022a4724a3c/addons/project/models/project_project.py#L894-L903 Inside `__get_all_plans()` the plan is computed as follows: https://github.com/odoo/odoo/blob/e365e22485dc45f1cbe87ae93395b022a4724a3c/addons/analytic/models/analytic_plan.py#L106-L107 However, the setting that the user changes in the frontend corresponds to `analytic.analytic_plan_projects`. https://github.com/odoo/odoo/blob/e365e22485dc45f1cbe87ae93395b022a4724a3c/addons/project/models/res_config_settings.py#L18-L22 This seeting is not company-related. It can be used on projects even if they have a `company_id` set to false. We fallback on `_get_all_plans()` if the user did not specifically choose a plan in the settings. opw-3751661 Forward-Port-Of: odoo/odoo#157247