Friday, May 9, 2025
11 changes · 18.0
Resolved issues and error corrections
This fix prevents embedded items, such as files in Knowledge templates, from disappearing when an editable page is opened. It also keeps older or demo embedded file links working when they rely on a direct URL rather than a file identifier.
Original PR description
Prior to this commit, if an inline embedded component block was put as a direct child of the editable, it was removed during `initElementForEdition`, because `isVisible` returned false. However at…
Prior to this commit, if an inline embedded component block was put as a direct child of the editable, it was removed during `initElementForEdition`, because `isVisible` returned false. However at that point, the `embedded_component_plugin` did not yet have the opportunity to fill that embedded component. Therefore, as a prevention measure, all elements with `data-embedded` attribute will always be considered `visible`, as their removal should be at the discretion of the `embedded_component_plugin`. If they happen to have an `inline` style and they are direct children of the editable, they should be wrapped in a baseContainer `div` or `p`, but never removed. Issues of the type were observed when loading a Knowledge template containing a `div` with `data-embedded="file"` since embedded files have since been refactored to use an `inline-block` display style which made them eligible to be removed by `initElementForEdition` prior to the changes introduced in this commit. task-4745902
This fixes an issue in the website recruitment page editor where deleting the “Apply Now!” button text could make the button impossible to edit after saving. Website editors can now safely clear and later update the button text without needing technical help.
Original PR description
Problem: When the "Apply Now!" button text is deleted (e.g., on `jobs/experienced-developer-4`), it becomes uneditable after saving. Cause: Deleting all text inserts a zero-width space (ZWNS) with…
Problem: When the "Apply Now!" button text is deleted (e.g., on `jobs/experienced-developer-4`), it becomes uneditable after saving. Cause: Deleting all text inserts a zero-width space (ZWNS) with `data-oe-zws-empty-inline` attribute. This is removed during save. Since the button has `data-oe-field="arch"` and no content, it's excluded from editable areas in `_getContentEditableAreas`, making it uneditable. This used to work in 17.0 due to the button inheriting `display: block` from its floated parent, adds `br` once content is cleared. Solution: Force `display: block` on the button so that when its text is deleted, a `<br>` is inserted, maintaining its editability. Steps to reproduce: 1. Go to `/jobs/experienced-developer-4`. 2. Open the web editor. 3. Delete the text "Apply Now!" inside the button. 4. Save the page. 5. Reopen the web editor. → The button is now uneditable. opw-4737255 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents an accounting error when Odoo calculates lock dates for companies that have been archived. It ensures archived parent companies are still considered, helping avoid unexpected crashes for users working with inactive company records.
Original PR description
Currently, when we are accessing the `parent_ids` of an archived company with code `company.sudo().parent_ids`, it will return an empty record, and an error will be generated when code tries to…
Currently, when we are accessing the `parent_ids` of an archived company
with code `company.sudo().parent_ids`, it will return an empty record, and an
error will be generated when code tries to access `max()` from that empty
record at code line [1].
```
>>> company = self.env['res.company'].browse(2)
>>> company
res.company(2,)
>>> company.active
False
>>> company.sudo().parent_ids
res.company()
>>> max(c.hard_lock_date or date.min for c in company.sudo().parent_ids)
Traceback (most recent call last):
File "/usr/lib/python3.12/code.py", line 90, in runcode
exec(code, self.locals)
File "<console>", line 1, in <module>
ValueError: max() iterable argument is empty
>>> max(c.hard_lock_date or date.min for c in
company.sudo().with_context(active_test=False).parent_ids)
datetime.date(1, 1, 1)
>>>
>>>
```
This commit fixes the above issue by setting `active_test=False`, which
allows access to `archived (inactive)` parent companies, ensuring that
`company.sudo().parent_ids` includes them and avoids passing an empty
sequence to max()
[1] - https://github.com/odoo/odoo/blob/ac3924508016178427c7962fa3b8e645e7e03835/addons/account/models/company.py#L393
sentry-6581609140Invoices in foreign currencies now recalculate accounting amounts correctly when both the invoice date currency rate and line price are changed. This prevents journal entries from using an outdated price with a new exchange rate, improving financial accuracy.
Original PR description
**Steps to reproduce:** - Install account - Activate a foreign currency (e.g. EUR) - Set at least 2 different currency rates for date1 and date2 - Create an invoice: * Customer: [any] * Invoice Date:…
**Steps to reproduce:** - Install account - Activate a foreign currency (e.g. EUR) - Set at least 2 different currency rates for date1 and date2 - Create an invoice: * Customer: [any] * Invoice Date: date1 * Currency: EUR * Invoice line: [any] - Save the invoice - Check debit and credit amounts in "Journal Items" tab - Change the price of the product and set "Invoice Date" to date2 - Save the invoice - Check debit and credit amounts in "Journal Items" tab **Issue:** The debit and credit amounts have been recomputed with the new currency rate, but the conversion has been applied on the old price. **Cause:** In "_sync_invoice" method, when the currency rate has changed, balance (and subsequently debit/credit) is recomputed from amount_currency. However, in this case, balance should be recomputed completely because the line subtotal has changed and amount_currency is not up-to-date with it. **Solution:** Do not recompute balance based on amount_currency when price_subtotal of a line has changed. In that case, it will be recomputed anyway. opw-4658156 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Cancelled kitchen order tickets in Point of Sale now show the full product display name, including selected attributes. This helps kitchen staff correctly identify cancelled items when products have variants or custom attributes.
Original PR description
Steps to reproduce: ------------------------ - Install POS & setup kitchen printer. - Open session and make an order with instant creation mode attribute product. - Cancel the order. Issue: ------- - In the cancel KOT the attribute name wasn't visible. Cause: --------- - Wrong value passed for display name just simple name was passed instead of display name containing the attribute. FIX: ------ - Corrected the value passed for the display name. Task: 4720599
Batch inventory adjustments no longer risk creating duplicate accounting journal entries. This helps keep inventory valuation and accounting records accurate when multiple stock adjustments are applied together.
Original PR description
Issue ----- Batch applying quantity adjustments creates duplicated journal entries. Steps to reproduce ----- - Create two products with automated valuation and 10 on hand quantity - Go to Inventory > Operations > Physical inventory and create an inventory adjustment for the two products (one positive, one negative) - Select both lines and click on "Adjust All" - Go to accounting > Accounting > Journal items -> Duplicated entries with one using the inventory valuation account and stock input and the other using the valuation account with stock output account Fix ----- This issue has been fixed by commit ce5d303 so just adding a small test to round things up. ----- Tickets: opw-4672011 opw-4677147 opw-4670069
This fixes the printed Purchase Order layout so the totals section lines up correctly again. It reverts a prior report styling change that helped sales documents but unintentionally affected purchase documents.
Original PR description
## Version: 18.0+ ## Issue: Total section on Purchase Order document is misaligned. ## Steps to reproduce: - Go to Purchase: - Open a purchase order record; - Click on Print > Purchase Order. ## Cause: Fix in Sale app changing report styles without considering Purchase app: https://github.com/odoo/odoo/commit/344007299c91d990c851ad9ed6f7fb5f8aa7a273 ## Fix: Full style reverting opw-4771854
Knowledge article templates were updated so file attachments use the same structure as the current editor. This keeps built-in templates cleaner and more consistent without changing existing user content or requiring an upgrade.
Original PR description
This update is done without an upgrade because the old format will still work. But for cleanliness, templates should reflect what the editor will actually do, and since [This commit], files are `span` elements, not `div` anymore, and they are wrapped in a baseContainer (`div` or `p`). [This commit]: https://github.com/odoo/odoo/commit/96c8c398c0fbef519b56edf4941691d11372eac0 task-4745902
The Employee dashboard has been corrected so it only includes employees from the user's company. This prevents figures from other companies from appearing in dashboard results, keeping reporting aligned with company access rules.
Original PR description
Commit odoo/odoo@abd909498e4fd relaxed the multi-company rule for hr.employee (more records are visible). Instead the action domains were updated to include the restricted company rules (see only from your company) The domains in the Employee dashboard was not updated though. It means the dashboard takes into account employees from other companies (as allowed by the ir.rule) opw-4777122
The employee document shortcut now shows only documents the user is allowed to access. This prevents misleading counts and makes the button’s number match what users can actually open.
Original PR description
Previously the smartbutton showed the number of documents the user was a contact of, without checking if the user had access to such documents or not, resulting in sometimes different values Task: 4771754
Fixes an issue where accounting dashboard information could disappear for bank journals connected to online accounts, especially in branch/parent company setups. The update reuses the correct dashboard indicator and ensures credit journals also show the expected synchronization actions.
Original PR description
A previous commit 9b133b2cd03a726d330c87a1227903fc925b0ed5 restricted the view and actions we had on the accounting dashboard for a bank journal from a branch company, if the journal belongs to the parent company. In Odoo 17 the fix made sense, but in Odoo 18, the dashboard data added conflicts with another one, resulting in no data being displayed at all when the journal is connected to an online account. This PR adapts the initial fix to use the existing data (deprecate `show_bank_connect` in favor of `display_connect_bank_in_dashboard`) and adds the 'credit' type journal in the condition for `show_sync_action` to be used by the dashboard data.