From f85fcf03556b77a510bd1dc294d1d63c99ea8d93 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 9 Sep 2010 13:19:05 +0200 Subject: [PATCH] [IMP] orm: removed partial validation of default_focus attribute in fields_view_get It was not correct. and even doing it with XPath is difficult because of nested form views etc. It is easier to have the clients gracefully handle cases where too many default_focus attributes are set instead - just taking the first one is fine bzr revid: odo@openerp.com-20100909111905-mythkbrmc82uq59r --- bin/osv/orm.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 17ec90c0653..32004efaf7c 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1750,10 +1750,6 @@ 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