Tuesday, January 28, 2025
28 changes · master
Enhancements to existing features
This update refreshes translation files and related report labels across multiple country-specific Odoo modules. It improves language consistency for users working with local tax, payroll, EDI, and financial reporting features, with no expected change to business workflows.
Subscription plans now support plural wording, so labels and invoice-related text can read more naturally for customers and staff. This improves clarity across subscription sales, renewals, payments, upsells, and stock-related subscription flows without changing the core business process.
The rental and subscription website shop pages no longer reuse outdated product metadata from the standard shop flow. This keeps the page structure cleaner and better aligned with current website sale behavior, with no expected change to the customer shopping experience.
Original PR description
task-3866937 See also: - https://github.com/odoo/odoo/pull/189289
Resolved issues and error corrections
The appraisal report now uses the correct status values when assigning colors. This ensures report visuals accurately reflect each appraisal's state, reducing confusion for HR users reviewing appraisal progress.
Original PR description
- update the appraisal state values in the `COLORS_BY_STATE` dict inm the report Task: 4521549
Code cleanup and technical improvements
HR-related screens now use the employee-specific avatar field instead of a user avatar field when showing employees. This is an internal cleanup that keeps employee displays consistent and reduces custom technical maintenance, with little expected day-to-day impact for users.
Original PR description
This commit replaces fields `many2*_avatar_user` by `many2*_avatar_employee` when it's used on `hr.employee` fields. This allows to remove a patch on `Many2*AvatarUserField` to support `hr.employee` features. This patch could be useless since we already have a field with those features.
Website appointment widgets were adapted to work with Odoo's newer interaction system, keeping booking and search snippets compatible as the platform evolves. A related subscription portal test was also adjusted so automated checks continue to match the updated page structure.
Original PR description
The public widget system is being replaced by a new Interaction class (see pull request https://github.com/odoo/odoo/pull/185998). This PR is the corresponding enterprise change necessary to make it work. Note that it only adapts some code. The rest of public widgets will be refactored soon, after this PR lands.
This update removes redundant cleanup code that did not affect how the software works. It keeps the codebase simpler and easier to maintain, with no expected change for end users.
Original PR description
Not sure who "innovated" that, but it's essentially a complicated no-op.
Miscellaneous changes
This pull request is marked as work in progress and only shows a generic test file change, so there is no clear business-facing product change yet. It appears to be a minor internal or placeholder update with no expected impact on day-to-day Odoo usage.
NB: both commits must be updated in FW port for change in company root owner. [FIX] documents: ensure access after upload in Company Otherwise, documents are only accessible by superusers as the document is not shared with anyone and owned by OdooBot. [IMP] documents: improve backend UI Based on users feedback, * partial revert of 78b21e99 regarding the search panel. * Redirect uploads in Recent and All to My Drive. * Increase visibility of record parent folder. Note that this
Original PR description
NB: both commits must be updated in FW port for change in company root owner. [FIX] documents: ensure access after upload in Company Otherwise, documents are only accessible by superusers as the document is not shared with anyone and owned by OdooBot. [IMP] documents: improve backend UI Based on users feedback, * partial revert of 78b21e99 regarding the search panel. * Redirect uploads in Recent and All to My Drive. * Increase visibility of record parent folder. Note that this will only occur after the views are updated. Task-4485969 Forward-Port-Of: odoo/enterprise#77846 Forward-Port-Of: odoo/enterprise#77293
Purpose ======= Allow managing documents version like it was done in 17.4. We created a new action for it, that will open a dialog in which we can download and delete versions, but also upload new ones. Reorder the actions we can do when selecting documents. Add "Export" and "Insert In Spreadsheet" actions, for consistency with other views, those actions are available only in the list view. Task-4480340 Forward-Port-Of: odoo/enterprise#77899 Forward-Port-Of: odoo/enterprise#77327
Original PR description
Purpose ======= Allow managing documents version like it was done in 17.4. We created a new action for it, that will open a dialog in which we can download and delete versions, but also upload new ones. Reorder the actions we can do when selecting documents. Add "Export" and "Insert In Spreadsheet" actions, for consistency with other views, those actions are available only in the list view. Task-4480340 Forward-Port-Of: odoo/enterprise#77899 Forward-Port-Of: odoo/enterprise#77327
Steps ----- 1. Sign > 'Upload a PDF & Sign' 2. Choose a PDF with a large amount of pages (typically 40 pages should trigger the issue). 3. The PDF is not visible, the viewer is fully white. Cause ----- The `canvas` HTML element `#canvas_layer_0` used to display information related to radio buttons crashes if its height is too important because there are a lot of pages in the PDF. There's no issue with the PDF itself, when dragging a sign item over the document, the canvas is hidden and
Original PR description
Steps ----- 1. Sign > 'Upload a PDF & Sign' 2. Choose a PDF with a large amount of pages (typically 40 pages should trigger the issue). 3. The PDF is not visible, the viewer is fully white. Cause ----- The `canvas` HTML element `#canvas_layer_0` used to display information related to radio buttons crashes if its height is too important because there are a lot of pages in the PDF. There's no issue with the PDF itself, when dragging a sign item over the document, the canvas is hidden and the PDF appears correctly. The exact problematic value depends on browser and environment, see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas#maximum_canvas_size Solution ----- Use a maximum canvas size but keep the styling of the canvas element to cover all the PDF viewer. This means a scaling factor needs to be applied to the position of the sign items between which the lines are drawn. opw-4407698 Forward-Port-Of: odoo/enterprise#75765
Steps to reproduce the bug: - Log in as Mitchel Admin. - Create a storable product with BoM: - Operation: OP1 - Create a Manufacturing order to produce one unit of P1 - Confirm the MO - Assign Mark demo to the OP1 - Validate the MO Problem: The work center productivity record is created using the employee linked to the current user rather than the one assigned to the operation. opw-4416940 Forward-Port-Of: odoo/enterprise#77296 Forward-Port-Of: odoo/enterprise#75900
Original PR description
Steps to reproduce the bug:
- Log in as Mitchel Admin.
- Create a storable product with BoM:
- Operation: OP1
- Create a Manufacturing order to produce one unit of P1
- Confirm the MO
- Assign Mark demo to the OP1
- Validate the MO
Problem:
The work center productivity record is created using the employee linked to the current user rather than the one assigned to the operation.
opw-4416940
Forward-Port-Of: odoo/enterprise#77296
Forward-Port-Of: odoo/enterprise#75900This commit ensures that the websocket connection is established when receiving a connect or initialized event. This can happen in multitab use of Odoo. Forward-Port-Of: odoo/enterprise#77619 Forward-Port-Of: odoo/enterprise#77416
Original PR description
This commit ensures that the websocket connection is established when receiving a connect or initialized event. This can happen in multitab use of Odoo. Forward-Port-Of: odoo/enterprise#77619 Forward-Port-Of: odoo/enterprise#77416
When you had tax closing entries that depended on a main closing entry, the posting of that main entry would log a message on each depending entry containing a link to the main closing entry. In [this commit] the way that message is constructed was changed, making it safer but also causing the link HTML to be escaped. It would just show raw HTML in the logged message instead of a link. This commit constructs the message in a correct and safe way so the link works again in the logged messag
Original PR description
When you had tax closing entries that depended on a main closing entry, the posting of that main entry would log a message on each depending entry containing a link to the main closing entry. In [this commit] the way that message is constructed was changed, making it safer but also causing the link HTML to be escaped. It would just show raw HTML in the logged message instead of a link. This commit constructs the message in a correct and safe way so the link works again in the logged message. [this commit]: https://github.com/odoo/enterprise/commit/09f5b35493bee7b63e96e8b28ad741aeb5ee80e5 Forward-Port-Of: odoo/enterprise#77826
When changes are made through studio, the view needs to be normalized first which in turn requires the use of `difflib.ndiff` that is notorious for slowness in some cases. Refer to this issue on `difflib` https://github.com/python/cpython/issues/119105 for an analysis of why it is slow. In our case, we only care about added and removed lines, not replaced lines, which means `ndiff` is not needed. Instead `unified_diff` is used which is much faster. This PR adapts the module to use `difflib.un
Original PR description
When changes are made through studio, the view needs to be normalized first which in turn requires the use of `difflib.ndiff` that is notorious for slowness in some cases. Refer to this issue on `difflib` https://github.com/python/cpython/issues/119105 for an analysis of why it is slow. In our case, we only care about added and removed lines, not replaced lines, which means `ndiff` is not needed. Instead `unified_diff` is used which is much faster. This PR adapts the module to use `difflib.unified_diff` over `difflib.ndiff` to speedup `edit_view` requests when making any modifications to the view. |no. diff lines|before | after| ------------------|-----------|------------ |~4670 | ~1.4 minutes | ~2.5 sec| opw-4054294 Original PR: https://github.com/odoo/enterprise/pull/67203 Forward-Port-Of: odoo/enterprise#77688
version: - 18.0 Steps to reproduce: - Install the Project and Sign modules. - Open a project. - Click on the "Signature Request" action. - Select a document and click "Sign Now." - Complete the signing process. - Click the "Back to Project" button. Issue: - Clicking "Back to Project" opens a new wizard instead of returning to the project view. Cause: - The project view is set to always open in a new target. Solution: - Update the target to "current" to ensure the button red
Original PR description
version: - 18.0 Steps to reproduce: - Install the Project and Sign modules. - Open a project. - Click on the "Signature Request" action. - Select a document and click "Sign Now." - Complete the signing process. - Click the "Back to Project" button. Issue: - Clicking "Back to Project" opens a new wizard instead of returning to the project view. Cause: - The project view is set to always open in a new target. Solution: - Update the target to "current" to ensure the button redirects correctly to the project view. task:4431882 Forward-Port-Of: odoo/enterprise#76321
Steps to reproduce: 1. Install l10n_mx on runbot and go to MX company 2. Set rates for Day 1 (19.839 MXN/USD) and Day 2 (19.9338 MXN/USD) 3. Create an invoice with date Day 1 for 23,664 USD 4. Add a payment for 9 USD on Day 1 5. Create a bank transaction for a large MXN amount (let's say 600,000) on Day 2 6. Click "Match" for this transaction 7. In reconciliation widget, select invoice created before 8. Change amount in currency reconciled from invoice to 6,954.76 USD (amount in MXN shou
Original PR description
Steps to reproduce: 1. Install l10n_mx on runbot and go to MX company 2. Set rates for Day 1 (19.839 MXN/USD) and Day 2 (19.9338 MXN/USD) 3. Create an invoice with date Day 1 for 23,664 USD 4. Add a…
Steps to reproduce: 1. Install l10n_mx on runbot and go to MX company 2. Set rates for Day 1 (19.839 MXN/USD) and Day 2 (19.9338 MXN/USD) 3. Create an invoice with date Day 1 for 23,664 USD 4. Add a payment for 9 USD on Day 1 5. Create a bank transaction for a large MXN amount (let's say 600,000) on Day 2 6. Click "Match" for this transaction 7. In reconciliation widget, select invoice created before 8. Change amount in currency reconciled from invoice to 6,954.76 USD (amount in MXN should update to 137,975.49) 9. Validate the reconciliation 10. Go to the journal items and show items from journal entry linked to invoice > check partial reconciliation. The reconciled item has a residual of -0.01 and not 0. Analysis: During reconciliation, the rate used is always that of the invoice, not the rate of the invoice residuals. https://github.com/odoo/odoo/blob/4e724323d811dec76c186b5cfff6e4b0135b2128/addons/account/models/account_move_line.py#L1874 However, in the bank reconciliation widget, the residuals' rate was being used to compute the company currency balance of the new AML to create. This led to a different amount than the amount that can actually be reconciled. See [this google sheet](https://docs.google.com/spreadsheets/d/1IoKfuOmSeBS9MrU_DkH_73PGtJd7tb73KuAKm5QsrqI/edit?usp=sharing) for analysis Solution: Use the invoice rate in the bank reconciliation widget. opw-4222310 Forward-Port-Of: odoo/enterprise#77780 Forward-Port-Of: odoo/enterprise#76935
Missing indexes: - `whatsapp.message.parent_id` is hit during Fkey lookup during unlinking to set the value to null during `whatsapp.message`'s GC. - `marketing.trace.whatsapp_message_id` is the inverse of the One2many `marketing_trace_ids`, index will be hit when the ORM reads the O2m field. `marketing_trace` is usually a large table, a `Seq.Scan` should be avoided. Would also be hit during whatsapp's GC Forward-Port-Of: odoo/enterprise#77907
Original PR description
Missing indexes: - `whatsapp.message.parent_id` is hit during Fkey lookup during unlinking to set the value to null during `whatsapp.message`'s GC. - `marketing.trace.whatsapp_message_id` is the inverse of the One2many `marketing_trace_ids`, index will be hit when the ORM reads the O2m field. `marketing_trace` is usually a large table, a `Seq.Scan` should be avoided. Would also be hit during whatsapp's GC Forward-Port-Of: odoo/enterprise#77907
Fix traceback when changing the date in the find duplicate tool When the user changes the date in the find duplicate tool, a traceback occurs when transitioning from no rows displayed to rows being displayed. This issue is caused by the `getRowClass` function referencing the outdated `firstIdsInGroup` field, which is never updated. If there were no values initially, the function attempts to call `includes` on a `false` value, resulting in the error. This commit resolves the issue by rem
Original PR description
Fix traceback when changing the date in the find duplicate tool When the user changes the date in the find duplicate tool, a traceback occurs when transitioning from no rows displayed to rows being displayed. This issue is caused by the `getRowClass` function referencing the outdated `firstIdsInGroup` field, which is never updated. If there were no values initially, the function attempts to call `includes` on a `false` value, resulting in the error. This commit resolves the issue by removing the obsolete `firstIdsInGroup` field and adding a condition to ensure that the value being checked is an array, preventing any traceback. no task id Forward-Port-Of: odoo/enterprise#77856
Steps to reproduce: 1. In the Odoo home menu, switch to the mobile view 2. Don't refresh the page 3. Click on the document app 4. Traceback occurs Technical Reason: without refreshing the template was not updating according to mobile view and in 'documents.SearchPanel' was replacing 'we.SeachPanel.Small' with 'web.SearchPanel.Section' and 'we.SeachPanel.Small' is only called if 'env.isSmall'. After this commit: No traceback will occur while opening the document app in mobile view.
Original PR description
Steps to reproduce: 1. In the Odoo home menu, switch to the mobile view 2. Don't refresh the page 3. Click on the document app 4. Traceback occurs Technical Reason: without refreshing the template was not updating according to mobile view and in 'documents.SearchPanel' was replacing 'we.SeachPanel.Small' with 'web.SearchPanel.Section' and 'we.SeachPanel.Small' is only called if 'env.isSmall'. After this commit: No traceback will occur while opening the document app in mobile view. Task-4437768 Forward-Port-Of: odoo/enterprise#76355
Before this commit, the quantity invoiced in _prepare_invoice_line would be compted based on the result of _get_subscription_qty_invoiced for a future period. For product invoiced based on ordered quantity, it makes no sense as the quantity is the ordered quantity. This commit split the logic to reuse code when we need to know which quantity must be invoiced or which quantity have been invoiced in the past. Forward-Port-Of: odoo/enterprise#75150
Original PR description
Before this commit, the quantity invoiced in _prepare_invoice_line would be compted based on the result of _get_subscription_qty_invoiced for a future period. For product invoiced based on ordered quantity, it makes no sense as the quantity is the ordered quantity. This commit split the logic to reuse code when we need to know which quantity must be invoiced or which quantity have been invoiced in the past. Forward-Port-Of: odoo/enterprise#75150
### Issue: - when a user uploads a document to the Documents app, and grants only view access to that document to other internal users (default behavior). - if another user uploads the same document (same checksum) as a sign template in the Sign app. attempting to send it, gives an access error. ### Steps to reproduce: 1. Upload a document to Documents app with a user (ie. Mitchell Admin). 2. by default, the document is uploaded with view access to all internal users. 3. login as another
Original PR description
### Issue: - when a user uploads a document to the Documents app, and grants only view access to that document to other internal users (default behavior). - if another user uploads the same document…
### Issue: - when a user uploads a document to the Documents app, and grants only view access to that document to other internal users (default behavior). - if another user uploads the same document (same checksum) as a sign template in the Sign app. attempting to send it, gives an access error. ### Steps to reproduce: 1. Upload a document to Documents app with a user (ie. Mitchell Admin). 2. by default, the document is uploaded with view access to all internal users. 3. login as another internal user (ie. Mark Demo) and upload the same document as a sign template in the Sign app. 4. set the template's `signed document folder` to the same folder as the document uploaded by Mitchell Admin. 5. attempt to send the document for signing. 6. an access error is raised. ### Solution: - Prior to the fix, the `create` method, relied solely on matching the `checksum` of the `sign_requets` attachment with existing documents which resulted in documents not related to the sign request being set as the `reference document`. - The fix now gets the correct document by searching for documents with the same `attachment_id` as the sign request's template attachment. OPW-4421368 Forward-Port-Of: odoo/enterprise#77520
Having no manual sequence on report lines/columns might be problematic in case of DB upgrade, if the line order changed in the xml files, as the report won't adapt and update the sequence field. Setting auto_sequence will ensure that this won't ever be a problem anymore (and avoid the tedious task of manually setting the sequence on each line/column) Forward-Port-Of: odoo/enterprise#77487
Original PR description
Having no manual sequence on report lines/columns might be problematic in case of DB upgrade, if the line order changed in the xml files, as the report won't adapt and update the sequence field. Setting auto_sequence will ensure that this won't ever be a problem anymore (and avoid the tedious task of manually setting the sequence on each line/column) Forward-Port-Of: odoo/enterprise#77487
Issue: ========== A traceback occurs when validating the quantity produced through the Barcode app, causing the process to fail. Steps to Reproduce: ======================= 1. Create a new database and install the Manufacturing module. 2. Create and confirm a manufacturing order (MO) from the backend. 3. Open the Barcode app, access the MO, edit the quantity produced, and validate. With this commit: ==================== Prevent error when lot_producing_id is undefined during f
Original PR description
Issue: ========== A traceback occurs when validating the quantity produced through the Barcode app, causing the process to fail. Steps to Reproduce: ======================= 1. Create a new database and install the Manufacturing module. 2. Create and confirm a manufacturing order (MO) from the backend. 3. Open the Barcode app, access the MO, edit the quantity produced, and validate. With this commit: ==================== Prevent error when lot_producing_id is undefined during form save and allow smooth validation of produced quantities. task-4443489 Forward-Port-Of: odoo/enterprise#77806 Forward-Port-Of: odoo/enterprise#76426
How to reproduce ================ - Have no batch for receipt at least one delivery batch; - Go to the Barcode app > Operations > Receipts; - On the Batches button, you can see a wrong count number, this number takes in account all batches regardless their picking type. Cause of the issue ================== For the batches, the picking type wasn't used by the `search_count` in the method responsible of this count (`get_model_records_count`.) Forward-Port-Of: odoo/enterprise#77736
Original PR description
How to reproduce ================ - Have no batch for receipt at least one delivery batch; - Go to the Barcode app > Operations > Receipts; - On the Batches button, you can see a wrong count number, this number takes in account all batches regardless their picking type. Cause of the issue ================== For the batches, the picking type wasn't used by the `search_count` in the method responsible of this count (`get_model_records_count`.) Forward-Port-Of: odoo/enterprise#77736
This PR adds non regression tests for the integration of monster in hr_recruitment. These tests also cover at the same time the code of the hr_recruitment_integration_base module. The PR also fixes a bug in the hr_recruitment_integration_base module which was found thanks to the tests. The bugfix is about fixing variable names in the _start_new_campaign to match the fields of the module. task-4199469 Forward-Port-Of: odoo/enterprise#77491 Forward-Port-Of: odoo/enterprise#77152
Original PR description
This PR adds non regression tests for the integration of monster in hr_recruitment. These tests also cover at the same time the code of the hr_recruitment_integration_base module. The PR also fixes a bug in the hr_recruitment_integration_base module which was found thanks to the tests. The bugfix is about fixing variable names in the _start_new_campaign to match the fields of the module. task-4199469 Forward-Port-Of: odoo/enterprise#77491 Forward-Port-Of: odoo/enterprise#77152
Steps to reproduce: - Open Expenses. - Upload a sample expense pdf. The blue ribbon shows up saying “” - Do not click on the refresh button. Instead, put in some value for the amount and submit and approve the expense. - Go back to the expenses list view Issue: Notice this expense is at the top of the list and grayed out Cause: The order is determined by the extract_state_processed field: https://github.com/odoo/enterprise/blob/ba06e216ab73c73e3a67fd917623c6ad357b869f/hr_expense_ext
Original PR description
Steps to reproduce: - Open Expenses. - Upload a sample expense pdf. The blue ribbon shows up saying “” - Do not click on the refresh button. Instead, put in some value for the amount and submit and…
Steps to reproduce: - Open Expenses. - Upload a sample expense pdf. The blue ribbon shows up saying “” - Do not click on the refresh button. Instead, put in some value for the amount and submit and approve the expense. - Go back to the expenses list view Issue: Notice this expense is at the top of the list and grayed out Cause: The order is determined by the extract_state_processed field: https://github.com/odoo/enterprise/blob/ba06e216ab73c73e3a67fd917623c6ad357b869f/hr_expense_extract/models/hr_expense.py#L21 An expense is muted when this field is set to `True`: https://github.com/odoo/enterprise/blob/1df090289f3c45c200d133734989a6d9a8073145/hr_recruitment_extract/views/hr_applicant_views.xml#L67 Solution: We override `iap_extract` method https://github.com/odoo/enterprise/blob/2e3113562309bf4d440e12ab09eaf94d0b302f1f/iap_extract/models/extract_mixin.py#L69 If the expense is not in draft, it indicates that the process continued without waiting for the extraction process to complete (values were manually entered). To ensure a consistent extraction state, we extend the "Check OCR Status" logic to prevent an infinite waiting_extraction status. opw-4239404 Forward-Port-Of: odoo/enterprise#76015 Forward-Port-Of: odoo/enterprise#75202
### Steps to reproduce: - In Accounting, create a new Customer invoice - Create a payment for this invoice - In Customer > Batch Payments create a new batch payment - Select the payment you created - In the Dashboard click on the three dots of the "Bank" block and click on transactions - Create a new transaction with the same amount as the invoice - Click "Match" on the right - In the "Batch Payments" tab select the Batch payment previously created - Validate - Back in the Dashboard, c
Original PR description
### Steps to reproduce: - In Accounting, create a new Customer invoice - Create a payment for this invoice - In Customer > Batch Payments create a new batch payment - Select the payment you created - In the Dashboard click on the three dots of the "Bank" block and click on transactions - Create a new transaction with the same amount as the invoice - Click "Match" on the right - In the "Batch Payments" tab select the Batch payment previously created - Validate - Back in the Dashboard, click on the reconcile button of the Bank block - In the "Batch Payments" tab the batch payment is still here even if it is reconciled ### Cause: There are no domain to filter the batch payments. ### Solution: Add a domain to check the state of the batch payments, do not display if it is "reconciled". opw-4461341 Forward-Port-Of: odoo/enterprise#77017