예제 #1
0
 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)
예제 #2
0
 def _set_image_small(self):
     self.image = tools.image_resize_image_big(self.image_small)
예제 #3
0
 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'))
예제 #4
0
 def _set_image_medium(self):
     self.image = tools.image_resize_image_big(self.image_medium)
예제 #5
0
 def _inverse_image_medium(self):
     for rec in self:
         rec.image = tools.image_resize_image_big(rec.image_medium)
예제 #6
0
 def _inverse_image_small(self):
     for rec in self:
         rec.image = tools.image_resize_image_big(rec.image_small)
예제 #7
0
 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'))
예제 #8
0
 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'))