From bb091a77b0c08964356629df19547de2c9203bd7 Mon Sep 17 00:00:00 2001 From: "Rga (Open ERP)" Date: Fri, 12 Mar 2010 17:22:58 +0530 Subject: [PATCH] [IMP]set default_focus attribute on buttons and fields bzr revid: rga@tinyerp.co.in-20100312115258-2txw1jm58nlog9gw --- bin/addons/base/rng/view.rng | 12 +++++++----- bin/osv/orm.py | 4 ++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/bin/addons/base/rng/view.rng b/bin/addons/base/rng/view.rng index 4f99a03a8c1..69a4cc466d6 100644 --- a/bin/addons/base/rng/view.rng +++ b/bin/addons/base/rng/view.rng @@ -89,7 +89,7 @@ - + @@ -139,7 +139,7 @@ - + @@ -357,6 +357,7 @@ + @@ -429,7 +430,7 @@ - + @@ -442,9 +443,9 @@ - + - + @@ -469,6 +470,7 @@ + diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 7f412be0a7a..44f0bff3a14 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1501,6 +1501,10 @@ class orm_template(object): 'action': resaction, 'relate': resrelate } + if result['type']=='form' and result['arch'].count("default_focus")>1: + msg = "Form View contain more than one default_focus attribute" + netsvc.Logger().notifyChannel('orm', netsvc.LOG_ERROR, msg) + raise except_orm('View Error !',msg) return result _view_look_dom_arch = __view_look_dom_arch