Daily updates from Odoo
Thursday, January 1, 2026
2 changes · 18.0
Resolved issues and error corrections
This update resolves an issue where removing an icon from a paragraph would leave it unusable. The fix ensures that paragraphs remain editable and accessible after icon removal, improving the user experience. It also addresses a bug where pressing 'Enter' before an icon wouldn't insert a new paragraph.
Original PR description
**Issue 1:** Steps to reproduce: - Insert a icon in an empty paragraph. - Remove the inserted icon. - The paragraph becomes unreachable. Cause: - When a paragraph contains only an icon, removing that…
**Issue 1:** Steps to reproduce: - Insert a icon in an empty paragraph. - Remove the inserted icon. - The paragraph becomes unreachable. Cause: - When a paragraph contains only an icon, removing that icon during the delete process does not trigger `fillEmpty`. As a result, the paragraph ends up with no content, leaving it empty and unreachable. Solution: - During the delete process, after the icon is removed, call the `fillEmpty` method. This ensures that if the block becomes empty, a `<br>` is inserted inside the paragraph, keeping it accessible. **Issue 2:** Steps to reproduce - Insert an icon in an empty paragraph. - Place the cursor before the icon. - Press Enter. - Nothing happens. Cause - When the cursor is placed before a `contenteditable=false` element, `getDeepRange` sets the selection deep inside the non-editable element as a result, when Enter is pressed, the action is ignored because the selection is not in an editable context. Solution - Instead of setting the selection inside `getDeepRange`, set the selection after calling `getDeepRange` only if the returned range is not within a `contenteditable=false` element. task-3540454 Forward-Port-Of: odoo/odoo#241052 Forward-Port-Of: odoo/odoo#237891
This update resolves a previous issue where MRP planning tests were failing on weekends due to the absence of work intervals. The fix now includes a fallback for Friday, ensuring consistent test results. Additionally, the test performance has been significantly improved by reducing the planning timeframe, resulting in faster test execution.
Original PR description
overlook of https://github.com/odoo/odoo/pull/239717 ### Before this commit: Runbot was red on weekends, as there are no work intervals on weekends. ### After this commit: Use Friday as a fallback on…
overlook of https://github.com/odoo/odoo/pull/239717
### Before this commit:
Runbot was red on weekends, as there are no work intervals on weekends.
### After this commit:
Use Friday as a fallback on weekends. In addition, improve the test performance by mocking the total number of weeks of planning to 2 instead of 50 (before: 6s, after: 1s).
runbot-237575
---
Note: ran the test for the next 5 years, and it works :+1:
```diff
diff --git a/addons/mrp/tests/test_bom.py b/addons/mrp/tests/test_bom.py
index 7acf19e89add..bfadc8e487c1 100644
--- a/addons/mrp/tests/test_bom.py
+++ b/addons/mrp/tests/test_bom.py
@@ -13,6 +13,7 @@ from odoo.tests.common import HttpCase, tagged, freeze_time
from odoo.tools import float_compare, float_round, float_repr
+@tagged("-at_install", "post_install")
@freeze_time(fields.Date.today())
class TestBoM(TestMrpCommon):
@@ -963,6 +964,16 @@ class TestBoM(TestMrpCommon):
self.assertEqual(report_values['lines']['operations_time'], 15.0)
self.assertEqual(report_values['lines']['producible_qty'], 2)
+ def test_bom_report_planning_with_producible_qty_loop(self):
+ from datetime import date # noqa: PLC0415
+ start, stop = date.today(), date.fromisoformat("2031-01-01")
+ with freeze_time(start) as frozen_date:
+ for i in range((stop - start).days):
+ print("date:", str(date.today()))
+ with self.subTest(str(date.today())):
+ self.test_bom_report_planning_with_producible_qty()
+ frozen_date.tick(timedelta(days=1))
+
def test_21_bom_report_variant(self):
""" Test a sub BoM process with multiple variants.
BOM 1:
```