Daily updates from Odoo
Monday, March 31, 2025
31 changes
6 changes
Resolved issues and error corrections
This change removes unnecessary default permission groups from shared accounting test setup and adds them only where individual tests need them. It helps keep automated tests more accurate and easier to maintain without changing customer-facing behavior.
Original PR description
Followup to https://github.com/odoo/odoo/pull/203271 This PR removes the groups that have little to no effects on the test, and fix the tests that get broken by them. Further groups require more work.
A payroll expense test now consistently uses the same accounting journal as the base setup. This prevents failures when demo data is not installed, improving reliability for development and validation environments.
Original PR description
[FIX] hr_payroll_expense: fix test failure in non-demo mode In `test_no_expense_rule_means_no_linkage` we create a new salary structure to test the case where a missing rule shouldn't link expenses to the payslip. In the copy of the base setup structure we didn't mention a journal, this lead to the use of another journal that worked because demo data would ensure it was properly setup. Without demo data, this test would fail. This commit ensures the journal used in the test is the one from the base setup.
Rental sales now use the same company rules as standard sales when choosing products. This prevents users in subsidiary companies from seeing inconsistent product options and makes rental order entry more reliable.
Original PR description
The `company_id` part of the product_id/product_tmpl_id domain on sale order lines has been removed by odoo/odoo@b0f0fd2ee3dcc3bbb24a123d4a1b38d17d0ce8c9 but not adapted in rental, leaving to an inconsistency between the two apps. This commit (and the community counterpart) refactor the domains of those fields to rely on the standard `check_company` logic, simplifying the logic and avoiding inconstitencies.
A spreadsheet edition error message in the global filter editor is now properly prepared for translation. This helps users working in different languages see clearer, localized guidance when an error occurs.
Original PR description
Task-4680832
The German financial reports now calculate prior-year profit or loss and current-year net income more accurately on the balance sheet. This helps businesses relying on German localization reports see correct carried-forward and annual result figures for fiscal reporting.
Original PR description
Profit and loss from previous year was not well calculated on the balance sheet. With this commit, we change the date scope for the `Net profit/loss for the year` line from `normal` to `from_fiscalyear`. We also change the way we calculate `Profit carried forward/loss carried forward` and `Net income/loss for the year` lines. opw-3663626
The Gantt view now calculates column widths correctly when some columns are folded. This prevents layout issues and helps users read schedules and timelines more reliably.
Original PR description
This commit fixes an issue introduced in https://github.com/odoo/enterprise/commit/4f3682b4edf88f5423bb4111b4f1e0d2fc42e627, where a confusion between the number of hidden columns and the actual number of folded columns led to incorrect width calculations for non-folded columns. This fix resolves the ambiguity and ensures accurate column width.
25 changes
Resolved issues and error corrections
Odoo can now more reliably recognize quoted reply text from Outlook on macOS and iOS. This helps keep email conversations cleaner by separating new messages from previous quoted content.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Mail quotes replied by MacOS/ iOS Outlook cannot be detected Desired behavior after PR is merged: Mail quotes replied by MacOS/ iOS Outlook can be detected --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Odoo now more reliably recognizes quoted text in replies sent from Outlook on macOS and iOS. This helps keep email conversations cleaner by separating new replies from previous message history more accurately.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Mail quotes replied by MacOS/ iOS Outlook cannot be detected Desired behavior after PR is merged: Mail quotes replied by MacOS/ iOS Outlook can be detected --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix keeps the main customer rating setting visible in project settings when the Documents module is not installed. Only the related child options are hidden when appropriate, making the settings page clearer and preventing users from thinking the rating option is unavailable.
Original PR description
### Steps to reproduce: - Enable Customer Ratings in general settings - Uninstall Documents module - Navigate to any project's settings and customer rating option - Notice the whole option got disappeared instead of just hiding the child options ### Cause: This is happening because after this commit https://github.com/odoo-dev/odoo/commit/16ca5b73646749d1a9341bbc02c6ca048feb66c2#diff-54a713792b3dba141af5416c4b89973ddf662cfad2bb65c642ad4534dddec626 we removed allow_rating and we are using rating_active which is the setting field for each project separately for showing both divs or not https://github.com/odoo/odoo/blob/c68ec0aaed70973f65d46d75875c59f5bc10f23b/addons/project/views/project_project_views.xml#L129 https://github.com/odoo/odoo/blob/c68ec0aaed70973f65d46d75875c59f5bc10f23b/addons/project/views/project_project_views.xml#L134 ### Fix: For the parent div we will be using the groups attribute instead of invisible attribute opw-4633771
This fixes a small visual issue in the calendar event response window. Selected response buttons such as yes, no, or maybe now keep their full border visible when the user hovers over a neighboring button, making the interface clearer and more polished.
Original PR description
In the calendar application, when clicking on an event, a window opens. In this window, we can select “yes,” “no,” or “maybe.” When one of the buttons is selected and the mouse hovers over the button…
In the calendar application, when clicking on an event, a window opens. In this window, we can select “yes,” “no,” or “maybe.” When one of the buttons is selected and the mouse hovers over the button to its right, the border of the selected button disappears. This commit fixes this display issue to ensure that all four borders remain visible when hovering over the button adjacent to the selected one. Current behavior before PR: <img width="437" alt="420611023-a03e84be-1512-4b5a-8e3a-186058989bc2" src="https://github.com/user-attachments/assets/86c0ac93-1c1c-4127-8363-2edad1e1007a" /> <img width="439" alt="420628749-d2bf71dc-ba9a-48d6-b997-0e7f2b35b960" src="https://github.com/user-attachments/assets/01603215-957c-4e23-838e-47e03b0fa1cd" /> Desired behavior after PR is merged: <img width="437" alt="420611053-fdba2415-bf02-4829-81a9-9210dde9dedf" src="https://github.com/user-attachments/assets/be83c1ff-436b-4a9e-80fc-6e6de584e8fd" /> <img width="435" alt="420628766-5386e3a0-42e4-47ef-a277-d5590802d780" src="https://github.com/user-attachments/assets/366c0430-9460-4622-b5b7-063f2a3003ee" /> --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Changing a marketing card template now correctly marks existing cards as needing an update. This prevents customers or employees from receiving cards rendered with an outdated design after a template change.
Original PR description
Changing the template of marketing card will not mark the existing card "to update", leading to wrong template used. Steps: - Open marketing card - Open Employee Card - Ensure a template is selected…
Changing the template of marketing card will not mark the existing card "to update", leading to wrong template used.
Steps:
- Open marketing card
- Open Employee Card
- Ensure a template is selected (Center)
- Click on Send
- Click on "Update 128 cards"
- Download a card (/cards/1/card.jpg)
- Template is well "Center"
- Change Sub-Header value
- Click on Send
- You can update 128 cards
- Update them
- Download a card (/cards/1/card.jpg)
- Sub-Header is updated
- Template is still "Center"
- Change the template to "Drawing"
- Click on Send
Actual result:
- You can't update cards, require_sync field is false
- Download a card (/cards/1/card.jpg)
- Template is still "Center"
- Sending email will not update them
- https://github.com/odoo/odoo/blob/4970215142d11efedc5ddc1d82ef7d671e7f0eeb/addons/marketing_card/models/card_campaign.py##L180-L181
Expected result:
- You can update cards, require_sync field is true
- Card template should be considered as a render fieldThis fixes an internal test so it uses the correct accounting user access level when checking partner form fields. It helps keep automated validation reliable when the accounting add-on is installed, reducing false test failures without changing normal user behavior.
Original PR description
Description of the issue/feature this PR addresses: The test TestFormCreate.test_create_res_partner fails because the field 'res.partner.property_account_payable_id' cannot be found in the form view…
Description of the issue/feature this PR addresses: The test TestFormCreate.test_create_res_partner fails because the field 'res.partner.property_account_payable_id' cannot be found in the form view if the module account_accountant is installed in the database. This happens because the module includes a view which inherits from "account.view_partner_property_form" and restricts a group element only to members of the security group "account.group_account_user." Previously, the restriction was for the group "group_account_manager" but the test wasn't updated to reflect this change. Current behavior before PR: Before this commit, running the test in 18.0 throws an AssertionError because the field 'property_account_payable_id' can't be found in the form view. `AssertionError: 'property_account_payable_id' was not found in the view` Desired behavior after PR is merged: After this commit, the right group is added to the user during the test, and the field can now be found in the res.partner.form view. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents an internal server error when users access Employees pages through a JSON-style URL. It ensures the same company context is available there as in the normal web route, so employee data loads reliably for users with company-based access rules.
Original PR description
An internal server error happened when trying to acces json from the url in the employees app
Steps to reproduce:
-------------------
* Open employees app
* Change /odoo/ for /json/ in the url
> Observation:
ValueError: NameError("name allowed_company_ids is not defined") while evaluating
"[(company_id, in, allowed_company_ids)]"
Why the fix:
------------
With the odoo web route allowed_company_ids is added to the context here https://github.com/odoo/odoo/blob/648956b75bdd09396bae3b7162f236236fccae23/addons/web/static/src/webclient/actions/action_service.js#L346 from user.context.
With the json route we need to add it manually as it's not in the env
opw-4601689
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prFixes an issue where importing updates to purchase orders could fail to apply changed line prices when the vendor field was also included but unchanged. This helps ensure spreadsheet imports preserve the intended purchase order edits and avoid unexpected price resets.
Original PR description
**Current behavior:** For a `PurchaseOrder` record, writing on the `partner_id` and a field of an `order_line` which is computed by `_compute_price_unit_and_date_planned_and_name` will cause the new…
**Current behavior:** For a `PurchaseOrder` record, writing on the `partner_id` and a field of an `order_line` which is computed by `_compute_price_unit_and_date_planned_and_name` will cause the new value of the order line write to be overwritten. E.g., writing on `partner_id` and `purchase.order.line.price_unit` **Expected behavior:** The freshly written value in cache for the order line field should be protected from re-writes. **Steps to reproduce:** 1. Create a product with a supplierinfo (vendor) 2. Create a new purchase order with the vendor as the partner and an order line for the product -> Save 3. Export the purchase order to xlsx, add the fields: `partner_id`, `order_line/external ID`, `order_line.price_unit` 4. Open the exported xlsx file and change the price unit value 5. Import the file -> see that the price unit on the order line did not update **Cause of the issue:** The new price unit gets updated in cache, but prior to the entire `write` sequence finishing, we will process pending recomputations where, seeing that `PurchaseOrder.partner_id` was updated, `_compute_price_unit_and_date_planned_and_name` will be called. Even though `price_unit` is protected, if any of the other fields which are computed by this method are not, then it won't matter. **Fix:** A simple solution for *this specific* instance of over-using a compute method is to just not over-write `partner_id` if it's equivalent to the present value on the record. If `partner_id` is overwritten for real it seems fine to let everything be recomputed. opw-4574816
This update prevents automated code checks from failing because of a known issue in older versions of the checking tool. It helps keep development and testing reliable on supported Ubuntu environments without changing business functionality.
Original PR description
Pylint < 2.16.2 detects a variable referenced before assignment when the walrus operator is used in dictionary. As Jammy provides pylint 2.12.2 and our tests should work with this distribution, let's skip it. Fixed in pylint-dev/pylint#8176
Credit journals now require a bank statement source, matching the setup rules already used for bank journals. This helps ensure credit journal configuration is complete and avoids confusion or missing information during accounting setup.
Original PR description
In odoo/odoo/pull/175315, we added a new journal type: 'credit'. The `bank_statements_source` was meant to be required for credit journal the same way it is for bank journals. no-opw no-task --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents an error that could occur when creating or editing partner records if the commercial partner field is shown and electronic invoicing settings are recalculated before the record is saved. The electronic invoicing format is now only calculated when the needed partner information is available, improving reliability for users customizing partner forms.
Original PR description
Typically, the field commercial_partner_id on res.partner is not displayed on the Form view. However, adding it via Studio or other means will lead to an error if the following conditions are met.…
Typically, the field commercial_partner_id on res.partner is not displayed on the Form view. However, adding it via Studio or other means will lead to an error if the following conditions are met. Issue We click New to start creating a new record (still in NewId phase) We trigger an onchange that will lead to invoice_edi_format being computed When clicking New the commercial_partner_id is computed initially. However, this value isn't present on the Form view yet which leaves the field empty until we actually save (and create) the record. Prior to this, if another onchange is called we'll pass commercial_partner_id as False in the onchange, eventually erroring out when we try to call a method on the value's record. Solution: After multiple fixes and refactor, it looks like dependencies on the compute are no longer relevant. Indeed, `_get_suggested_invoice_edi_format` only depends on the commercial partner's country code now. Also only compute the edi format if the commercial partner is set. opw-4630096
This fix prevents an error when creating a new contact or customer record if the commercial partner field has been added to the form. It ensures the partner information is refreshed before account-related invoice settings are calculated, making customized forms more reliable.
Original PR description
Typically, the field `commercial_partner_id` on `res.partner` is not displayed on the Form view. However, adding it via Studio or other means will lead to an error if the following conditions are met. ### Issue - We click `New` to start creating a new record (still in `NewId` phase) - We trigger an onchange that will lead to `invoice_edi_format` being computed When clicking `New` the `commercial_partner_id` is computed initially. However, this value isn't present on the Form view yet which leaves the field empty until we actually save (and create) the record. Prior to this, if another onchange is called we'll pass `commercial_partner_id` as `False` in the onchange, eventually erroring out when we try to call a method on the value's record. ### Solution We can check for the case above and compute the field again, ensuring that it has a proper value prior to accessing it. opw-4630096
Fixes an issue that could cause an error when subscription amounts were compared and one value was missing. This helps customers and staff continue using subscription portal and order flows without unexpected interruptions.
Original PR description
Before this commit, compare_amount could be called with nonetype taskid: 4671141
This fix updates Belgian Partena payroll work entry codes to allow the required 5-character format instead of only 3 characters. It helps prevent incorrect or incomplete payroll export data for companies using Partena integration.
Original PR description
The partena code on work entry type should be 5 characters long and not 3. task-4658021
This fix updates the Documents Project screen setup so customer rating information follows a recent change in the related project view. It helps keep the interface consistent and prevents visibility rules from behaving incorrectly for users.
Original PR description
Since we are changing the parent view in https://github.com/odoo/odoo/pull/202946/commits/5430b209c6f968108e0e43f9ff7fc6166239833a we are gonna need to adjust the inherited view in documents_project to use the groups attribute instead of invisible attribute opw-4633771
This update makes several automated checks more stable by adding waits or avoiding test interactions that were causing inconsistent results. It helps reduce false failures in testing for German point of sale certification, manufacturing shop floor flows, and website rental sales.
Original PR description
- l10n_de_pos_res_cert/static/tests/tours/fiskaly_tour.js Add wait request steps (to fix undeterministic behavior). - mrp_workorder/tests/test_shopfloor.py Add a step_delay=500. This step delay will be removed from codebase soon. This is an intermediate fix. - website_sale_renting/static/tests/tours/website_sale_renting_select... Avoid the usage of datepicker interface that causes problems for now in tours.
This fixes an issue where company information was missing from the Italian Libro Giornale report. Businesses using the report will now see the expected company details, supporting clearer and more complete statutory reporting.
Original PR description
- Fix the problem of company information that was not diplayed in the libro giornale report task-4502158
Budget reports now correctly include purchase commitments made on the budget end date. This prevents committed amounts from being understated when orders are confirmed on the last day of a budget period.
Original PR description
The committed amount was incorrect because the budget report query is comparing a `datetime` column (purchase_order.date_order) to a `date` column (budget_line.date_to). This is wrong because `'03-31-2025 21:00:00' <= '02-31-2025' == False` This made committed amounts under-reported whenever relevant activity happened on the final day of the budget. Steps to reproduce: - It’s easier to follow by watching this [video](https://drive.google.com/file/d/1SNTUJpiQpcET5pBcu-8PpD3Aw7UHALVD/view?usp=drive_link) - Create an analytic account - Create a new budget line with start and end dates set to today - Assign the analytic account as internal and link it to a budget - Go to Purchases > Create a new Request for Quotation - Use the analytic account in the analytical distribution - Confirm the order - Go back to the budget line: the committed amount will incorrectly show 0 OPW-4624672
Marketing automation activities can now safely use date-based "within" filters without triggering an error. This prevents campaign setup failures when businesses segment audiences using relative date criteria.
Original PR description
Steps to reproduce the bug: - Install Marketing_automation app - Create a marketing campaign - Add a child activity to the campaign - Add a within filter on any date field on the model Problem: Traceback is raised because the marketing activity has a domain that is computed as the ANDING of the domain of the activity with the campaign and all parents of it. `_compute_inherited_domain()` is the function used to get the activity domain, and it uses `expression.AND`, which takes two domain expressions in list type. The activity domain and the campaign domain are originally in strings, so `literal_eval` was used to change them to lists and perform the ANDING operation. The within filter introduces `context_today()` and `timedelta()`, which are used from `odoo.fields`, so the evaluation of the domain fails, causing the traceback to be raised. opw-4551335
This fix prevents Mexican electronic invoices from failing when withholding tax and “No Tax Breakdown” are used together. It corrects how small rounding differences are handled, helping affected invoices validate successfully and avoiding disruption in the billing flow.
Original PR description
### Steps to reproduce: - Install "l10n_mx_edi" and switch to a Mexican company - In Accounting > Configuration > Taxes activate the tax "1.25 WH" - Create an invoice with one line with a price of…
### Steps to reproduce: - Install "l10n_mx_edi" and switch to a Mexican company - In Accounting > Configuration > Taxes activate the tax "1.25 WH" - Create an invoice with one line with a price of $50 and the tax "1.25 WH" - Go to the customer of the invoice - Sale & Purchase > Fiscal information and activate "No Tax Breakdown" - Confirm the invoice and Send it to CFDI - Traceback ### Cause: This [commit](https://github.com/odoo/enterprise/pull/75381/commits/3f2e9437439fd6f987a13816473da2bd5a26953d) added a part in the code to prevent rounding error when specific discounts are applied which makes the base have a 5 as third digit. When having a withholding tax and selecting "No Tax Breakdown" on the partner, the base amount will be decreased by the amount of the tax. If this amount has a 5 as third digit, a difference is detected here: `delta_discount = currency.round(sum(x['importe'] for x in line_values_list)) - cfdi_values['subtotal']` because: - `x['importe']` is 49.375 which rounds up to 49.38 - `cfdi_values['subtotal']` is 49.37 because the tax was rounded up from 0.625 to 0.63 The code will then try to find lines with discounts but there are none so it raises an error at the `max()` function which is given nothing. ### Solution: Adding `default=None` to `max()` so it doesn't crash. But the rounding issue still needs to be fixed. The fix is to select a line with more than 2 digits and to remove the difference with its rounded value. This ensures that the resulting value stay in the same 2-digit range, preventing error CFDI40167, and that the sum of "importe" is rounded down. opw-4528766
This update fixes a project HR test so it no longer depends on timesheet behavior. It helps keep automated checks stable and reduces false failures during development and releases.
Original PR description
Same logic as: https://github.com/odoo/enterprise/pull/81763 https://github.com/odoo/enterprise/pull/79947 rb-145524
This fix prevents an error when staff update reserved capacity on multiple appointment bookings at once. It makes managing appointment availability more reliable and avoids interruptions during bulk edits.
Original PR description
Steps to reproduce ================== 1. Go to appointment 2. Pick an appointment having bookings > 1 3. Go to the list view of bookings. 4. Multi edit the capacity_reserved --> Traceback Issue ===== In the inverse function for capacity_reserved, we used self to access resource_total_capacity_reserved. Use event of self to access the attribute. Task- 4680286
Installing the Referrals module no longer fails when all recruitment stages have previously been deleted. This prevents an installation-blocking error and lets businesses enable referrals even after customizing recruitment setup.
Original PR description
Currently a ParseError is arising when the user installs the `hr_referral` module after deleting all Stages in Recruitment/Configuration. Steps to reproduce: --- - Install `hr_recruitment`…
Currently a ParseError is arising when the user installs the `hr_referral` module after deleting all Stages in Recruitment/Configuration.
Steps to reproduce:
---
- Install `hr_recruitment` application (without demo data).
- Delete all `Stages` in Recruitment > Configuration
- Now install `hr_referral` module
Traceback:
---
```
Exception: Cannot update missing record 'hr_recruitment.stage_job3'
ParseError
while parsing /home/odoo/src/enterprise/saas-18.1/hr_referral/data/data.xml:93, somewhere inside <record model="hr.recruitment.stage" id="hr_recruitment.stage_job3">
<field name="use_in_referral">True</field>
</record>
```
The error occurs because the user deleted all `Stages` in Recruitment, and then tried to install the other module.
This commit solves the above issue by using `forcecreate` False to bypass record creation if it violates checks.
https://github.com/odoo/odoo/blob/f5378fadf910d193cbb44a4d1c10a5a15d8b9a51/odoo/tools/convert.py#L364
sentry-5731062091The appointment booking calendar now scales correctly on smaller screens, preventing columns from being cut off or hidden. This makes it easier for visitors using phones or narrow displays to view available times and complete bookings.
Original PR description
The calendar view of appointment booking in smaller screens is overflowing the screen with some columns in the calendar not appearing and cut. Steps to reproduce: - install website and appointment - go to website and go to mobile mode - open an appointment to book The change is tested on all screen sizes supported by google chrome inspect tool. opw-4487796
Studio approval steps no longer fail when a condition uses dynamic date functions such as today or relative dates. This keeps invoice forms usable after configuring approval rules with more flexible date-based criteria.
Original PR description
Currently, an error occurs when using studio to add an approval step with a domain containing a function call, such as `context_today()` or `relativedelta()`. **Steps to produce:** - Install the…
Currently, an error occurs when using studio to add an approval step with a domain containing a function call, such as `context_today()` or `relativedelta()`.
**Steps to produce:**
- Install the `account` and `web_studio` modules.
- Navigate `Invoicing > Customers > Invoices` and open an existing invoice form.
- Activate **Studio mode** and add an approval step on any button.
- In the Code Editor, set a domain like `['&', ('invoice_date', '>=', context_today().strftime('%Y-%m-%d')), ('invoice_date', '<=', (context_today() + relativedelta(months = 1)).strftime('%Y-%m-%d'))]`
- Close Studio mode and return to the invoice form.
- Observe the error.
`ValueError - malformed node or string on line 1: <ast.Call object at 0x7e34e619fd10>`
The error occurs because the `literal_eval` function evaluates literals (e.g., strings, numbers, lists, dicts, ). Function calls like `context_today()` and `relativedelta()` are not valid literals, leading to a `ValueError`.
This commit resolves the issue by wrapping the `literal_eval()` call at [1] in a `try-except` block to catch and bypass errors when the domain contains invalid expressions.
[1] - https://github.com/odoo/enterprise/blob/7fc55313cb25c7c228735ff8323af4177fa9a531/web_studio/models/studio_approval.py#L815
Sentry-6288127324