fields_view_get return also the fields specified in the attributes of the <calendar> tag

bzr revid: christophe@tinyerp.com-20081105201949-vdej2c2a8uwqqila
This commit is contained in:
Christophe Simonis 2008-11-05 21:19:49 +01:00
parent 18c1258ec3
commit 78a71cc808
1 changed files with 6 additions and 0 deletions

View File

@ -792,6 +792,12 @@ class orm_template(object):
result = self.view_header_get(cr, user, False, node.localName, context)
if result:
node.setAttribute('string', result.decode('utf-8'))
elif node.nodeType==node.ELEMENT_NODE and node.localName == 'calendar':
for additional_field in ('date_start', 'date_delay', 'date_stop', 'color'):
if node.hasAttribute(additional_field) and node.getAttribute(additional_field):
fields[node.getAttribute(additional_field)] = {}
if node.nodeType == node.ELEMENT_NODE and node.hasAttribute('groups'):
if node.getAttribute('groups'):
groups = node.getAttribute('groups').split(',')