Repository
OCA/server-ux · module folder · Try on Runboat
Module version
1.0.0
Category
Tools
Folder size
0.14 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/server-ux
Last tracking update
2026-08-07 08:42:53
Authors
Odoo Community Association (OCA), Quartile
Maintainers
Odoo Community Association (OCA), Quartile
Committers
Aungkokolin1997, OCA-git-bot, oca-ci
Odoo dependencies
odoo/odoo:
Python dependencies
None
System dependencies
None
Required by
None
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.

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
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 (6)
  • content_from Char
    help="Set the content (string) to be replaced. e.g. 'Salesperson'." required=True
  • content_to Char
    help="Set your new content (string). e.g. 'Sales Representative'."
  • lang Selection
    default=<expr> help='If no language is selected, the mapping will be applied to all languages.' string='Language' args: _lang_get
  • name Char
    compute='_compute_name' readonly=True store=True
  • report_id Many2one → ir.actions.report
    args: 'ir.actions.report'
  • template_id Many2one → ir.ui.view
    compute='_compute_template_id' domain=[('type', '=', 'qweb')] help='Select the main template of the report / frontend page to be modified.' precompute=True readonly=False required=True store=True args: 'ir.ui.view'
Public methods (1)
  • open_template_mapping(self)

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
checks failing
Open since
371 days ago
Last activity
52 days ago
Repository
OCA/server-ux
Pull request
[17.0][MIG] template_content_swapper: Migration to 17.0 (#1140)
Status
Open migration PR — not merged yet for this version
CI status
green — ready to merge
Open since
316 days ago
Last activity
28 days ago
Repository
OCA/server-ux
Pull request
[19.0][MIG] template_content_swapper: Migration to 19.0 (#1166)