added rng grammer for xml validation on views

bzr revid: hda@tinyerp.com-20080814135205-dq6s3zlv7x08998j
This commit is contained in:
hda@tinyerp.com 2008-08-14 19:22:05 +05:30
parent ff5374aaf4
commit c870b69852
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ import os
def _check_xml(self, cr, uid, ids, context={}):
for view in self.browse(cr, uid, ids, context):
eview = etree.fromstring(view.arch)
frng = tools.file_open(os.path.join('base','rng',view.type+'.rng'))
frng = tools.file_open(os.path.join('base','rng','view.rng'))
relaxng = etree.RelaxNG(file=frng)
if not relaxng.validate(eview):
logger = netsvc.Logger()