Friday, May 9, 2025
6 changes · 18.0
Resolved issues and error corrections
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-6581609140Cancelled 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
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 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