Skip to content

18.0 add base_url: mixin tool for managing url and redirection without id#3591

Draft
sebastienbeau wants to merge 51 commits into
OCA:18.0from
akretion:18.0-add-url-2
Draft

18.0 add base_url: mixin tool for managing url and redirection without id#3591
sebastienbeau wants to merge 51 commits into
OCA:18.0from
akretion:18.0-add-url-2

Conversation

@sebastienbeau
Copy link
Copy Markdown
Member

@sebastienbeau sebastienbeau commented Apr 1, 2026

Add a base_url, generic module for

TODO

  • add some extra documentation
  • remove dependency on base_sparse_field_list_support (use native Json field)
  • add develop.md with documentation and exemple

@sebastienbeau sebastienbeau marked this pull request as draft April 1, 2026 22:42
This project was initial build for shopinvader as we need to have uniq url for the connected webshop.
But this concept can be reuse in other case and even replace the odoo url implementation.


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add a DEVELOP.md file to explain how to implement this mixin ?

thanks !

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks for the suggestion, I will created it and add example

Copy link
Copy Markdown

@arnaudlayec arnaudlayec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EBII and others added 18 commits May 11, 2026 09:59
Moreover this generate a random issue.

If you want to reproduce this random issue you can make it not random
by forcing the processing of the todo. You can take the following code

diff --git a/odoo/api.py b/odoo/api.py
index 413a6b8..bb63ba8 100644
--- a/odoo/api.py
+++ b/odoo/api.py
@@ -937,6 +937,11 @@ class Environment(Mapping):
             The field is such that none of its dependencies must be
recomputed.
         """
         field = min(self.all.todo, key=self.registry.field_sequence)
+        if str(field) == 'shopinvader.category.index_id':
+            if len(self.all.todo) > 1:
+                for f in self.all.todo:
+                    if str(f) != 'shopinvader.category.index_id':
+                        field = f
         return field, self.all.todo[field][0]

     def check_cache(self):
… product should be able to do it even if the product is online
… safely allows the triggeer of field computation by concrete models
simahawk and others added 23 commits May 11, 2026 09:59
Computation was broken when the parent binding was archived.
Moreover this commit eases overrides of depends for the computation.
performance issue, add index
Now we do not have binding anymore, need a new implementation
The dependency on base_sparse_field_list_support is required since we use a Serialized field to store list of values
This is required to avoid race condition when running tests if the base_sparse_field addon has not yet patch the odoo.fields namespace to register the Serialized field class
In a compute method, we must assign a value to the computed field only if it's different from the original one. Otherwise, the write method will be called every time.
Dropped base_sparse_field_list_support dependency.
Use standard odoo slugify.
Tests the computed fields.
Documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.