Saturday, December 21, 2024
9 changes · master
Resolved issues and error corrections
This change updates how Odoo records internal change signals so read-only database checks can work reliably again. It is an internal reliability improvement that helps keep system caches and registry updates coordinated without affecting day-to-day user workflows.
Original PR description
Followup of https://github.com/odoo/odoo/pull/190407 Aims to re-enable readonly cursor by replacing sequence by tables. # Chosen solution: one table per signal Simply replace sequence by a table. The…
Followup of https://github.com/odoo/odoo/pull/190407 Aims to re-enable readonly cursor by replacing sequence by tables. # Chosen solution: one table per signal Simply replace sequence by a table. The only technical change is that the increments became transactional so we need to commit the cursor. Since the cursor is isolated (outside of any other transaction) the behavior should remains almost the same. **Note:** a Date field is add mainly for monitoring, and more flexible garbage collecting. it is not strictly necessary. **Note:** the garbage collection proposes to use `id < max(id) -10`, even if this may looks wrong `id < max(id)` is good enough, the minus 10 will keep a ten-ish history. This doesn't need to be precise, but this should be good enough since we don't expect to have any concurrent update. (signal_changes transaction only inserts row) **This is completely arbitrary and could be replace by `id < max(id)` if it causes any issue.** **This is the solution with the minimal change, good performance, reasonable complexity** # Alternative solutions considered but rejected ## Alternative solution A, one table, one sequence per signal https://github.com/odoo/odoo/compare/master...odoo-dev:odoo:master-fix-signaling-ro-onetable-multisequences-xdo One table, but using one sequence per signal. Manual select nextval and insert. The only difference with solution one is that a single index will be used to get all signals. This complexifies a little table creation. Performances are quite bad with a simple group by, they are equivalent (slighly better) than this solution but with added complexity. ## Alternative solution B: one table, one sequence for all signals **SPOILER:** doesn't work See https://github.com/odoo/odoo/compare/master...odoo-dev:odoo:master-fix-signaling-ro-onetable-xdo for implementation One table for all signals: Instead of creating one table per cache, create a single table with a "key" column for all signals. This simplifies the creation of the table and signal retrieval (one single group by) but we have less information since the sequence is shared among process. This can make invalidating a cache/registry without risking a second invalidation a little tricky. With solution one, we expect to have increment of one. So when invalidating a cache, we can just do `self.cache_sequences[cache_name] += 1` Unfortunately, this is not correct using a single sequence. Lets imagine that the current value of the caches sequences are In memory: ``` registry: 1 default_cache: 2 other_cache: 3 ``` If we invalidate the default_cache, the new in memory value would be 3, but the real new value after the insert would be 4 since 3 was already used by the other_cache. In memory: ``` registry: 1 default_cache: 3 other_cache: 3 ``` This means that on the next request, the default cache will be invalidated on check_signaling since `3 != 4` A workaround for that can be to estimate the next value of the sequence by using the max values of all sequences. `self.cache_sequences[cache_name] = max(*self.cache_sequences.values(), self.registry_sequence) + 1` In memory: ``` registry: 1 default_cache: 4 other_cache: 3 ``` This is better but still not perfect. If another concurrent requests increments another sequence, lets say `other_cache` before the current request increments the `default_cache` Real sequences: In memory: ``` registry: 1 default_cache: 5 other_cache: 4 ``` On next request, 4 != to 5 meaning that both `default_cache` and `other_cache` will be invalidated even if the invalidation for `default_cacheµ came from the current_worker. Taking the id of the inserted record does not work either since we may miss a concurrent update on the same cache. So, solution B could work but has more drawback than solution 1 (IMHO) ## Solution C (not tested), one table, one sequence, but used as a message queue Use a single table but change check mechanism. The main problem with solution 2 is that it is hard to know what signal is coming from where just based on increments. It could be possible to select all signals coming from the table and process them if we have any. The easiest solution could be to store the pid of the process that sent the signal (more simple than keeping a list of sent signal, even if this one is possible too) Instead of incrementing the counter when sending the signal and having one sequence for each signal, we can select all signal above the last checked one. The new sequence is the max of all signals, then we can process all new signals except the one coming from the current process. The major benefit of this solution is that it may allow to have a more precise signal: we could have a message explaining the change. (the module to invalidate, cache key to invalidate, a cache key to remove from cache....) But on the topic of cache invalidation, this may look like a better idea on the paper that it is in reality. **Note** After discussion t looks like this third solution could have some issue regarding order of commit. It is possible that a transaction will consume a sequence, and commit it after another one with a higher sequence Process a: nextval (10) (registry) Process b: nextval (11) (default_cache) process b: commit process b: check signaling (11) process c: check signaling (11) process a: commit process b and c will never see update 10 and miss a registry update
A consistently failing automated test in the Mail area has been skipped while the underlying issue is investigated. This helps keep development and release checks reliable by preventing one known unstable test from blocking other work.
Fixes excessive spacing between form labels and fields on smaller screens, making forms easier to read and use on mobile or narrow displays. It also improves spacing around custom content blocks for a cleaner layout.
Original PR description
This commit fixes the form gap of the grid on small screen and also adds some margin after some custom DIV task-4419604 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The display ribbon now appears in the correct top-right position in affected kanban cards and modal forms. This improves visual consistency and avoids confusing or unpolished layouts for users working in Web and Mail views.
Original PR description
[FIX] web,mail: ribbon misplaced in some kanban This commit sets fixed position and adapts some kanban so the ribbon is placed correctly. task-4330690 [FIX] web: ribbon in modal form This commit adds a CSS specific rule when there is a ribbon in a form's modal as there is no border when the form is in the modal so the ribbon seems ugly (pinned not at the top right). So we change the stacking context to an ancestor DIV. task-4330690 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes test selection so a test file name tag can run the matching test file in any module, instead of requiring the full module path. It restores a previous behavior and makes internal testing workflows more reliable for development teams.
Original PR description
Restore the behaviour where running using a tag "/test_xx.py" executes that test file in any module. Right now, only an exact path relative from odoo.addons to the file works ("/mymodule/tests/test_xx.py").
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fixes a display issue in Accounting where lists inside the tax form did not stretch across the full form width. Users configuring taxes now get a clearer, easier-to-read layout without wasted space.
Original PR description
This commit fixes some ARCH to fixes some visual issue. Inside a group (grid) there will be always two columns: * one smaller on the left (max 150px) * one taking all the remaining space on the right. When we add only one element with `nolabel="1"` it will take one part of the grid to take all the space we need to specify it with `colspan="2"`. Steps to reproduce: * Go to Accounting App * Go to menu Configuration -> Taxes * Select a Taxes The list view inside the form not taking all space => BUG task-4416643 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Rental Prices section on rental products now displays its list across the full available space. This fixes a visual layout issue so users can read and manage rental pricing more comfortably.
Original PR description
This commit fixes some ARCH to fixes some visual issue. Inside a group (grid) there will be always two columns: * one smaller on the left (max 150px) * one taking all the remaining space on the right. When we add only one element with `nolabel="1"` it will take one part of the grid to take all the space we need to specify it with `colspan="2"`. Steps to reproduce: * Go to Sale App * Go to menu Product * Select a Product (with Rental) * Select the `Rental prices` pane The list view inside the form not taking all space => BUG task-4416643
French localization features now use the standard company registry identifier instead of the older SIRET-specific field. This helps keep payroll, VAT, Intrastat, and reporting outputs consistent with the current company record and reduces the risk of incorrect registration details.
Original PR description
The company_registry should be used instead. task-4204049
The cart no longer shows the Avatax tax control icon when the Avatax integration is turned off. This avoids confusing point-of-sale users with an option that is not available for their current setup.
Original PR description
This commit removes the Avatax tax control icon from the cart when the Avatax integration is not active. Task ID: 4365326