diff --git a/addons/processus/processus_view.xml b/addons/processus/processus_view.xml index 46033d4fb06..3eac5892874 100644 --- a/addons/processus/processus_view.xml +++ b/addons/processus/processus_view.xml @@ -92,7 +92,7 @@
- + @@ -134,7 +134,7 @@ - + diff --git a/addons/processus/report/processus_print.py b/addons/processus/report/processus_print.py index 6aa800cd218..f7f6b83fe40 100644 --- a/addons/processus/report/processus_print.py +++ b/addons/processus/report/processus_print.py @@ -4,10 +4,12 @@ import ImageDraw import ImageFont import math +import addons + ROUNDED = 30 BGCOLOR = (228,233,237) TITLECOLOR = (150,70,70) -FONT = 'addons/processus/report/sb.ttf' +FONT = addons.get_module_resource('processus', 'report/sb.ttf') BOXSIZE = (160,120) size = 800,600 @@ -127,24 +129,25 @@ class graph(object): def node(self, x, y, data, start_color=False): self.draw.node(x,y,BOXSIZE[0], BOXSIZE[1], data.get('title','Unknown'), start_color and (255,125,125) or BGCOLOR) - self.draw.picture(x+35, y+BOXSIZE[1]-5, 'addons/processus/report/gtk-help.png') + self.draw.picture(x+35, y+BOXSIZE[1]-5, addons.get_module_resource('processus', 'report/gtk-help.png')) if start_color: - self.draw.picture(x+65, y+BOXSIZE[1]-5, 'addons/processus/report/gtk-open.png') - self.draw.picture(x+95, y+BOXSIZE[1]-5, 'addons/processus/report/gtk-print.png') + self.draw.picture(x+65, y+BOXSIZE[1]-5, addons.get_module_resource('processus', 'report/gtk-open.png')) + self.draw.picture(x+95, y+BOXSIZE[1]-5, addons.get_module_resource('processus', 'report/gtk-print.png')) y = y+25 menus = data.get('menu','').split('/') while menus: menu = menus.pop(0) if menu: if menus: menu=menu+' /' - self.draw.draw_text(x+23, y, 10, menu, color=(0,0,0), maxlength=BOXSIZE[0] - 25, font_name='addons/processus/report/ds.ttf') + self.draw.draw_text(x+23, y, 10, menu, color=(0,0,0), maxlength=BOXSIZE[0] - 25, + font_name=addons.get_module_resource('processus', 'report/ds.ttf')) y+=15 def arrow_role(self, node_from, node_to, role='Hello'): start = (node_from[0]+BOXSIZE[0]/2, node_from[1]+BOXSIZE[1]/2) stop = (node_to[0]+BOXSIZE[0]/2, node_to[1]+BOXSIZE[1]/2) (x,y) = self.draw.arrow_role(start, stop, role) - self.draw.picture(x, y-3, 'addons/processus/report/role.png') + self.draw.picture(x, y-3, addons.get_module_resource('processus', 'report/role.png')) self.draw.draw_text(x,y-3, 12, 'Salesman', color=(0,0,0), center=True) def arrow(self, node_from, node_to):