Merge lp:~openerp-dev/openerp-web/7.0-fix-many2many_binary-reload-chm into lp:openerp-web/7.0

Proposed by Christophe Matthieu (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/7.0-fix-many2many_binary-reload-chm
Merge into: lp:openerp-web/7.0
Diff against target: 22 lines (+2/-3)
1 file modified
addons/web/static/src/js/view_form.js (+2/-3)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-fix-many2many_binary-reload-chm
Reviewer Review Type Date Requested Status
Christophe Matthieu (OpenERP) (community) Needs Resubmitting
Review via email: mp+153090@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christophe Matthieu (OpenERP) (chm-openerp) wrote :

[FIX]
for : many2many_binary widget in form view not working properly. when we open form view it dose not show but if we refresh view it will show that.

review: Needs Resubmitting
Revision history for this message
codefans (codefans3) wrote :

another problem, I can not delete the attachment after same

Unmerged revisions

3829. By Christophe Matthieu (OpenERP)

[FIX] form_view: many2many_binary: add missing extention, CompletionFieldMixin and ReinitializeFieldMixin

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/js/view_form.js'
2--- addons/web/static/src/js/view_form.js 2013-03-12 17:05:15 +0000
3+++ addons/web/static/src/js/view_form.js 2013-03-13 09:32:24 +0000
4@@ -5098,7 +5098,7 @@
5 * Options on attribute ; "blockui" {Boolean} block the UI or not
6 * during the file is uploading
7 */
8-instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractField.extend({
9+instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractField.extend(instance.web.form.CompletionFieldMixin, instance.web.form.ReinitializeFieldMixin, {
10 template: "FieldBinaryFileUploader",
11 init: function(field_manager, node) {
12 this._super(field_manager, node);
13@@ -5111,8 +5111,7 @@
14 this.fileupload_id = _.uniqueId('oe_fileupload_temp');
15 $(window).on(this.fileupload_id, _.bind(this.on_file_loaded, this));
16 },
17- start: function() {
18- this._super(this);
19+ initialize_content: function() {
20 this.$el.on('change', 'input.oe_form_binary_file', this.on_file_change );
21 },
22 set_value: function(value_) {