From 5e1c17a3a77f6f7d47d5ef389b0a804a7c6b1f87 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 8 Oct 2013 09:07:42 +0200 Subject: [PATCH] [ADD] docstring about qweb usage bzr revid: xmo@openerp.com-20131008070742-4k1egtvmdvz3pv6e --- openerp/addons/base/ir/ir_qweb.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/openerp/addons/base/ir/ir_qweb.py b/openerp/addons/base/ir/ir_qweb.py index 609f527d7dc..f9b960852f0 100644 --- a/openerp/addons/base/ir/ir_qweb.py +++ b/openerp/addons/base/ir/ir_qweb.py @@ -73,7 +73,18 @@ class QWeb(orm.AbstractModel): - loader: function that return a template + QWeb rendering can be used for many tasks. As a result, customizations + made by one task context (to either the main qweb rendering or to specific + fields rendering) could break other tasks. + To avoid that, ``ir.qweb`` was consciously made inheritable and the "root" + of an object hierarchy. If you need extensions or alterations which could + be incompatible with other subsystems, you should create a local object + inheriting from ``ir.qweb`` and customize that. + + If you need to customize t-fields rendering, subclass the ir.qweb.field + model (and its sub-models) then override :meth:`~.get_converter_for` to + fetch the right field converters for your qweb model. """ _name = 'ir.qweb'