[REF] 'children' instead of 'childs'

lp bug: https://launchpad.net/bugs/327259 fixed

bzr revid: ls@numerigraphe.fr-20100324163222-dj03gxme8sawtdmz
This commit is contained in:
Numerigraphe - Lionel Sausin 2010-03-24 17:32:22 +01:00
parent 26bb219a74
commit 25a424a89d
4 changed files with 11 additions and 11 deletions

View File

@ -46,8 +46,8 @@ class module_category(osv.osv):
result = dict(cr.fetchall()) result = dict(cr.fetchall())
for id in ids: for id in ids:
cr.execute('select id from ir_module_category where parent_id=%s', (id,)) cr.execute('select id from ir_module_category where parent_id=%s', (id,))
childs = [c for c, in cr.fetchall()] children = [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)) result[id] = reduce(lambda x,y:x+y, [result.get(c, 0) for c in children], result.get(id, 0))
return result return result
_columns = { _columns = {

View File

@ -1085,7 +1085,7 @@ class orm_template(object):
context = {} context = {}
result = False result = False
fields = {} fields = {}
childs = True children = True
if node.tag == 'field': if node.tag == 'field':
if node.get('name'): if node.get('name'):
@ -1100,7 +1100,7 @@ class orm_template(object):
if column: if column:
relation = column._obj relation = column._obj
childs = False children = False
views = {} views = {}
for f in node: for f in node:
if f.tag in ('form', 'tree', 'graph'): if f.tag in ('form', 'tree', 'graph'):
@ -1159,7 +1159,7 @@ class orm_template(object):
if trans: if trans:
node.set('sum', trans) node.set('sum', trans)
if childs: if children:
for f in node: for f in node:
fields.update(self.__view_look_dom(cr, user, f, view_id, context)) fields.update(self.__view_look_dom(cr, user, f, view_id, context))
@ -1966,8 +1966,8 @@ class orm(orm_template):
where += ' order by '+self._parent_order where += ' order by '+self._parent_order
cr.execute('SELECT id FROM '+self._table+' WHERE '+where) cr.execute('SELECT id FROM '+self._table+' WHERE '+where)
pos2 = pos + 1 pos2 = pos + 1
childs = cr.fetchall() children = cr.fetchall()
for id in childs: for id in children:
pos2 = browse_rec(id[0], pos2) pos2 = browse_rec(id[0], pos2)
cr.execute('update '+self._table+' set parent_left=%s, parent_right=%s where id=%s', (pos,pos2,root)) cr.execute('update '+self._table+' set parent_left=%s, parent_right=%s where id=%s', (pos,pos2,root))
return pos2+1 return pos2+1

View File

@ -253,7 +253,7 @@ class document(object):
for el_cld in node: for el_cld in node:
self.parse_node(el_cld, el, v) self.parse_node(el_cld, el, v)
else: 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 not node.tag == etree.Comment:
if node.tag == parent.tag: if node.tag == parent.tag:
el = parent el = parent

View File

@ -489,8 +489,8 @@ class _rml_flowable(object):
return rc1 return rc1
def _table(self, node): def _table(self, node):
childs = utils._child_get(node,self,'tr') children = utils._child_get(node,self,'tr')
if not childs: if not children:
return None return None
length = 0 length = 0
colwidths = None colwidths = None
@ -498,7 +498,7 @@ class _rml_flowable(object):
data = [] data = []
styles = [] styles = []
posy = 0 posy = 0
for tr in childs: for tr in children:
paraStyle = None paraStyle = None
if tr.get('style'): if tr.get('style'):
st = copy.deepcopy(self.styles.table_styles[tr.get('style')]) st = copy.deepcopy(self.styles.table_styles[tr.get('style')])