diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 121c1f369ff..545d8a6590a 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -190,14 +190,14 @@ class hr_employee(osv.osv): 'image': fields.binary("Photo", help="This field holds the image used as a photo for the "\ "employee. The image is base64 encoded, and PIL-supported. "\ - "It is limited to a 12024x1024 px image."), + "It is limited to a 1024x1024 px image."), 'image_medium': fields.function(_get_image, fnct_inv=_set_image, string="Medium-sized photo", type="binary", multi="_get_image", store = { 'hr.employee': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10), }, help="Medium-sized photo of the employee. It is automatically "\ - "resized as a 180x180px image, with aspect ratio kept. "\ + "resized as a 180x180 px image, with aspect ratio preserved. "\ "Use this field in form views or some kanban views."), 'image_small': fields.function(_get_image, fnct_inv=_set_image, string="Smal-sized photo", type="binary", multi="_get_image", @@ -205,7 +205,7 @@ class hr_employee(osv.osv): 'hr.employee': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10), }, help="Small-sized photo of the employee. It is automatically "\ - "resized as a 50x50px image, with aspect ratio keps. "\ + "resized as a 50x50 px image, with aspect ratio preserved. "\ "Use this field anywhere a small image is required."), 'active': fields.boolean('Active'), 'passport_id':fields.char('Passport No', size=64), @@ -263,13 +263,13 @@ class hr_employee(osv.osv): work_email = self.pool.get('res.users').browse(cr, uid, user_id, context=context).user_email return {'value': {'work_email' : work_email}} - def _get_photo(self, cr, uid, context=None): + def _get_default_image(self, cr, uid, context=None): image_path = addons.get_module_resource('hr', 'images', 'photo.png') return tools.resize_image_big(open(image_path, 'rb').read().encode('base64')) _defaults = { 'active': 1, - 'image': _get_photo, + 'image': _get_default_image, 'marital': 'single', 'color': 0, } diff --git a/addons/mail/mail_group.py b/addons/mail/mail_group.py index a8f944657b2..e40fecc6629 100644 --- a/addons/mail/mail_group.py +++ b/addons/mail/mail_group.py @@ -95,7 +95,7 @@ class mail_group(osv.osv): result[id] = self.message_search(cr, uid, [id], limit=None, domain=[('date', '>=', lower_date)], count=True, context=context) return result - def _get_photo(self, cr, uid, context=None): + def _get_default_image(self, cr, uid, context=None): image_path = openerp.modules.get_module_resource('mail', 'static/src/img', 'groupdefault.png') return tools.resize_image_big(open(image_path, 'rb').read().encode('base64')) @@ -122,7 +122,7 @@ class mail_group(osv.osv): 'mail.group': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10), }, help="Medium-sized photo of the group. It is automatically "\ - "resized as a 180x180px image, with aspect ratio kept. "\ + "resized as a 180x180px image, with aspect ratio preserved. "\ "Use this field in form views or some kanban views."), 'image_small': fields.function(_get_image, fnct_inv=_set_image, string="Smal-sized photo", type="binary", multi="_get_image", @@ -130,7 +130,7 @@ class mail_group(osv.osv): 'mail.group': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10), }, help="Small-sized photo of the group. It is automatically "\ - "resized as a 50x50px image, with aspect ratio keps. "\ + "resized as a 50x50px image, with aspect ratio preserved. "\ "Use this field anywhere a small image is required."), 'member_ids': fields.function(get_member_ids, fnct_search=search_member_ids, type='many2many', relation='res.users', string='Group members', multi='get_member_ids'), @@ -145,7 +145,7 @@ class mail_group(osv.osv): _defaults = { 'public': True, 'responsible_id': (lambda s, cr, uid, ctx: uid), - 'image': _get_photo, + 'image': _get_default_image, } def _subscribe_user_with_group_m2m_command(self, cr, uid, ids, group_ids_command, context=None): diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 93345c45d55..cc09f1f5a93 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -18,8 +18,8 @@ # along with this program. If not, see . # ############################################################################## + import pdb -import io import openerp import addons @@ -27,7 +27,6 @@ import time from datetime import datetime from dateutil.relativedelta import relativedelta import logging -from PIL import Image import netsvc from osv import fields, osv @@ -1207,7 +1206,7 @@ class pos_category(osv.osv): 'pos.category': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10), }, help="Medium-sized image of the category. It is automatically "\ - "resized as a 180x180 px image, with aspect ratio kept. "\ + "resized as a 180x180 px image, with aspect ratio preserved. "\ "Use this field in form views or some kanban views."), 'image_small': fields.function(_get_image, fnct_inv=_set_image, string="Smal-sized image", type="binary", multi="_get_image", @@ -1215,7 +1214,7 @@ class pos_category(osv.osv): 'pos.category': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10), }, help="Small-sized image of the category. It is automatically "\ - "resized as a 50x50 px image, with aspect ratio keps. "\ + "resized as a 50x50 px image, with aspect ratio preserved. "\ "Use this field anywhere a small image is required."), } diff --git a/addons/product/product.py b/addons/product/product.py index 2fe6bea761a..8211615dc3b 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -543,22 +543,22 @@ class product_product(osv.osv): 'image': fields.binary("Image", help="This field holds the image used for the product. "\ "The image is base64 encoded, and PIL-supported. "\ - "It is limited to a 12024x1024 px image."), + "It is limited to a 1024x1024 px image."), 'image_medium': fields.function(_get_image, fnct_inv=_set_image, string="Medium-sized image", type="binary", multi="_get_image", store = { 'product.product': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10), }, help="Medium-sized image of the product. It is automatically "\ - "resized as a 180x180px image, with aspect ratio kept. "\ + "resized as a 180x180 px image, with aspect ratio preserved. "\ "Use this field in form views or some kanban views."), 'image_small': fields.function(_get_image, fnct_inv=_set_image, - string="Smal-sized image", type="binary", multi="_get_image", + string="Small-sized image", type="binary", multi="_get_image", store = { 'product.product': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10), }, help="Small-sized image of the product. It is automatically "\ - "resized as a 50x50px image, with aspect ratio keps. "\ + "resized as a 50x50 px image, with aspect ratio preserved. "\ "Use this field anywhere a small image is required."), 'seller_info_id': fields.function(_calc_seller, type='many2one', relation="product.supplierinfo", multi="seller_info"), 'seller_delay': fields.function(_calc_seller, type='integer', string='Supplier Lead Time', multi="seller_info", help="This is the average delay in days between the purchase order confirmation and the reception of goods for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."),