odoo/addons/web
Nicolas Lempereur 1942522969 [FIX] base: update File Content for binary field
To distinguish two ir.attachment 'File Content', we base it on the file
size (this I imagine is for efficiency).

This is done by setting bin_size in the context. Doing this, the
returned db_datas field will be the file size of the converted to base64
content (if no filestore).

But this size is returned in string format, so "get_nice_size" (in
openerp/osv/fields.py) which gets this size calculates the length of the
string. e.g: if the size is '2142' get_nice_size will return 4.

This fix solves this by converting the string to an integer, thus
unifying it with the filestore case (where we use os.path.getsize which
return an integer).

Also, the field presenting the issue (FieldBinaryFile) has been changed
so it is always updated even if the size is the same (as it was already
done by 3632949 for FieldBinaryImage widget).

closes #7223
opw-643071
2015-06-23 15:20:33 +02:00
..
cli [FIX] test_js typo 2012-12-09 05:30:15 +01:00
controllers [FIX] web: With safari, UnicodeDecodeError 2015-05-13 16:56:12 +02:00
doc [IMP] PNG recompression 2013-06-05 14:43:27 +02:00
i18n [I18N] Update translations from Transifex 2015-05-29 18:28:10 +02:00
static [FIX] base: update File Content for binary field 2015-06-23 15:20:33 +02:00
tests [FIX] test: correct Mock of search_read 2014-01-23 18:08:36 +01:00
__init__.py minor fixes 2012-12-19 03:49:46 +01:00
__openerp__.py [FIX] correctly handle group_by_no_leaf when no grouping applied 2013-04-16 11:23:44 +02:00
http.py [FIX]Refixed the issue of oe_sessions_effectiveusername storage in temp, used geteuid which returns effective user id. 2013-05-30 14:38:14 +05:30
session.py [IMP] clean permissions and shebang in files 2013-05-14 12:37:36 +02:00