import re
import tools
import base64
+import addons
def one_in(setA, setB):
"""Check the presence of an element of setA in setB
return True
def read_image(self, path):
- icon = tools.file_open(path,'rb').read()
+ file = path.split(',')
+ icon_path = addons.get_module_resource(file[0],file[1])
+ icon = tools.file_open(icon_path,'rb').read()
return base64.encodestring(icon)
def _get_image_icon(self, cr, uid, ids, name, args, context=None):
import os.path
import pickle
import re
-import addons
# for eval context:
import time
values['sequence'] = int(rec.get('sequence'))
if rec.get('icon'):
values['icon'] = str(rec.get('icon'))
-
if rec.get('web_icon'):
- values['web_icon'] = addons.get_module_resource(self.module,str(rec.get('web_icon')))
+ values['web_icon'] = "%s,%s" %(self.module, str(rec.get('web_icon')))
if rec.get('web_icon_hover'):
- values['web_icon_hover'] = addons.get_module_resource(self.module,str(rec.get('web_icon_hover')))
+ values['web_icon_hover'] = "%s,%s" %(self.module, str(rec.get('web_icon_hover')))
if rec.get('groups'):
g_names = rec.get('groups','').split(',')