Minor change:Covered Root account adding possibility on nested tree algorithm for account.account.

bzr revid: jvo@tinyerp.com-20080814124558-p6fp6fdrrp0l6qzp
This commit is contained in:
Jay Vora
2008-08-14 18:15:58 +05:30
parent c61dd6273e
commit f3108d2471
+1 -1
View File
@@ -2212,7 +2212,7 @@ class orm(orm_template):
pleft = cr.fetchone()[0]
else:
cr.execute('select max(parent_right) from '+self._table)
pleft = cr.fetchone()[0]
pleft = cr.fetchone()[0] or 0
cr.execute('update '+self._table+' set parent_left=%d,parent_right=%d', (pleft+1,pleft+2))
cr.execute('update '+self._table+' set parent_left=parent_left+2 where parent_left>%d', (pleft,))
cr.execute('update '+self._table+' set parent_right=parent_right+2 where parent_right>%d', (pleft,))