summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8a408f2)
return self.write(cr, uid, [id], {'image': tools.resize_image_big(value)}, context=context)
def onchange_image(self, cr, uid, ids, value, context=None):
return self.write(cr, uid, [id], {'image': tools.resize_image_big(value)}, context=context)
def onchange_image(self, cr, uid, ids, value, context=None):
- return {'value': tools.get_resized_images(value)}
+ return {'value': {'image_medium': tools.resize_image_big(value), 'image_small': tools.resize_image_big(value)}}
_columns = {
'country_id': fields.many2one('res.country', 'Nationality'),
_columns = {
'country_id': fields.many2one('res.country', 'Nationality'),
<field name="arch" type="xml">
<form string="Employee" version="7.0">
<sheet>
<field name="arch" type="xml">
<form string="Employee" version="7.0">
<sheet>
- <field name="image_small" widget='image' class="oe_right" on_change="onchange_image(image_small)"/>
+ <field name="image_small" widget='image' class="oe_right oe_form_field_image_small" on_change="onchange_image(image_small)"/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>