Skip to content

Commit

Permalink
[MERGE] forward port of branch saas-3 up to ea659cb
Browse files Browse the repository at this point in the history
  • Loading branch information
KangOl committed Jun 24, 2015
2 parents 859eb25 + ea659cb commit b8bf1e0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addons/project/project_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
<filter string="Pending" name="Pending" domain="[('state', '=','pending')]"/>
<filter string="Template" name="Template" domain="[('state', '=','template')]"/>
<separator/>
<filter string="Member" domain="['|',('user_id', '=', uid),('members', '=', uid)]"/>
<filter string="Member" name="Member" domain="['|',('user_id', '=', uid),('members', '=', uid)]"/>
<filter string="Manager" domain="[('user_id','=',uid)]"/>
<separator/>
<filter string="New Mail" name="message_unread" domain="[('message_unread','=',True)]"/>
Expand Down
11 changes: 11 additions & 0 deletions addons/web/static/src/js/view_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -5734,6 +5734,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_
});
}
}
});

Expand Down
3 changes: 3 additions & 0 deletions openerp/addons/base/ir/ir_attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ def _data_get(self, cr, uid, ids, name, arg, context=None):
result[attach.id] = self._file_read(cr, uid, 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):
Expand Down

0 comments on commit b8bf1e0

Please sign in to comment.