Base Url
base_url · OCA/server-tools
-
Security25/25No findings
-
Activity25/25Last human commit 6 months ago
-
Required by15/251 module depends on it
-
Maturity5/25In 1 Odoo series since 18.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
UrlUrl— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. migration-sql-constraints · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
The aim of this module is to provide a generic mixin for building urls on records.
The native odoo implementation of a record url is based on having an "id" in the url, this module provides an alternative way of doing it. Urls are generated and stored in an unique table (to ensure unicity). Redirections are also managed in case of url changes.
This project was initial build for shopinvader as we need to have unique url for the connected webshop. But this concept can be reused in other cases and even replace the odoo url implementation.
Dependencies
- Odoo dependencies
-
odoo/odoo:- base
- Python dependencies
- None
- System dependencies
- None
- Required by
- oca_search_engine
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 2
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
url_view_form |
url.url | form | New | |
url_view_tree |
url.url | list | New |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 2
-
count_urlIntegercompute='_compute_count_url' -
redirect_url_keyJsoncompute='_compute_url_key'string='Redirect Url Keys' -
url_idsOne2many → url.urlargs: 'url.url', 'res_id' -
url_keyCharcompute='_compute_url_key' -
url_need_refreshBooleancompute='_compute_url_need_refresh'readonly=Falsestore=True
-
open_url(self) -
unlink(self) -
write(self, vals)
-
keyCharindex=Truerequired=True -
lang_idMany2one → res.langindex=Truerequired=Truestring='Lang' args: 'res.lang' -
manualBooleandefault=Truereadonly=True -
need_refreshBoolean -
redirectBooleanhelp='If tick this url is a redirection to the new url' -
referentialSelectiondefault='global'index=Truerequired=Trueselection=<expr> -
res_idMany2oneReferencehelp='ID of the target record in the database'index=Truemodel_field='res_model_field'readonly=Truestring='Record ID' -
res_modelSelectionindex=Truereadonly=Trueselection=<expr> -
res_model_fieldCharcompute='_compute_res_model_field'readonly=Truestore=Truestring='Model Name'
-
init(self)