Daily updates from Odoo
Wednesday, October 23, 2024
34 changes
2 changes
Resolved issues and error corrections
Branch companies can now see and apply discount and loyalty programs defined by their parent company. This fixes blocked coupon use on branch sales orders and helps companies manage promotions centrally across branches.
Original PR description
Problem: When a user is on a branch, they are unable to view the parent company's discounts and are unable to apply it to the sales orders. Purpose: The branch should have access to the discounts & loyalty programs from the parent company. Steps to Reproduce on Runbot: 1. Install sale_loyalty 2. Create a branch 3. On the branch company, observe that no discounts & loyalty programs from the parennt company are displayed 4. Attempt to apply a coupon code from a discount belonging to the parent company on a sales order and receive a ValidationError opw-4079487 closes odoo/odoo#182392 X-original-commit: 85d130302e88deb4ee8d1172d847d7ab78918418 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update prevents tests from depending on website-specific data when Appointment is used on its own. It helps keep automated checks reliable for customers or deployments that do not install the Website app.
Original PR description
When running Appointment as single app, we have to make sure that test does not use any external models like 'website.menu'. fixes runbot build error [73105](https://runbot.odoo.com/web#id=73105&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
24 changes
Resolved issues and error corrections
This fix restores shared sales logic needed when re-invoicing expenses without the Project app installed. It prevents errors in expense posting flows where costs, such as mileage, are billed back to customers through sales orders.
Original PR description
This fixes issues that arose since 238a41e3 By moving the `_prepare_analytic_account_data` method from sale to sale_project, any call to this method in sale_expense would break as sale_expense doesn't depend on project. Because this method is crucial in the re-invoicing flows we need it in sale. Steps to reproduce: - Install sale_expense without project - Run the sale_expense tests or test the flow manually (create an expense with mileage as a product, add a sale order to reinvoice it on and move forward to post the expense sheet) - _prepare_analytic_account_data is missing --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change restores the previous behavior for required selection fields so users are not shown a first option that appears selected but is not actually saved. It prevents confusion and data entry mistakes in forms that rely on required dropdown choices.
Original PR description
This reverts commit eec86a3fda555f3939d6773f4c79ca6b3636228a. This commit introduced an unexpected behaviour where the field seems to select by default the first choice but has no value.
This fixes a display issue where mobile guests joining a public channel saw a broken placeholder instead of the Add a Reaction icon. The reaction button now appears correctly, improving the chat experience for invited public users.
Original PR description
Current behavior before PR: On mobile, when a guest joined a public channel via an invitation URL, the `Add a Reaction` icon appeared as `[]` instead of the `oi-smile-add` icon. This was due to Font Awesome loading after `odoo_ui_icons`, causing a conflict with the `fa` class. Before / After  Desired behavior after PR is merged: This PR fixes the issue, and now the `Add a Reaction` icon displays correctly. Related enterprise: [enterprise/ #72507](https://github.com/odoo/enterprise/pull/72507) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
When a sales order with a project-generating service is duplicated, the existing project and related analytic allocation are no longer copied to the new order. This prevents confusion and ensures the correct project is created when the duplicated order is confirmed.
Original PR description
Steps: Activate analytic accounting. Create a SO with a service that creates a project. Confirm. The project that has just been created is now set on the SO. Duplicate. Issue: The project is duplicated too. Yet is doesn't correspond to the the one that will be created upon confirmation. Solution: Simply not duplicated the project upon SO duplication. task-4207182 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users can now change a company’s Chart of Accounts without being blocked by an unnecessary accounting permissions error. This prevents disruption when configuring invoicing for localized companies and keeps setup workflows moving smoothly.
Original PR description
Install account and a localization (i.e. l10n_ar)
Switch to Company "(AR) Exento"
Open Settings>Invoicing
Change current Chart of Account to something else
Save
Error will block the action
This operation is allowed for the following groups:
- Technical/Show Full Accounting Features
Contact your administrator to request access if necessary.
This occurs because the permissions necessary to write on the
AccountReconcileModelLine are loaded when installing module `accountant`
opw-4227071Invoices with early payment discounts remain eligible for the discount when a payment is registered and later matched in bank reconciliation. This ensures the reconciliation suggestion includes the expected discount write-off, reducing manual corrections for accounting users.
Original PR description
Steps to reproduce: - Create an invoice with early payment discount applicable - Register a payment on the invoice (must be without a journal entry associated, done by default) - Open the bank reconciliation widget - Create a statement line with the discounted amount (invoice total - epd amount) - The suggested reconciliation doesn't include a new line with the write-off of the early payment discount Cause of the issue: When registering a payment on the invoice, the invoice payment state switch from 'not_paid' to 'in_payment', which makes this invoice not eligible anymore for early payment discount. task-4237657 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Saved export templates now reload fields in the same order users originally chose, instead of sorting them by internal field names. This makes repeated exports more predictable and helps avoid confusion or manual reordering when using saved templates.
Original PR description
Issue When loading a template of fields to export, the list of fields is ordered by their technical name and not by their actual position in the list when the template was saved. Cause issue since e3647790830f95de932cb10c39a8232dd97e4221 The `ir.exports.line` are in order of their position in the list at creation in `export_fields`, however `fields_info` sorts the fields by their technical name and may not preserve order https://github.com/odoo/odoo/blob/e3647790830f95de932cb10c39a8232dd97e4221/addons/web/controllers/export.py#L409 opw-4241915
Cloud storage attachments now align with the updated mail upload behavior, preventing upload handling errors when files are stored externally. This helps keep attachment uploads reliable for Azure and Google cloud storage users.
Original PR description
Store now returns `ir.attachment` and not `Attachment` as model name. Note: post kwargs backed-ported fix at https://github.com/odoo/odoo/pull/184506 opw-4260378
This fix prevents a rare crash when Odoo records tax-related changes and the previous logged value is blank. It helps ensure invoice tax updates, including Brazil localization tax scenarios, complete without interrupting users.
Original PR description
In rare cases, the message logging code on account.tax can crash. To reproduce, apply https://github.com/odoo/odoo/pull/184390 and set up a new database with `-i l10n_br_edi,accountant` and then: 1/…
In rare cases, the message logging code on account.tax can crash. To reproduce, apply https://github.com/odoo/odoo/pull/184390 and set up a new database with `-i l10n_br_edi,accountant` and then:
1/ Create a new invoice
2/ Set customer "BR Company Customer Estimated Profit",
3/ Add line with “Regular Consumable Product”,
4/ Switch the fiscal position to Avatax Brazil,
5/ Compute Taxes,
6/ Add line with “Added Taxes Consumable Product”,
7/ Compute Taxes,
Traceback:
```
...
File ".../addons/account/models/account_tax.py", line 423, in _message_log
self._message_log_repartition_lines(tracked_value_id[2]['old_value_char'], tracked_value_id[2]['new_value_char'])
File ".../addons/account/models/account_tax.py", line 353, in _message_log_repartition_lines
old_line_values_dict = ast.literal_eval(old_values_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../odoo/_monkeypatches/literal_eval.py", line 28, in literal_eval
return orig_literal_eval(expr)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/ast.py", line 66, in literal_eval
node_or_string = parse(node_or_string.lstrip(" \t"), mode='eval')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/ast.py", line 52, in parse
return compile(source, filename, mode, flags,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<unknown>", line 0
SyntaxError: invalid syntax
```
Alternatively, the following shell code reproduces the issue as well on the same database:
```
from odoo import Command
br_company = env['res.company'].search([('name', '=', 'BR Company')])
active_tax = env['account.tax'].search([('name', '=', '3% COFINS')])
move = env['account.move'].with_company(br_company).create({
'move_type': 'out_invoice',
'invoice_line_ids': [
Command.create({
'price_unit': 100,
'tax_ids': [Command.set(active_tax.ids)],
})
],
})
inactive_tax = env['account.tax'].with_context(active_test=False).search([('name', '=', 'ICMS ST Excl.')])
inactive_tax.active = True
env['account.move.line'].with_company(br_company).create({
'move_id': move.id,
'price_unit': 100,
'tax_ids': [Command.set(inactive_tax.ids)],
})
env.cr.flush()
```
opw-4239515This update fixes an internal test setup issue so web JSON tests run correctly when optional demo data is not loaded. It helps keep automated quality checks reliable without changing the product experience for users.
Original PR description
Description of the issue/feature this PR addresses: Need to setup the user and enable the /json route when running tests with nodata because by default the route is not enabled. 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 Manufacturing app now uses the clearer label “Highlight Consumption” instead of “Manual Consumption” on bill of materials components. This prevents confusion for users configuring BOM component consumption settings.
Original PR description
To reproduce: - Create new BOM - In the components tab, enable the column manual consumption Current behavior: 'Manual Consumption' Expected behavior: 'Highlight Consumption' --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
A purchase order test was corrected to stop using a field that is not available on the purchase order form. This helps keep automated checks reliable and prevents false failures in the purchase workflow validation.
Original PR description
This commit addresses an issue caused by incorrect value assignment to the `incoterm_id` field, which is not present in the purchase order form view. Additionally, the field `incoterm_location` is added from the purchase_stock module, not the purchase module. error :- https://runbot.odoo.com/web#id=75128&view_type=form&model=runbot.build.error&menu_id=405&cids=1
Regular users can now leave a parent discussion that has sub-threads without hitting an access error. This prevents an unexpected crash in team conversations and keeps the leave action working consistently for non-admin users.
Original PR description
This commit fixes the following issue in the sub-thread behavior. Steps to reproduce: - Create a thread as non admin user and add another member - Create a sub-thread - Go to the parent thread and type `/leave` command - You see the access error
This fix updates several automated guided workflow checks so they correctly recognize pop-up windows during key business processes. It helps keep quality testing stable for manufacturing, inventory batch picking, sales product configuration, and main Odoo flows, reducing the risk of regressions reaching users.
Original PR description
In this commit, we fix few steps where .modal is missing. 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
Public channel invitations now open to the welcome page first on mobile devices instead of immediately showing the conversation thread. This gives invited users the intended onboarding experience before they enter the channel.
Original PR description
**Current behavior before PR:** Opening a public channel invitation on mobile showed the thread instead of the welcome page because ui.isSmall triggered the thread to open over it. Before / After <p> <img src="https://github.com/user-attachments/assets/4665efff-3732-4613-a04b-ac78105467d1" width="200px" /> <img src="https://github.com/user-attachments/assets/34225a7b-f07e-42f7-ac8e-f8fdf5f8b710" width="200px" /> </p> **Desired behavior after PR is merged:** This PR ensures that the welcome page is displayed first. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The payment confirmation action now only applies to payments that are still in draft. This prevents users from accidentally moving already paid payments back to an in-process status when confirming multiple selected payments.
Original PR description
This fixes issues that arose since 2609fc2 The confirm button (action_post) on the list view of payments allows to move the payment state one step back from `paid` to `in_process` We now only consider payment in draft when doing so, to keep all other payments mistakenly selected intact 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
This fixes a display issue where mobile guests joining a public channel saw an empty placeholder instead of the Add a Reaction icon. The change improves the chat experience by making the reaction action clear and usable for invited guests.
Original PR description
Current behavior before PR: On mobile, when a guest joined a public channel via an invitation URL, the `Add a Reaction` icon appeared as `[]` instead of the `oi-smile-add` icon. This was due to Font Awesome loading after `odoo_ui_icons`, causing a conflict with the `fa` class. Before / After  Desired behavior after PR is merged: This PR fixes the issue, and now the `Add a Reaction` icon displays correctly. Related : [odoo/ #184552](https://github.com/odoo/odoo/pull/184552)
The Timesheets grid view now returns users to their previous scroll position after they switch away and back. This prevents unnecessary scrolling and makes navigation consistent with other views.
Original PR description
Steps to Reproduce: - Open All Timesheets in Timesheets app. - Scroll down in the grid view - Change view using view switcher Issue: - You can see that grid view starts at the top. - It is not the case in other views. Fix: - Adding root reference in useSetupAction Reason: - When a root reference is added it scrolls down the page to its previous state. task-4010043
This fixes an automated barcode test that could fail unpredictably when several serial numbers were scanned too quickly. The change makes the test process those scans in the correct order, improving confidence in stock barcode validation without changing user-facing behavior.
Original PR description
In the `test_serial_product_packaging` tour, we scan 4 different serial numbers without waiting which can cause race condition (in case a scanned SN is finished to be processed before the previous scanned SN.) To fix that, two solutions: - Update each trigger to wait the result of previous scan; - Scan all SN as one single barcode, which force them to be processed in the right order. Second option is used by this commit since it's simplier. runbuild error: 99539
Accounting reports now open correctly even when a company has no journals available. In that case, the journal filter clearly shows "No Journal" and cannot be clicked, preventing confusion and interruptions.
Original PR description
We we tried to open the report with a company without journal and that the report had journal filter set, it would crash. The goal is to set the label of the filter explicitely to "No Journal" and make the filter unclickable when this is the case. task-4267503
The helpdesk portal timesheet table now hides the task column when entries are grouped by task or helpdesk ticket. This prevents mismatched columns and makes grouped timesheet views easier for customers and support teams to read.
Original PR description
### Before this PR: - The task column data was visible even when timesheets were grouped by task_id or helpdesk_ticket_id. - This caused misalignment in the table when grouped by these fields. ### After this PR: - The task column is hidden when timesheets are grouped by task_id or helpdesk_ticket_id. - The table headers is now correctly aligned. task-4184455
The shop floor now shows the 'Install App' button only when choosing which work centers appear in the view. This avoids confusing operators with an unrelated option when they are simply moving a work order to another work center.
Original PR description
To reproduce: - Open shop floor - Go to Assembly 1 and click on the gear icon on a work order card - Select Move to work center Current behavior: The 'Install App' button is displayed. Expected behavior: The 'Install App' button is only displayed when selecting the workcenters that should be shown in the view, not when moving a work order to another workcenter.
Fixed an issue that caused the appointment table preview to crash when users selected the number of people while timezone display was disabled. This keeps the booking flow usable and prevents an unexpected error in the appointment demo and related scheduling pages.
Original PR description
**How to reproduce:** - Go to 'Table' demo data - Select Number of people **Technical reason:** When the 'show timezone' is turned off, code is accessing the value of an undefined element, resulting in a traceback. Introduced by: https://github.com/odoo/enterprise/commit/9e38975d3f1e9dc87a3061c06ce9df7cf562949c **After this commit:** The traceback will be resolved. Task-4269449
The manufacturing screen in the barcode app now shows production order cards in a cleaner layout. Quantities appear under the finished product name, making orders easier to read for warehouse and manufacturing users.
Original PR description
To reproduce: - Create MO for 10 units of drawer - Open barcode app - Go to operations > manufacturing Current behavior: Strange layout of the MO card. Expected behavior: Proper layout with qty under the name of the final product.
8 changes
Resolved issues and error corrections
This update ensures that the country setting is correctly applied within account reporting filters. Previously, a constraint was added that required the country ID to be set when using the 'country' availability condition. This change prioritizes setting the country before the availability condition, ensuring accurate reporting results.
Original PR description
In odoo/odoo#182509, a constraint on the availability_condition was added, where if availability_condition is set to country, the country_id should be set. Therefore, in tests where the availability condition is set to country, the country should be set before. task-4160643
This update fixes an issue where a distracting notification appeared when adding tags to the sign document. It also addressed a problem with the field size increasing with multiple tags, now maintaining a consistent size. This enhancement provides a cleaner and more user-friendly experience for signing documents.
Original PR description
**Version:** - 17.0 **Current Behaviour:** - Whenever tags were added to the document, the saved notification would appear, which looked odd. - Adding multiple tags caused the field size to increase, which was inappropriate. **Updated Behaviour:** - The saved notification will only appear when exiting the document. - A CSS class has been added to maintain a fixed size when adding multiple tags. task-4164151
This update fixes a confusing error message related to timesheet lock dates. Previously, the message used a fixed date format, causing confusion for users with different language settings. Now, the message dynamically adapts to the user's preferred date format, ensuring clarity and consistency.
Original PR description
Before this commit: The lock date error message was hard-coded to the MM/DD/YYYY format, regardless of the user's language, which causing inconsistency and confusion in date format. After this commit: The lock date error message now dynamically follows the date format set to the user's language, which improve consistency and reduce confusion. task-3925185 Forward-Port-Of: odoo/enterprise#70405
This update resolves an issue where users would receive a technical error instead of a clear message when creating a Sendcloud shipment without selecting a pickup point. The fix ensures a user-friendly error message is displayed, guiding users to select a pickup location for their shipment.
Original PR description
### Steps to reproduce: - Create and configure a Sendcloud shipping method - Create a Contact Bob - Create a subconcat of type delivery for Bob without setting any name > by default its display name…
### Steps to reproduce: - Create and configure a Sendcloud shipping method - Create a Contact Bob - Create a subconcat of type delivery for Bob without setting any name > by default its display name will be "Bob, delivery address" - Create a sale order for Bob - Add a Sendcloud shipment method to that SO and confirm the SO - Go on the associated delivery and try to validate it ### Expected behavior: You should raise a user error telling you that you a pickup point was required for the selected shipping method. ### Current behavior: You raise a traceback prior to that point. ### Cause of the issue: Since you did not set a name on your delivery partner the code will break as soon as you try to generate the parcels data because "False" is not iterable, see: https://github.com/odoo/enterprise/blob/37577535a4482eaa1250b41136b47b3613eb7693/delivery_sendcloud/models/sendcloud_service.py#L576-L577 ### Fix: If for some reason the name of the delivery partner has been removed or was unset (e.g. display name is of the form: Bob, Delivery address), the name of its parent should be used to generate the parcel data. Note: This fix should normally not be that relevant, because, if you were to select a pickup point, the partner used to generate the parcel would already be the parent partner and is guarranteed to have a name: https://github.com/odoo/enterprise/blob/37577535a4482eaa1250b41136b47b3613eb7693/delivery_sendcloud/models/sendcloud_service.py#L556-L561already However, now, if you proceed with this flow without any pickup point (which you can only select form the website) you will now raise a relevant user error: #### Invalid Operation: "A service point is required for the selected shipping method" opw-4118362
This update significantly speeds up the process of retrieving related documents for large projects. By using a more efficient database query, the system now processes document lookups 2.45 times faster, particularly when dealing with projects containing a massive number of tasks. This improves overall performance and responsiveness.
Original PR description
## Description When looking for related documents on a large projects, it can inline a large list of ids (`task_ids`) into the following `_read_group` to retrieve the documents associated with any of the project's tasks. The improvement consists of using a subquery instead of a list of ids when the list `task_ids` becomes "too large". We are using `PREFETCH_MAX` for the "too large" threshold. ## Benchmark The `_read_group` to fetch the related documents on 5 projects, one of which has over 1M tasks. | | Before | After | Speed-up | |---------------|--------|-------|----------| | Timings (hot) | 2.85s | 1.16s | 2.45x | Forward-Port-Of: odoo/enterprise#72468
This update resolves an issue where location scans weren't being properly recognized during internal transfers when a product was manually added instead of scanned. The fix ensures that the system correctly identifies and utilizes the scanned location, improving the accuracy of internal transfer processes. This enhancement streamlines operations and reduces potential errors.
Original PR description
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Add a barcode to a different location that WH/Stock - Go to the barcode > Operations > Internal Transfers > New > The header…
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Add a barcode to a different location that WH/Stock - Go to the barcode > Operations > Internal Transfers > New > The header propose to scan a product - Do not scan the product by click on `+ ADD PRODUCT` - Add 1 unit of your favorite product > The header propose to scan a product or a destination location - Scan the location you had set #### > The location scan is ignored ### Cause of the issue: During the `_parseBracode` called to determine what was scanned by the barcode, a location corresponding to the barcode scanned will be found. To use this barcode, if it makes sense, the `_setLocationFromBcode` will be called in turn. However, during internal transfers, this location will only be used as a destination location under very specific conditions: https://github.com/odoo/enterprise/blob/8035abddf9991f6bfb71bb7889b703e5ed31a179/stock_barcode/static/src/models/barcode_picking_model.js#L1603-L1619 And, since we did add the product manually rather than using a scan, in our case, `this.previousScannedLines.lengt` will be null rather than positive so that the location will not be used to set the destination. opw-4201489
This update enhances the account synchronization process by allowing users to reauthorize only the specific accounts needed for their journals. Previously, the system incorrectly triggered full reauthorizations, leading to inefficiencies. This fix ensures accurate and streamlined transaction updates.
Original PR description
We solve 2 issues: The first is that we want the user to be able to only reauthorize the actual account that he needs for the journal (and not all of them). The second is that the automatic redirection to reauthorize wasn't working due to the way Odoofin sends the infos. Now, it's sent in the result. task-4216399
This update corrects typographical mistakes found in the planning module, specifically fixing errors in field labels and text strings related to task assignments. These corrections improve the accuracy and professionalism of the user interface.
Original PR description
**Before this commit:** The `date_assign` field string contained a minor typographical error in the `project.task` **Group By**. **After this commit:** The typographical error in the 'Group by' has been corrected. Additional issues related to 'assignment' in the codebase were also addressed by fixing the `date_assign` field string. community: https://github.com/odoo/odoo/pull/183760