result = dict(cr.fetchall())
for id in ids:
cr.execute('select id from ir_module_category where parent_id=%s', (id,))
- childs = [c for c, in cr.fetchall()]
- result[id] = reduce(lambda x,y:x+y, [result.get(c, 0) for c in childs], result.get(id, 0))
+ children = [c for c, in cr.fetchall()]
+ result[id] = reduce(lambda x,y:x+y, [result.get(c, 0) for c in children], result.get(id, 0))
return result
_columns = {
context = {}
result = False
fields = {}
- childs = True
+ children = True
if node.tag == 'field':
if node.get('name'):
if column:
relation = column._obj
- childs = False
+ children = False
views = {}
for f in node:
if f.tag in ('form', 'tree', 'graph'):
if trans:
node.set('sum', trans)
- if childs:
+ if children:
for f in node:
fields.update(self.__view_look_dom(cr, user, f, view_id, context))
where += ' order by '+self._parent_order
cr.execute('SELECT id FROM '+self._table+' WHERE '+where)
pos2 = pos + 1
- childs = cr.fetchall()
- for id in childs:
+ children = cr.fetchall()
+ for id in children:
pos2 = browse_rec(id[0], pos2)
cr.execute('update '+self._table+' set parent_left=%s, parent_right=%s where id=%s', (pos,pos2,root))
return pos2+1
for el_cld in node:
self.parse_node(el_cld, el, v)
else:
- # if there is no "type" attribute in the node, copy it to the xml data and parse its childs
+ # if there is no "type" attribute in the node, copy it to the xml data and parse its children
if not node.tag == etree.Comment:
if node.tag == parent.tag:
el = parent
return rc1
def _table(self, node):
- childs = utils._child_get(node,self,'tr')
- if not childs:
+ children = utils._child_get(node,self,'tr')
+ if not children:
return None
length = 0
colwidths = None
data = []
styles = []
posy = 0
- for tr in childs:
+ for tr in children:
paraStyle = None
if tr.get('style'):
st = copy.deepcopy(self.styles.table_styles[tr.get('style')])