def _set_image(self, cr, uid, id, name, value, args, context=None): return self.write(cr, uid, [id], {'image': tools.image_resize_image_big(value)}, context=context)
def _set_image_small(self): self.image = tools.image_resize_image_big(self.image_small)
def _get_default_image(self): image_path = modules.get_module_resource('mail', 'static/src/img', 'groupdefault.png') return tools.image_resize_image_big( open(image_path, 'rb').read().encode('base64'))
def _set_image_medium(self): self.image = tools.image_resize_image_big(self.image_medium)
def _inverse_image_medium(self): for rec in self: rec.image = tools.image_resize_image_big(rec.image_medium)
def _inverse_image_small(self): for rec in self: rec.image = tools.image_resize_image_big(rec.image_small)
def _get_default_image(self, cr, uid, context=None): image_path = get_module_resource('hr', 'static/src/img', 'default_image.png') return tools.image_resize_image_big( open(image_path, 'rb').read().encode('base64'))
def _default_image(self): image_path = yuancloud.modules.get_module_resource('im_livechat', 'static/src/img', 'default.png') return tools.image_resize_image_big(open(image_path, 'rb').read().encode('base64'))