Skip to main content
Odoo Community Association

Template Content Swapper

Beta License: AGPL-3 OCA/server-ux Translate me on Weblate Try me on Runboat

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.

Table of contents

Configuration

Go to Settings > Technical > User Interface > Template Content Mappings to create/maintain records.

Following fields should be filled in:

  • Report (optional): Report record that includes the string you’d like to replace. Setting a report record will automatically update the template field.

  • Template (required): The main QWeb template (ir.ui.view record) that includes the string you’d like to replace.

  • Language (optional): Target language for string replacement. If left blank, the replacement will be applied to all languages.

  • Content From (required): An existing string to be replaced.

  • Content To (optional): A new string to replace the existing string.

Usage

To use this module, first configure the template content mappings.

image

Then, go to the UI where your configured template is utilized.

image1

image2

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Quartile

Contributors

  • Quartile:

    • Aung Ko Ko Lin

    • Yoshi Tashiro

    • Tatsuki Kanda

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainers:

yostashiro AungKoKoLin1997

This module is part of the OCA/server-ux project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Release files for odoo-addon-template-content-swapper 18.0.1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo-addon-template-content-swapper 18.0.1.1.0
File Interpreter ABI Platform
odoo_addon_template_content_swapper-18.0.1.1.0-py3-none-any.whl Python 3 none any Details

Release files / odoo_addon_template_content_swapper-18.0.1.1.0-py3-none-any.whl

Download URL odoo_addon_template_content_swapper-18.0.1.1.0-py3-none-any.whl
Size 115.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99c33b9d336e12c6b33ae84aeecf765843a42e32b22452846aabdc62da8fe0fc
BLAKE2b-256 checksum
How to use checksums
02e1c4b4b59ea7fe307184a1e6c2830ecbd8e3edab441a8aff7d68d6862bbe1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page