[MERGE] Merged with main server, updated with trunk-user_img-tde branch.

bzr revid: tde@openerp.com-20120330085400-evsp4n9roisw11ot
This commit is contained in:
Thibault Delavallée 2012-03-30 10:54:00 +02:00
commit 9a550056dc
17 changed files with 281 additions and 134 deletions

View File

@ -27,10 +27,10 @@
parent="base.menu_custom" name="Reporting" sequence="30"
/>
<menuitem id="base.menu_reporting" name="Reporting" sequence="45" groups="base.group_extended"/>
<menuitem id="base.menu_reporting" name="Reporting" sequence="45"/>
<menuitem id="base.menu_reporting_dashboard" name="Dashboards" sequence="0" parent="base.menu_reporting" groups="base.group_extended"/>
<menuitem id="menu_audit" name="Audit" parent="base.menu_reporting" sequence="50"/>
<menuitem id="base.menu_reporting_config" name="Configuration" parent="base.menu_reporting" sequence="100"/>
<menuitem id="menu_audit" name="Audit" parent="base.menu_reporting" sequence="50" groups="base.group_system"/>
<menuitem id="base.menu_reporting_config" name="Configuration" parent="base.menu_reporting" sequence="100" groups="base.group_system"/>
</data>
</openerp>

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

View File

@ -233,7 +233,7 @@ class users(osv.osv):
img = Image.open(image_stream)
img.thumbnail((height, width), Image.ANTIALIAS)
img_stream = StringIO.StringIO()
img.save(img_stream, "JPEG")
img.save(img_stream, "PNG")
return img_stream.getvalue().encode('base64')
def _get_avatar(self, cr, uid, ids, name, args, context=None):
@ -389,8 +389,8 @@ class users(osv.osv):
return result
def _get_avatar(self, cr, uid, context=None):
# default avatar file name: avatar0 -> avatar6.jpg, choose randomly
avatar_path = openerp.modules.get_module_resource('base', 'images', 'avatar%d.jpg' % random.randint(0, 6))
# default avatar file name: avatar0 -> avatar6.png, choose randomly
avatar_path = openerp.modules.get_module_resource('base', 'static/src/img', 'avatar%d.png' % random.randint(0, 6))
return self._avatar_resize(cr, uid, open(avatar_path, 'rb').read().encode('base64'), context=context)
_defaults = {

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB