[MERGE] forward port of branch 7.0 up to 16a545b

This commit is contained in:
Christophe Simonis 2015-06-24 12:34:03 +02:00
commit ea659cbd87
3 changed files with 15 additions and 1 deletions

View File

@ -189,7 +189,7 @@
<filter icon="gtk-media-pause" string="Pending" name="Pending" domain="[('state', '=','pending')]" help="Pending Projects"/>
<filter icon="gtk-media-pause" string="Template" name="Template" domain="[('state', '=','template')]" help="Templates of Projects"/>
<separator/>
<filter icon="terp-personal+" string="Member" domain="['|',('user_id', '=', uid),('members', '=', uid)]" help="Projects in which I am a member."/>
<filter icon="terp-personal+" string="Member" name="Member" domain="['|',('user_id', '=', uid),('members', '=', uid)]" help="Projects in which I am a member."/>
<separator/>
<filter string="Project(s) Manager" domain="[('user_id','=',uid)]" help="Projects in which I am a manager" icon="terp-personal"/>
<field name="user_id" string="Project Manager"/>

View File

@ -5390,6 +5390,17 @@ instance.web.form.FieldBinaryFile = instance.web.form.FieldBinary.extend({
this._super.apply(this, arguments);
this.$el.find('input').eq(0).val('');
this.set_filename('');
},
set_value: function(value_){
var changed = value_ !== this.get_value();
this._super.apply(this, arguments);
// Trigger value change if size is the same
if (!changed){
this.trigger("change:value", this, {
oldValue: value_,
newValue: value_
});
}
}
});

View File

@ -133,6 +133,9 @@ class ir_attachment(osv.osv):
result[attach.id] = self._file_read(cr, uid, location, attach.store_fname, bin_size)
else:
result[attach.id] = attach.db_datas
if bin_size:
result[attach.id] = int(result[attach.id])
return result
def _data_set(self, cr, uid, id, name, value, arg, context=None):