Example #1
0
 def _get_image(self, cr, uid, ids, name, args, context=None):
     result = dict.fromkeys(ids, False)
     for obj in self.browse(cr, uid, ids, context=context):
         print tools.image_get_resized_images(obj.product_id.image_medium,
                                              avoid_resize_medium=True)
         result[obj.id] = tools.image_get_resized_images(
             obj.product_id.image_medium, avoid_resize_medium=True)
     return result
Example #2
0
 def onchange_type(self, cr, uid, ids, is_company, context=None):
     # get value as for an onchange on the image
     value = tools.image_get_resized_images(self._get_default_image(cr, uid, is_company, context), return_big=True, return_medium=False, return_small=False)
     value['title'] = False
     if is_company:
         value['parent_id'] = False
         domain = {'title': [('domain', '=', 'partner')]}
     else:
         domain = {'title': [('domain', '=', 'contact')]}
     return {'value': value, 'domain': domain}
 def _get_image(self, cr, uid, ids, name, args, context=None):
     result = dict.fromkeys(ids, False)
     for obj in self.browse(cr, uid, ids, context=context):
         print tools.image_get_resized_images(obj.product_id.image_medium, avoid_resize_medium=True)
         result[obj.id] = tools.image_get_resized_images(obj.product_id.image_medium, avoid_resize_medium=True)
     return result
Example #4
0
 def _get_image(self, cr, uid, ids, name, args, context=None):
     result = dict.fromkeys(ids, False)
     for obj in self.browse(cr, uid, ids, context=context):
         result[obj.id] = tools.image_get_resized_images(obj.image)
     return result
Example #5
0
 def _get_image(self, cr, uid, ids, field_name, arg, context=None):
     res = {}
     for record in self.browse(cr, uid, ids, context=context):
         res[record.id] = tools.image_get_resized_images(
             record.image, avoid_resize_medium=True)
     return res