Skip to content
Health
80/100
good
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 5 months ago
  • Required by5/25
    0 modules depend on it
  • Maturity25/25
    In 4 Odoo series since 15.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
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:
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 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 (8)
  • 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'."
  • domain Char
    help="Optional domain on the report records. The mapping is applied only if the record in the report matches this domain. Example: [('partner_id', '=', 1)]"
  • 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'
  • report_model Char
    compute='_compute_report_model' store=True
  • 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…

Loading…

Loading…