[IMP] web form: one2many_binary became many2many_binary
bzr revid: chm@openerp.com-20121116112517-yqc9w37iz5yg2xf0
This commit is contained in:
parent
7e5389cc95
commit
6debec3f10
|
@ -5000,14 +5000,14 @@ instance.web.form.FieldBinaryImage = instance.web.form.FieldBinary.extend({
|
|||
* Options on attribute ; "blockui" {Boolean} block the UI or not
|
||||
* during the file is uploading
|
||||
*/
|
||||
instance.web.form.FieldOne2ManyBinaryMultiFiles = instance.web.form.AbstractField.extend({
|
||||
instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractField.extend({
|
||||
template: "FieldBinaryFileUploader",
|
||||
init: function(field_manager, node) {
|
||||
this._super(field_manager, node);
|
||||
this.field_manager = field_manager;
|
||||
this.node = node;
|
||||
if(this.field.type != "one2many" || this.field.relation != 'ir.attachment') {
|
||||
throw "The type of the field '"+this.field.string+"' must be a one2many field with a relation to 'ir.attachment' model.";
|
||||
if(this.field.type != "many2many" || this.field.relation != 'ir.attachment') {
|
||||
throw "The type of the field '"+this.field.string+"' must be a many2many field with a relation to 'ir.attachment' model.";
|
||||
}
|
||||
this.ds_file = new instance.web.DataSetSearch(this, 'ir.attachment');
|
||||
this.fileupload_id = _.uniqueId('oe_fileupload_temp');
|
||||
|
@ -5337,7 +5337,7 @@ instance.web.form.widgets = new instance.web.Registry({
|
|||
'progressbar': 'instance.web.form.FieldProgressBar',
|
||||
'image': 'instance.web.form.FieldBinaryImage',
|
||||
'binary': 'instance.web.form.FieldBinaryFile',
|
||||
'one2many_binary': 'instance.web.form.FieldOne2ManyBinaryMultiFiles',
|
||||
'many2many_binary': 'instance.web.form.FieldMany2ManyBinaryMultiFiles',
|
||||
'statusbar': 'instance.web.form.FieldStatus',
|
||||
'monetary': 'instance.web.form.FieldMonetary',
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue