Default value for binary field doesn't displayed in image widget
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fleet manager |
New
|
Undecided
|
Unassigned |
Bug Description
I 'm trying to apply a default value (an image file) to a binary field but it doens't displayed on binary and image widget in object's view.
In particular:
1) I set the default value of binary field on the model:
class patient_curves (osv.osv):
def _get_diag(self, cr, uid, context):
content_
return content_of_image
_defaults = {
'height05': _get_diag,
}
_name = "med.patient.
_columns = {
'height05' : fields.
}
patient_curves()
2) In the view, when I'm trying to display the default content of the binary field inside a text widget
<field name="height05" widget="text"/>
I can see the content of the image (in characters)
BUT
when I'm trying to display the default content of the binary field inside a binary or image widget
<field name="height05" widget="image"/> or
<field name="height05"/>
I can't see the the image (or the file). The binary or image widgets are with no content.
(Note that image is successfully displayed when it is generated inside a functional field)
tags: | removed: values |