Monday, March 31, 2025
8 changes · 18.0
Enhancements to existing features
This pull request appears to remove or adjust branding around Google and Microsoft calendar integrations while also including a broad set of Odoo fixes and improvements. Business impact includes cleaner product presentation, improved accounting/localization reports, better spreadsheet behavior, and fixes to purchasing, repairs, and manufacturing workflows.
Original PR description
Debranding il_google_calendar and il_miscrosoft_calendar - create a new PR
Resolved issues and error corrections
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 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
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
The 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