[IMP] introducing new file type: html

bzr revid: fp@openerp.com-20120804143643-e0331dgtkbxejfmy
This commit is contained in:
Fabien Pinckaers
2012-08-04 16:36:43 +02:00
parent ea52cfae17
commit d07263eed3
2 changed files with 13 additions and 11 deletions
+3 -3
View File
@@ -329,7 +329,7 @@
<field name="view_mode">kanban,tree,form</field>
<field name="context">{"search_default_customer":1}</field>
<field name="search_view_id" ref="view_res_partner_filter"/>
<field name="help" type="xml">
<field name="help" type="html">
<p>
Click to add a contact in your address book.
</p><p>
@@ -368,7 +368,7 @@
<field name="domain">[('customer','=',1)]</field>
<field name="context">{'default_customer':1, 'search_default_customer':1}</field>
<field name="filter" eval="True"/>
<field name="help" type="xml">
<field name="help" type="html">
<p>
Click to add a contact in your address book.
</p><p>
@@ -388,7 +388,7 @@
<field name="view_mode">kanban,tree,form</field>
<field name="context">{'search_default_supplier': 1,'default_customer': 0,'default_supplier': 1}</field>
<field name="filter" eval="True"/>
<field name="help" type="xml">
<field name="help" type="html">
<p>
Click to add a contact in your address book.
</p><p>
+10 -8
View File
@@ -142,18 +142,20 @@ def _eval_xml(self, node, pool, cr, uid, idref, context=None):
except Exception:
_logger.warning('could not eval(%s) for %s in %s' % (a_eval, node.get('name'), context), exc_info=True)
return ""
def _process(s, idref):
m = re.findall('[^%]%\((.*?)\)[ds]', s)
for id in m:
if not id in idref:
idref[id]=self.id_get(cr, id)
return s % idref
if t == 'xml':
def _process(s, idref):
m = re.findall('[^%]%\((.*?)\)[ds]', s)
for id in m:
if not id in idref:
idref[id]=self.id_get(cr, id)
return s % idref
_fix_multiple_roots(node)
return '<?xml version="1.0"?>\n'\
+_process("".join([etree.tostring(n, encoding='utf-8')
for n in node]),
idref)
for n in node]), idref)
if t == 'html':
return _process("".join([etree.tostring(n, encoding='utf-8')
for n in node]), idref)
if t in ('char', 'int', 'float'):
d = node.text
if t == 'int':