[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
This commit is contained in:
Olivier Dony
2010-09-09 13:19:05 +02:00
parent 245ace0a3b
commit f85fcf0355
-4
View File
@@ -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