Daily updates from Odoo
Tuesday, February 13, 2024
50 changes · 17.0
Enhancements to existing features
The Gantt view progress bars now display time durations more accurately and clearly. Previously, partial hours were rounded (showing '4h' instead of '4h30'), and the format included spaces ('4 h / 38 h'). This update shows exact durations and uses a cleaner format ('4h30 / 38h'), making it easier for users to understand task progress and time allocations at a glance.
Original PR description
* = hr_attendance_gantt, planning, mrp_workorder, project_enterprise, web_gantt backport of this PR : https://github.com/odoo/enterprise/commit/46a85677e6d5dad434271280a5afd97d0b2034c8 In this commit, we enhanced the Gantt view progress bar by modifying the display format. Previously, when the hours were not rounded, it would show as '4h' instead of '4h30'. We have now updated it to accurately represent the exact duration. Additionally, we changed the format from '4 h / 38 h' to '4h / 38h' for improved clarity. task: 3695852
This update fixes a test in the subscription module that was failing when run at midnight due to timing-related issues. The improvement ensures the test runs reliably at any time of day, making the system more stable and reducing false test failures.
Original PR description
runbot task: 55516 Forward-Port-Of: odoo/enterprise#55732
This update improves the performance of account report queries by simplifying how the system retrieves related record IDs. Previously, the system was using inefficient database queries to fetch IDs from related tables. Now it retrieves them directly from the main table when safe to do so, resulting in faster report generation and reduced database load.
Original PR description
## Description
Domains of the form
```python
[('stored_Many2X.id', '=/!=/in/not in', list_of_ids)]
```
will force the ORM to generate a sub-`SELECT` (or `LEFT JOIN` in case of `auto_join=True`), which is inefficient, as the `id` can be retrieved directly from the current `model` table, instead of going to fetch it from the `PKey` of the `comodel` table.
There is just one *important* detail - in the sub-select, the `ir.rule` of the `comodel` is applied, which is not the case when directly referencing the `field` from the `model`. So in some cases using an explicit `.id` would be a wanted, if the intention was to apply the `ir.rule`.
## Fix
Remove the `.id` from left leafs of domains that if the field is stored, and the `comodel` doesn't have `ir.rule` associated with it, or the `ir.rule` application is redundant/not needed.
task-3735923
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update allows businesses to customize which product is used when applying discounts to sales orders. Previously, the discount product was fixed, but now developers can override it to match specific business needs. This provides greater flexibility for companies with unique discount product requirements.
Original PR description
Add method '_get_discount_product' to allow to override the product used by the sale_order_discount wizard.
This update improves the performance of price calculations in the product module by eliminating unnecessary database searches when no pricelist is being used. The change also ensures that internal system settings used during price lookups don't inadvertently affect other parts of the system, making the pricing logic more reliable and efficient.
Original PR description
Rules always have a pricelist, so we can avoid an useless database query when we are computing the prices without any pricelist. Also makes sure that the modified context used for the pricelist items search is not propagated by enforcing the same context in the returned rules. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The project task list view now loads significantly faster when displaying large lists of tasks. Previously, the system was recalculating which tasks were selected for every single cell in the table, causing slowdowns of about 1 second for just 80 records. This fix calculates the selection once for the entire table, dramatically improving performance.
Original PR description
Before this commit, the project task list view computed the list of selected records once for each cell, when rendering the list. As a consequence, this slowed down a lot the rendering on large tables (~1s for 80 records). With this commit, we compute the selection only once to render the whole table. 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 update improves the code comments in the web editor's image processing method to better explain how image customization works. The change clarifies technical limitations around customizing images added via URLs, helping developers understand the system's behavior and constraints.
Original PR description
The goal of this commit is to impove the comment in the `loadImageInfo` method. Forward-Port-Of: odoo/odoo#153554 Forward-Port-Of: odoo/odoo#153438
Resolved issues and error corrections
This update corrects how GST composition treatments are classified in Indian tax reporting modules. The composition GST treatment was incorrectly categorized under business-to-consumer (B2C) rules and has been moved to the correct business-to-business (B2B) classification. Additionally, UIN Holder treatment has been made consistent across all Indian reporting modules, ensuring accurate tax compliance reporting.
Original PR description
Before this commit: GST treatment for composition was under the domain of b2c* which is not the correct domain for composition UIN Holder treatment was inconsistently placed After this commit: composition GST treatment is fixed correctly under b2b and fixed the consistency for UIN Holder in l10n_in_reports* Forward-Port-Of: odoo/enterprise#56225
This fix ensures that follow-up reports now attach the actual previously-printed invoice PDFs instead of regenerating them from templates. This is important because invoice PDFs can be modified during printing (such as adding QR codes in Switzerland), and these modifications were not appearing in follow-up reports. Additionally, manually-added PDF files are now properly included in the generated follow-up report.
Original PR description
Consider the case that we attach invoices to the followup. We only attach invoices that have previously been printed / generated. (Except if someone attaches a custom file which could be whatever.)…
Consider the case that we attach invoices to the followup. We only attach invoices that have previously been printed / generated. (Except if someone attaches a custom file which could be whatever.)
Currently:
1. During the generation of the followup report we basically just regenerate the invoices by calling the invoice template.
2. The PDFs that are added in the manual followup wizzard are not added to the generated PDF.
Problem: (Reproduce at the bottom)
Point (1.) is a problem in case the template does not reflect the actual printed invoice. This can happen since the PDF output may also be altered during render time (by overwriting '_render_qweb_pdf_prepare_streams'). This is i.e. a problem for l10n_ch. There, a QR code is appended to the invoice PDF only during render time. This QR code does not appear in the followup report since it is not part of the template. Point (2.) may lead to missing invoices in the generated PDF.
After this commit:
The actual PDF (that was generated previously) is attached to the invoice. Thus i.e. the QR code appears in l10n_ch.
In the process Point (2.) was also solved. In case the manually added files are not PDFs they are silently dropped.
Reproduce
1. Install l10n_ch
2. Select 'CH Company'
3. Create an Invoice
* Due Date: in the past
* Customer: Easy Clean Lausanne (A Swiss company)
5. Print the PDF. Check that the QR code is appended to the invoice
6. Go to follow-up reports for Easy Clean Lausanne and follow up with 'Print' option. Ensure 'Attach Invoices' is checked. Add some PDF file manually. Click "Print"
7. The invoice is appended to the follow-up report but w/o QR code. The PDF that was manually added does not appear in the report at all.
task-3472962
Forward-Port-Of: odoo/enterprise#53836This fix resolves an issue where customers associated with helpdesk tickets were not being properly linked to their corresponding timesheet entries. Previously, when grouping timesheet records by customer, the customer information would not appear. The fix ensures that customer data flows correctly from helpdesk tickets to timesheet entries, making it easier to track and organize work by customer.
Original PR description
Issue: - When a Helpdesk ticket is associated with a partner, this association is not being correctly linked in the Timesheet module. As a result, when attempting to group Timesheet entries by partner, the grouping is inaccurate. - The issue is caused by the '_compute_partner_id' not being triggered due to the 'partner_id' being set in the '_timesheet_preprocess' method. Steps To Reproduce: - Go to Helpdesk - Click on any project with the timesheet option enabled. - Click on new - Add title, customer and timesheet hours - Go to Timesheet - Group by 'partner'> the customer is not there Solution: - remove the lines where partner_id is set in '_timesheet_preprocess'. - This test is linked to this PR https://github.com/odoo/odoo/pull/153026 opw-3667921 Forward-Port-Of: odoo/enterprise#54373
This fix prevents users from scanning products and validating a picking that has already been completed. Previously, even though the system displayed "This picking is already done," users could still scan barcodes and validate the picking again through barcode commands. Now the system properly blocks these actions once a picking is marked as done.
Original PR description
Steps to reproduce: - In the Barcode app - Create a new transfer - Scan a product and validate the picking - Select the picking again (remove the ready filter to see it) - "This picking is already done is displayed" and the validate btn isn't displayed but it's still possible to scan products and validate using barcode command Fix: prevent validate if the picking is already done opw-3547770 Forward-Port-Of: odoo/enterprise#56321 Forward-Port-Of: odoo/enterprise#52764
This fix resolves an issue where followup letters sent by post (snailmail) were missing the table of overdue invoices. The problem occurred when the followup contact was used as both the partner and receiver. Now the accounting information will correctly display in the generated letters, ensuring customers receive complete payment reminder details.
Original PR description
Have a company partner with overdue invoices Create a followup contact for the partner Open the followup report Send followup by post (snailmail) Issue: Letter will be generated without accounting information: the table with overdue invoices will be empty This occurs because the letter will be created with the followup contact being both partner and receiver opw-3631639 Forward-Port-Of: odoo/enterprise#52614
Fixed an issue where WhatsApp messages sent automatically during order confirmation would fail when customers had invalid phone numbers. The system now properly handles invalid phone numbers without interrupting the automated sending process, ensuring orders can be completed even if WhatsApp notifications cannot be delivered.
Original PR description
When the user confirms the order and a WhatsApp message is sent using cron this error is produced. Steps to produce: - Install `whatsapp_website_sale` - keep the customer's phone number invalid (E.g.…
When the user confirms the order and a WhatsApp message is sent using cron this error is produced. Steps to produce: - Install `whatsapp_website_sale` - keep the customer's phone number invalid (E.g. `+1 555-555-5555`) - from the website, add some products and proceed to checkout - try to pay for that order - the error will be produced as an invalid phone number Problem:- When a WhatsApp message is sent using `force_send_by_cron=True` then it must not raise any user error in between regardless of a single or multiple records. But for obtaining the value `formatted_number_wa`in `_send_whatsapp_template`, `raise_exception` is `False` only in the case of multiple records and not in the case of a single record, even if the record is sent using cron. Solution:- `raise_exception` must be `False` if `batch_mode` or `force_send_by_cron` is `True`. While calculating `formatted_number_wa` using `wa_phone_validation` the `raise_exception` must be false if the message is sent using cron. Task - 3662747 Forward-Port-Of: odoo/enterprise#53495
When creating a new task directly from the planning view's Gantt chart, the assigned user was not being set correctly. This fix ensures that when you click to create a task for a specific team member in the planning schedule, that person is automatically assigned to the new task as expected.
Original PR description
Steps: - Open Field service - Go to planning menu - Set menu planning by user - Create task from user line Issue: - In the assignee field user does not set by default. Cause: - Calling `default_get` super method before finding fsm project in `industry_fsm` module sets a current user to task because default_get method treat that task a private task and because of that current user is default assigned in most of fsm action. Fix: - Find fsm project and set it in context before calling super method so current user does not get assigned for fsm project's tasks. task-3502839 Forward-Port-Of: odoo/enterprise#56322 Forward-Port-Of: odoo/enterprise#48051
This fix improves the robustness of payroll calculations by ensuring that missing salary components are handled gracefully instead of causing errors. When payroll rules reference salary categories that don't exist, the system will now return a default value of zero instead of crashing, preventing calculation failures and improving system reliability.
Original PR description
Purpose
=======
defaultdict.get(key) returns None if the key doesn't exist instead of default factory value
This could lead to traceback in rules like
result = categories.get("BASIC") + categories.get("ALW")
Easily fixed with
result = categories.get("BASIC", 0) + categories.get("ALW", 0) or better
result = categories["BASIC"] + categories["ALW"]
But could be more robust, find a way to override get or use try catch to return default value instead of NoneFixed an issue in the Report Editor where certain product fields (like "Image 128") were not appearing in the field selection dropdown. Previously, only searchable fields were displayed, which limited the options available when customizing reports. Now users can access and add all relevant fields to their reports, providing more flexibility in report design.
Original PR description
Steps to reproduce ================== - Go to Sales > Quotation - Open studio - Click on Reports - Open the "Quotation / Order" report - Inside the Sale order lines, type /field - Click on "Product >" - Type "128" => The "Image 128" field is missing, only the "Variant Image 128" is displayed Cause of the issue ================== Only searchable fields were displayed opw-3713666 Forward-Port-Of: odoo/enterprise#55839
This update corrects how ticket references are displayed to customers when they submit helpdesk tickets. Previously, an incorrect ticket ID was shown due to a change in how ticket references are generated. Customers will now see the correct ticket reference number, ensuring they can properly track their support requests.
Original PR description
Since 16.3 ticket_id and ticket_ref don't have the same value, so it won't make sense to show public user ticket_id when they submit tickets anymore. 1) Value will be wrong if ticket_ref sequence has changed 2) They can not access tickets from the portal anyway since they are not portal users. opw-3708995 Forward-Port-Of: odoo/enterprise#56041
Fixed an issue where default values set in the action context were not being applied when users created new records in grid views. This ensures that when navigating from one view to a grid view (like from helpdesk to timesheets), important context information like project assignments are properly preserved and automatically filled in for new records.
Original PR description
When using the timesheet smart button (.. Hours recorded) to navigate from helpdesk team form view to the timesheet grid view, the context is not reused so data are missing in the timesheet view. When creating new row, the project was not set by default and a condition in the `default_get` cold ne be evaluated properly. task-3504557 Forward-Port-Of: odoo/enterprise#56323 Forward-Port-Of: odoo/enterprise#48796
This update resolves an issue where dragging and dropping a document from the inspector panel would create duplicate files in the workspace. The drag-and-drop functionality for the inspector has been disabled to prevent this duplication problem, ensuring users can manage their documents without unintended copies being created.
Original PR description
Before this commit:- When we drag and drop a file from the inspector in the existing workspace. The file is duplicated. After this commit:- Now, the drag-and-drop behavior for the inspector has been disabled to prevent file duplication. Task-3635421 Forward-Port-Of: odoo/enterprise#56413 Forward-Port-Of: odoo/enterprise#52756
This fix resolves problems in the form editor's notebook component that prevented users from properly editing tabs and pages. The issue occurred when notebooks contained invisible fields, causing incorrect references and crashes when adding elements. Users can now reliably edit all notebook tabs and pages without errors.
Original PR description
This commit fixes the notebook compiler of the form editor. Since some views define invisible fields directly inside a notebook, the compiler was wrong when trying to match the xpath of a notebook tab with the corresponding node from the compiled Notebook component. This created issues, such as incorrect or null xpaths, preventing to edit some tabs and pages, or crashing when adding an element. opw-3672498 Forward-Port-Of: odoo/enterprise#56257 Forward-Port-Of: odoo/enterprise#56057
Users can now press the Enter key to open spreadsheets when using the spreadsheet selector or template dialogs, improving the user experience and making the interface more intuitive. Previously, the Enter key did not function in these dialogs, requiring users to use alternative methods to open spreadsheets.
Original PR description
## Description: Previously, the enter key didn't function as expected when interacting with the spreadsheet selector dialog or template dialog. This PR resolves the issue by implementing the use of the useHotkey hook, allowing the enter key to efficiently open the spreadsheet when needed. TaskID: [3640162](https://www.odoo.com/web#id=3640162&cids=2&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#56294 Forward-Port-Of: odoo/enterprise#53485
This update removes the "Pay Now" button that was previously added to subscription payment emails. The button was causing technical issues when emails are sent automatically through scheduled tasks, so it has been temporarily removed. The feature will be re-implemented in a future update after the underlying technical issue is resolved.
Original PR description
We revert the following commit because payment_utils.generate_access_token is working with request.env which is not available in cron. The change should be done in master after modifying generate_access_token to accept an env parameter allowing to be called in cron and regular flow. https://github.com/odoo/enterprise/commit/d0618c4f042806b3336de759ebd0a1fe96f193c1#diff-df4c76c88a3be1689c375cb4c80009af33c77ccb60b5f604988565309c1f4773 taskid: 3640650
This update corrects how tests are configured for the Dutch tax reporting module. Previously, tests were incorrectly set to run on all builds, causing unnecessary failures when external government servers were unavailable. The fix ensures tests only run on external builds where they're intended, improving build reliability and reducing false error reports.
Original PR description
The test classes should not be standard: it makes the test run in l10n builds, while we only expect them to be tested on external builds. So, we can have issues with the server from the government not responding which causes errors on l10n builds It also causes issues in 16.4+ where the request is not accepted. Linked to runbot error 23358, 57019 Forward-Port-Of: odoo/enterprise#56274
Fixed a bug where editing the appointment booking button's link text caused an error when clicking the button. The issue occurred because the system was creating a nested link structure that confused the button's click behavior. This fix ensures the button works correctly even after customizing its link destination.
Original PR description
Steps to reproduce: --- 1. Go to Website 2. Click on Edit 3. Place an 'Image - text' block 4. Place an 'Online Appointment' block 5. Select the text on the button 6. In the edit menu, click on edit link 7. Change the link to /website/info 8. Click on save 9. Click on the button 10. Error pops up before redirection 11. Traceback in the console Cause of the issue: --- When editing the text on the button to have a different link, it puts a link tag in the button. When clicking the link inside the button, the target is not the same as if it was the button. opw-3610062 Forward-Port-Of: odoo/enterprise#53147
This fix resolves issues in Web Studio's view editor that were causing crashes and data corruption when editing views. The problem occurred because the full action context was being used when creating or modifying view-related objects, which contained incompatible data. The fix now uses a cleaned context for creating and updating objects while maintaining the full context for retrieving data, preventing crashes and ensuring correct data is saved.
Original PR description
Before this commit, and because of [1], the full action context was used to create or write any oject that edit_view would use. This caused two types of issues: - Checking the view integrity (_check_xml) sometimes crashed because the context keys (for modifiers) were present and return something else than a Boolean - creating objects with "default_" keys in the context ultimately failed, at best with a crash, at worst it ended up creating object with the wrong data. After this commit, we still retrieve stuff (the view, in particular) with the full context to have symmetry with the original get_view of Studio, but we write and create things with a cleaned context. opw-3718769 opw-3719815 opw-3703559 opw-3702620 opw-3702360 opw-3698111 opw-3698108 opw-3702084 [1]: https://github.com/odoo/enterprise/pull/54552/ Forward-Port-Of: odoo/enterprise#56424 Forward-Port-Of: odoo/enterprise#56372
This fix removes restrictions that prevented editing certain accounting fields on product templates when they weren't marked as purchasable. The fields for expense accounts and price differences are now always editable, simplifying the system and avoiding unnecessary complexity across modules.
Original PR description
Product template "property_account_expense_id" and "property_account_creditor_price_difference" fields must stay editable in cases even if not "can be puchased". Since it being readonly is trivial, better leave it writeable instead of implementing cross module readonly logic. Task: 3695677
This fix resolves an error that prevented employees from creating new time-off requests, showing an incorrect message about missing allocations. The issue has been corrected in the HR holidays module, allowing users to submit time-off requests without encountering this validation error.
Original PR description
The issue shows when the user creates a new time-off request  --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Portal users creating opportunities in the CRM were seeing unnecessary error dialogs when submitting forms with empty required fields. This fix ensures that only actual errors trigger dialog popups, while missing required fields now simply prompt users to fill them in as expected.
Original PR description
**Current behavior:** Trying to create an opportunity as a portal user and leaving any of the fields empty will cause an unnecessary exception dialog to flash on screen. **Expected behavior:**…
**Current behavior:**
Trying to create an opportunity as a portal user and leaving
any of the fields empty will cause an unnecessary exception
dialog to flash on screen.
**Expected behavior:**
Submitting the form with empty required fields will just prompt
the user to add values to all fields.
**Steps to reproduce:**
1. In the Contacts application, go to a portal user and in the
Partner Assignment notebook tab, give them a partner level
2. In the CRM app, create a new lead and assign the portal user
who was granted the partner level as the customer
3. Login as the portal user, and convert the lead in My Leads
to an opportunity
4. Go to the my/opportunities website menu
3. Select 'Create Opportunity' in the top right and leave
any/all of the fields empty then select 'Confirm'
**Cause of the issue:**
The catch block in the _buttonExec() function is rejecting its
Promise when it catches anything aside from an RPCError.
Caused by https://github.com/odoo/odoo/pull/137702
**Fix:**
Only reject the Promise when the catch block encounters an
actual Error, preventing dialog window popups when non-critical
exceptions (non-Errors) are thrown.
opw-3703238This update corrects how due dates are displayed in activity messages within the chatter. Previously, dates were shown in a fixed format (YYYY-MM-DD) regardless of user preferences. Now dates will display in the format each user has configured, making the system more consistent and user-friendly across different regions and preferences.
Original PR description
How to reproduce: - Install crm with demo data - Open the crm app - From the menu "Configuration -> Activity Plans", create a plan - Open a lead - Schedule the plan just created for the lead The log message in the chatter display due date in the wrong format: Year(4)-month(2)-day(2) instead of the user date format (if your date format is that one, please change it for testing). This fixes the problem by displaying the date in the user format. Task-3639909
This fix resolves issues with dragging and dropping columns in the website editor when mobile-specific column ordering is enabled. Previously, drag and drop didn't properly handle mobile layout classes like the arrow-based reordering did, causing inconsistent layouts, missing controls, and system errors. The fix ensures drag and drop operations now correctly manage mobile column ordering, preventing layout conflicts and errors when editing or removing columns.
Original PR description
Since commit [1], it is now possible to order the columns in mobile view independently from the desktop view. When moving a column with an arrow, if we are in mobile view, mobile order classes are…
Since commit [1], it is now possible to order the columns in mobile view independently from the desktop view. When moving a column with an arrow, if we are in mobile view, mobile order classes are added on the columns, which only changes the order on mobile without affecting desktop. But if we move on desktop view, then these classes are removed. While it works well when using the arrows, this behavior is not the same when moving the columns with the drag and drop. This means that drag and dropping a column - in the same snippet does not reset the mobile order classes; - in another snippet does not reset the classes in it and does not fill the gap left in the previous snippet if it was ordered. This means that in the same snippet, there can be both columns with and without the mobile order classes. This causes some issues: 1) Removing such snippets or their ordered columns causes a traceback. Indeed, the `onRemove` code considers that all columns have the mobile order classes if we remove one, which is why it fails when it is not the case. 2) The arrows on the mobile overlay are not always correct and can also be missing, because they depend on the order classes. 3) In mobile view, changing the order of the columns adds inconsistent mobile classes on them, because of the columns that already have one. This commit improves the drag and drop by also taking mobile ordered elements into account, as it is the root cause of the mentioned issues: - When a column is moved, the order classes of all the other columns in the snippet where it was dropped are removed (so it behaves the same way as with the arrows). - When moving an ordered column in another snippet, the gap it left in its previous snippet is now filled. This commit also fixes the issues for already dropped blocks in existing DBs, by - adding a check when removing to avoid the first issue; - removing the mobile classes at the start if they are inconsistent. [1]: https://github.com/odoo/odoo/commit/710d000f1872fd99b41d52ec3d6923756bba7cba opw-3697962
Fixed an issue where QR codes for invoice retrieval were incorrectly displayed when printing bills for unpaid orders. Now QR codes only appear after an order has been successfully paid, improving the accuracy of bill printing in point of sale systems.
Original PR description
Current behavior: When printing the bill before the order has been paid, the QRCode to get the invoice shouldn't be shown. Steps to reproduce: - Activate the option "Show QR Code" in the POS settings - Create a new order - Add some products - Click on "Bill" button - The QRCode is shown opw-3703720 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The AI writing assistant option has been removed from the toolbar when images are selected, since AI-generated text would replace the image rather than enhance it. The AI option now only appears when working with text, making the toolbar more intuitive and preventing confusing user experiences.
Original PR description
Specification: This commit targets the scenario when an image is in the selection and the toolbar displays an AI option, which makes no sense as the generated response will replace the image. Desired behavior after PR is merged: The toolbar has been updated to show the AI option only for text-based scenario task-3733320
This update corrects the spacing of the activity button in the messaging interface. A previous change had added extra spacing to separate the activity button from communication-related buttons, but this spacing was not desired. This fix restores the original spacing to improve the visual layout of the interface.
Original PR description
In https://github.com/odoo/odoo/commit/e0491c1a623ffec19ed563679f853cc6d1c56d03 we changed the spacing of the activity button to dissociate it from buttons that are "message/communication" oriented. This spacing was unwanted so we need to revert it back. task-3730089 | Before | After | | --- | --- | | | | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects inconsistencies between how taxes are calculated in the sales system and the online store, ensuring that prices displayed to customers are accurate and consistent. The fix also resolves a test issue that was causing failures in localization builds, improving the reliability of the system across different regions.
Original PR description
While fixing a non deterministic test failing on nightly l10n builds, slight incoherences between sale & website_sale tax computation have been noticed in the computation of the contextual price (used in some snippets). This commit fixes the test, making sure it doesn't fail on l10n builds, but also uses the same tax util in website_sale than in sale, to make sure the displayed amounts are coherent (and supposedly correct). runbot error: 52831 (& a bunch of others) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#152945 Forward-Port-Of: odoo/odoo#152832
This fix resolves an error that occurred when creating credit notes for invoices in child companies. The system was incorrectly assigning the parent company instead of the actual company where the invoice was created, causing a mismatch. Now the credit note wizard properly uses the correct company, allowing users to reverse invoices across multi-company setups without errors.
Original PR description
### Steps to reproduce - Create a child company. - In the child company, create a new sales journal. - Create and confirm an invoice using this new journal. - Attempt to create a credit note from…
### Steps to reproduce - Create a child company. - In the child company, create a new sales journal. - Create and confirm an invoice using this new journal. - Attempt to create a credit note from that invoice. In this scenario, you would encounter an error. ### Cause The `AccountMoveReversal` wizard is currently setting its company to the root company of the moves, which in this case is the parent company. However, its journal is set to the one created in the child company. This mismatch causes an error due to company inconsistency. ### Fix The `company_id` of `AccountMoveReversal` will now be assigned to the company of the moves, rather than the root company. To ensure this works correctly, we also added a check to guarantee that all moves being reversed are from the same company. ### Note This fix also resolves an issue where a traceback occurred if two invoices were created (one in the child company and another in the parent company) and an attempt was made to reverse both simultaneously. opw-3640719 Forward-Port-Of: odoo/odoo#147891
This fix resolves an error that occurred when retrieving paid invoices through the API if the invoice partner didn't have a company assigned. Previously, the system would crash with a technical error. Now it properly returns the invoice payment information without errors, ensuring API users can reliably fetch invoice data regardless of partner company settings.
Original PR description
…arshal None unless allow_none is enabled Description of the issue/feature this PR addresses: When uses External API to fetch an invoice, if this invoice it's paid and the 'partner' hasn't 'company' return None instead False Current behavior before PR: TypeError: cannot marshal None unless allow_none is enabled Desired behavior after PR is merged: Should return an object with invoice_payments_widget as attribute. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix resolves an issue where a contact's price list would incorrectly disappear when changing the contact's country or state without saving. The problem was caused by incorrect ID retrieval in the code. Now the price list will remain properly assigned when you modify address information.
Original PR description
How to reproduce the error:
1. Go to Contacts.
2. Select any contact.
3. Edit the contact and modify the country (without saving).
4. The pricelist field becomes empty.
Explanation:
The code was incorrectly using "p.id" instead of "p._origin.id" to get the contact ID. This resulted in a non-existent key being retrieved and caused the loss of the price list in the contact when changing the country. The fix adjusts the code to correctly use "p._origin.id", ensuring correct retrieval of the ID and avoiding unwanted changes to the price list.
Example of data obtained by debugging:
- Edited user: Deco Addict
- Data obtained in "res": res {53: product.pricelist(1,)}
- Data retrieved in "p.id": (p.id) > NewId_53
- Data retrieved at "p._origin.id": (p._origin.id) > 53
This commit makes sure the expected pricelist is displayed.
TT47536
Forward-Port-Of: odoo/odoo#152949
Forward-Port-Of: odoo/odoo#152690This fix resolves an issue where website menus with auto-hide functionality (collapsing overflow items into a dropdown) were not adapting properly when entering edit mode. The sidebar in edit mode reduces the window width, but the menu wasn't responding to this change. The fix ensures menus automatically reorganize when needed, maintains the state of dropdown menus during editing, and prevents unwanted menu closures when editing menu items.
Original PR description
Steps to reproduce: - Go to Website > Add menu items in a way that activates “auto-hide” (to set the overflowing menu items in a “+” dropdown) if the viewport was resized. - Go to “edit” mode (adding…
Steps to reproduce: - Go to Website > Add menu items in a way that activates “auto-hide” (to set the overflowing menu items in a “+” dropdown) if the viewport was resized. - Go to “edit” mode (adding the sidebar reduces the current window width) > The “auto-hide” menu adaptation is disabled, and overflowing menu items are still visible. On [15.0 - 16.4]: The original commit fixed the behavior described above by preventing the unbreakable mechanism from detecting header changes and canceling the auto-hide updates (see: [X-original-commit]). In addition to the main fix, some other changes were also added to allow correct editing of extra menu items [1]: - The `_adapt()` debounce was replaced by a throttle that applies the first menu adaptation immediately. - We remember the state of the extra menu dropdown (open or not) if it is there, which will be restored after the menu adaptation. - When clicking inside an extra menu item, The extra menu is closed. We prevent this default behaviour in "edit" mode. Starting from 17.0: The code from [2] fixed the same editor's rollback issue by using a `withoutRollback()` to ensure that the `_adapt()` is called without triggering any rollback. This commit will only forward-port the adaptations from [1] since the rollback issue was fixed using the new `withoutRollback()` tool. [2]: https://github.com/odoo/odoo/commit/cbed990924887eb529056d89a042a92ba27b825b Related to opw-3484742 X-original-commit: 02fb2d496f8820a909dfdc595e3389bb1467f194 Forward-Port-Of: odoo/odoo#153563
This update corrects how the Italian tax report (ve38 line) displays tax information. Previously, it was showing the tax amount, but it should display the tax-excluded amount instead. This ensures accurate tax reporting for Italian businesses using Odoo's accounting system.
Original PR description
In tax report, ve38 line should display the tax excluded amount, not the tax amount. Task link: https://www.odoo.com/web#model=project.task&id=3609402 opw-3609402 Forward-Port-Of: odoo/odoo#153424 Forward-Port-Of: odoo/odoo#145570
This update fixes an issue where Outlook calendar events that don't have an organizer assigned would fail to sync with Odoo. Users can now successfully synchronize all their Outlook events to Odoo, regardless of whether an organizer is specified, improving the reliability of calendar integration.
Original PR description
Before this commit, an Outlook event without an organizer would fail to sync with Odoo. This commit fixes this issue by allowing events without an organizer to be synced from Outlook to Odoo. opw-3701839 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#153495
This fix resolves an issue where users were not being automatically enrolled in training courses when their group access was changed. The system now correctly processes group information before determining which courses to auto-enroll users in, ensuring that users get access to all relevant training materials when their permissions are updated.
Original PR description
When a user is modified to grant access to new groups, user is auto-enrolled to all slide courses that have a auto-enroll policy for any of the new groups. However, that auto-enrolling process was not working correctly due to how values to be written to the user are coming. In order to know what are the actual new groups, values need to be pre-processed, which was not being done. This commit fixes the above issue by pre-processing written values before extracting new groups. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#153138
This update corrects the visual styling of forecast icons in the sales inventory module to match other similar icons throughout the system. The icon color and hover behavior have been adjusted to provide a more consistent and intuitive user experience when interacting with forecast information.
Original PR description
This PR fixes an unconsistent forestack icon within the `sale_stock` module. Prior to this PR, the forecast icon was using a `text-primary` class, making it unconsistent regarding the other forecast icons. We also add a missing `cursor-pointer` class to fix the improve the hover state and the visual feedback of the link. task-3582145 Forward-Port-Of: odoo/odoo#140959
This fix ensures that when a customer is assigned to a helpdesk ticket with timesheet hours, the customer information is correctly linked in the timesheet module. Previously, customers were not appearing when grouping timesheet entries by customer, making it difficult to track which customer each timesheet entry was associated with. This fix resolves that issue so timesheet reports now accurately reflect customer assignments.
Original PR description
Issue: - When a Helpdesk ticket is associated with a partner, this association is not being correctly linked in the Timesheet module. As a result, when attempting to group Timesheet entries by partner, the grouping is inaccurate. - The issue is caused by the _compute_partner_id not being triggered due to the partner_id being set in the _timesheet_preprocess method. Steps To Reproduce: - Go to Helpdesk - Click on any project with the timesheet option enabled. - Click on new - Add title, customer and timesheet hours - Go to Timesheet - Group by 'partner'> the customer is not there Solution: - remove the lines where partner_id is set in '_timesheet_preprocess'. - Test link to this PR: https://github.com/odoo/enterprise/pull/54373 opw-3667921 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#153026
This fix resolves an issue where adding a new image to a website image gallery would incorrectly replace the thumbnail of the first image in the carousel. The problem was caused by an unnecessary event trigger that was updating the wrong thumbnail. By removing this redundant event, the gallery now correctly displays all image thumbnails when new images are added.
Original PR description
[FIX] website: correctly update carousel thumbnails on image insertion Steps to reproduce the bug: - Add an "Image Gallery" on the website. - Add a new image on the snippet. -> Problem: the thumbnail…
[FIX] website: correctly update carousel thumbnails on image insertion Steps to reproduce the bug: - Add an "Image Gallery" on the website. - Add a new image on the snippet. -> Problem: the thumbnail of the first image of the carousel has been replaced by the new added image. To solve the problem, the triggering of the `image_changed` event has been removed on extra image added. It was introduced by [1] to trigger the re-rendering of the thumbnail when adding a new image on the carousel but was actually useless. Indeed, the mechanism was the same as now; when a new image was added on the carousel, the `website.gallery.slideshow` that already handles the thumbnails was re-rendered. An important think to note is that the system was also never intercepting this `image_changed` event as it was triggered on an element that was not in the DOM (as it was removed at the `_replaceContent()` call in the `slideshow()` method). However, since [2], the images rendered by the `website.gallery.slideshow` are replaced by the images (or the wrapped anchored images) returned by `_getImgHolderEls`. Therefore, `$newImageToSelect` is part of the DOM and the `image_changed` event is intercepted by the gallery option. As the active carousel item is always the first one of the carousel after a `website.gallery.slideshow` re-rendering, the system changed the thumbnail of the first item with the new added image. [1]: https://github.com/odoo/odoo/commit/85990768592cbdefbb178b5ffa38c1e29b9eeb87 [2]: https://github.com/odoo/odoo/commit/0fd2477d993e822fe6fd4497aace9f746af7a481 task-3736301 Forward-Port-Of: odoo/odoo#153562 Forward-Port-Of: odoo/odoo#153409
This update includes several important fixes and improvements across Odoo's accounting, point of sale, web editor, and mail modules. Key improvements include fixing invoice cancellation in Indian EDI, resolving banner navigation and focus issues in the web editor, fixing activity view crashes, and updating the PDF viewer library to the latest version with better performance and dark mode support. These changes address user experience issues and enhance system stability.
This fix corrects an issue where timesheet quantities were displayed incorrectly when selling prepaid services measured in days. The system was incorrectly converting day-based service quantities as if they were hours, showing wrong totals in the timesheet view. The fix ensures quantities are properly converted based on the actual unit of measurement and timesheet settings.
Original PR description
Steps to reproduce: -Create a SO and sell a prepaid service in days -Set the timesheeting to days/half-days -Add a timesheet line on the task of the SO -Go to database/my/timesheets and look for the timesheets of the SO -> The days ordered are wrong Before PR: If you confirm the SO with the timesheeted SOL's uom as days and your timesheeting is made in days, the view will convert the amount of days as if it were hours, showing wrong values After PR: Made the report more robust, now converting whatever unit the SOL has to either hours or days depending on the timesheet setting opw-3643988 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#153747 Forward-Port-Of: odoo/odoo#147944
This fix resolves an issue where payment providers (specifically the SEPA provider) were not being properly removed when their modules were uninstalled. The problem occurred because custom payment provider templates were not being properly disconnected before deletion. This update ensures that all payment providers are correctly restored to their original state when their modules are removed from the system.
Original PR description
Since fd2fb212c50952ca5a8e162ba5d82ce433cd5989, the sepa provider (enterprise module) behaves as a custom provider but despite some adaptations, the removal of providers on module uninstall was not properly adapted. The uninstall of the sepa provider failed as its inline template was not unlinked from the provider before the template deletion. This commit makes sure that custom providers are correctly considered in the uninstall util supposed to restore a provider to its state before the installation of its module. opw-3734697 opw-3721846 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#153690
Fixed an issue where disabled optional column headers in list views would reset to their default state when the view was reopened. Users' preferences to hide optional columns are now properly saved and restored, maintaining consistency with previous versions of the software.
Original PR description
The string value of an empty array is `""` which is falsy. Prior to this commit, if all optional columns headers were disabled in a list view, it would result in a reset of those when the view is mounted the next time, instead of keeping them disabled like in prior versions. task-3692178 Forward-Port-Of: odoo/odoo#153596 Forward-Port-Of: odoo/odoo#153407
This update fixes Spanish electronic invoices (Facturae) sent to public administrations by adding required payment details, including bank account information and payment terms. This ensures government agencies receive all necessary information to process payments correctly. The fix also corrects the payment method designation to Credit Transfer.
Original PR description
When invoicing public administrations, they expect the facturae electronic invoice to contain the optional `<PaymentDetails>` node that contains e.g. the bank account number to which they need to issue the payment. We didn't provide these details. This commit adds the necessary `<Installment>` nodes in the `<PaymentDetails>` node for each installment in Odoo according to the payment terms of the invoice. Since we are fixing this in stable, we only add the payment details for inbound payments and fix the `<PaymentMeans>` to `04` (Credit Transfer). We also removed the stripping of whitespace for the signature, since it turned out not necessary after introduced in [1] [1] e5d69a73e2e781d00f67c0590a8fc13b09a06ebf [task-3734341](https://www.odoo.com/web#id=3734341&cids=1&menu_id=4720&action=333&active_id=967&model=project.task&view_type=form) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#153692
Code cleanup and technical improvements
The intrastat report's query building function has been reorganized and simplified to improve code clarity and reliability. This cleanup helps prevent technical issues with the system's security checks and makes the code easier to maintain going forward.
Original PR description
`_build_query` is a rat's nest of randomly sprinkled `SQL`, which seems to end in the sql injection checker getting confused and non-deterministic. Do some cleaning to try and make it more understandable for the linter. Forward-Port-Of: odoo/enterprise#56367