Template Content Swapper
template_content_swapper · OCA/server-ux
Health
80/100
good
-
Security25/25No findings
-
Activity25/25Last human commit 5 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 4 Odoo series since 15.0
Heuristic over the facts below, not an audit · How it's computed
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.15 MB
Module directory on disk
Code analysis
0 migration notes
2 models
2 views
0 HTTP endpoints
Description
This module offers a generic functionality for replacing QWeb view elements. Typically, element replacements are conducted through a template using an XPATH replacement by creating a new module. With this module, users don't need to do this; they simply need to create template.content.mapping records for the templates they wish to modify.
Examples:
- Replace 'Salesperson' label with 'Sales Representative' in the quotation print.
- Replace 'Add to Cart' button with 'Add to Basket' in the eCommerce product page.
Dependencies
- Odoo dependencies
-
odoo/odoo:- base
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
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 |
|---|---|---|---|---|
view_template_content_mapping_search |
template.content.mapping.search | template.content.mapping | search | New |
view_template_content_mapping_tree |
template.content.mapping.list | template.content.mapping | list | New |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 2
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (8)
-
content_fromCharhelp="Set the content (string) to be replaced. e.g. 'Salesperson'."required=True -
content_toCharhelp="Set your new content (string). e.g. 'Sales Representative'." -
domainCharhelp="Optional domain on the report records. The mapping is applied only if the record in the report matches this domain. Example: [('partner_id', '=', 1)]" -
langSelectiondefault=<expr>help='If no language is selected, the mapping will be applied to all languages.'string='Language' args: _lang_get -
nameCharcompute='_compute_name'readonly=Truestore=True -
report_idMany2one → ir.actions.reportargs: 'ir.actions.report' -
report_modelCharcompute='_compute_report_model'store=True -
template_idMany2one → ir.ui.viewcompute='_compute_template_id'domain=[('type', '=', 'qweb')]help='Select the main template of the report / frontend page to be modified.'precompute=Truereadonly=Falserequired=Truestore=True args: 'ir.ui.view'
-
open_template_mapping(self)
Loading…
Loading…
Loading…
Loading…