bzr revid: api@openerp.com-20121102133540-274avzvzg1klo6d0
This commit is contained in:
Arnaud Pineux
2012-11-02 14:35:40 +01:00
parent ce8a1831fa
commit a437ed2844
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -225,7 +225,8 @@ class lunch_order(osv.Model):
doc = etree.XML(res['arch'])
node = doc.xpath("//div[@name='preferences']")
to_add = etree.fromstring(text_xml)
node[0].append(to_add)
if node and len(node)>0:
node[0].append(to_add)
res['arch'] = etree.tostring(doc)
return res
+1
View File
@@ -312,6 +312,7 @@
<record model="ir.ui.view" id="orders_tree_view">
<field name="name">Orders Tree View</field>
<field name="model">lunch.order</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Orders Tree">
<field name="date"/>