diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index 2f2bff92142..ac1a5cd2534 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -329,7 +329,7 @@ kanban,tree,form {"search_default_customer":1} - +

Click to add a contact in your address book.

@@ -368,7 +368,7 @@ [('customer','=',1)] {'default_customer':1, 'search_default_customer':1} - +

Click to add a contact in your address book.

@@ -388,7 +388,7 @@ kanban,tree,form {'search_default_supplier': 1,'default_customer': 0,'default_supplier': 1} - +

Click to add a contact in your address book.

diff --git a/openerp/tools/convert.py b/openerp/tools/convert.py index c2c610c16af..e91cce874d2 100644 --- a/openerp/tools/convert.py +++ b/openerp/tools/convert.py @@ -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 '\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':