summaryrefslogtreecommitdiff
path: root/addons/analytic_user_function/analytic_user_function_view.xml
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2015-06-23 11:46:20 +0200
committerNicolas Lempereur <nle@odoo.com>2015-06-23 15:20:33 +0200
commit1942522969753e29ace00125e9f6186f66905588 (patch)
tree48c2e6e9ef097c8f166b2c5912f9ac914878a6b3 /addons/analytic_user_function/analytic_user_function_view.xml
parent6acd5ef91c3ee6d82679d68a9701d87fc2776a50 (diff)
[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
Diffstat (limited to 'addons/analytic_user_function/analytic_user_function_view.xml')
0 files changed, 0 insertions, 0 deletions