Jigar Amin  (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-server/trunk-bug-948158-jam into 
lp:openobject-server.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-bug-948158-jam/+merge/104869

Bug Fix : lp:948158 "Diagram view: bug if "source" and "destination" are 
inverted"
The bug description give one way to produce the bug, in-fact the diagram View 
which disconnected and you try to add looped edges on them you will also face 
same issues. The Disconnected graph should tolerate the disconnected graph and 
looped edges on them as well as it should also manage the cyclic instances in 
nodes.
The Fix will Process the disconnected nodes and put them on start y 0 position 
while connected nodes will be processed normally.
Kindly review this.
Thank You.
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-bug-948158-jam/+merge/104869
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/trunk-bug-948158-jam.
=== modified file 'openerp/tools/graph.py'
--- openerp/tools/graph.py	2012-02-22 15:16:53 +0000
+++ openerp/tools/graph.py	2012-08-29 09:19:51 +0000
@@ -449,7 +449,8 @@
             if self.transitions.get(child, False):
                 if last:
                     self.result[child]['y'] = last + len(self.transitions[child])/2 + 1
-                last = self.tree_order(child, last)
+                if node!=child:
+                    last = self.tree_order(child, last)
 
         if rest:
             mid_node = l[no/2]
@@ -530,8 +531,10 @@
 
             if roots:
                 roots.append(self.start)
-                one_level_el = self.tree_list[self.start][0][1]
-                base = self.result[one_level_el]['y']# * 2 / (index + 2)
+                base = 0
+                if self.tree_list[self.start]:
+                    one_level_el = self.tree_list[self.start][0][1]
+                    base = self.result[one_level_el]['y']# * 2 / (index + 2)
 
 
                 no = len(roots)

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to