Fleet Manager for Open ERP(Open Object)

Default value for binary field doesn't displayed in image widget

Reported by Kontaxis Panagiotis on 2010-01-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fleet manager
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_of_image=..................
     return content_of_image
 _defaults = {
   'height05': _get_diag,
   }
 _name = "med.patient.curves"
 _columns = {
   'height05' : fields.binary('height05'),
  }
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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers