From 9555b32c7b8f7a064e3b7403e15fc4b8ca47bbc5 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 27 May 2014 12:20:04 +0200 Subject: [PATCH] [IMP] add some more explanations for the behavior of the mode attribute on views --- openerp/addons/base/ir/ir_ui_view.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/openerp/addons/base/ir/ir_ui_view.py b/openerp/addons/base/ir/ir_ui_view.py index 2e568808b70..9808adf50ac 100644 --- a/openerp/addons/base/ir/ir_ui_view.py +++ b/openerp/addons/base/ir/ir_ui_view.py @@ -144,8 +144,17 @@ class view(osv.osv): 'mode': fields.selection( [('primary', "Base view"), ('extension', "Extension View")], - string="View inheritance mode", - required=True), + string="View inheritance mode", required=True, + help="""Only applies if this view inherits from an other one (inherit_id is not False/Null). + +* if extension (default), if this view is requested the closest primary view + is looked up (via inherit_id), then all views inheriting from it with this + view's model are applied +* if primary, the closest primary view is fully resolved (even if it uses a + different model than this one), then this view's inheritance specs + () are applied, and the result is used as if it were this view's + actual arch. +"""), } _defaults = { 'mode': 'primary',