Renammed get_field to get_field_desc

bzr revid: nicolas.vanhoren@openerp.com-20121004153400-odaxckppdi1od6mw
This commit is contained in:
niv-openerp 2012-10-04 17:34:00 +02:00
parent aa66a76e77
commit 18cc6542b6
1 changed files with 5 additions and 5 deletions

View File

@ -30,7 +30,7 @@ instance.web.form.FieldManagerMixin = {
/** /**
* Must return the asked field as in fields_get. * Must return the asked field as in fields_get.
*/ */
get_field: function(field_name) {}, get_field_desc: function(field_name) {},
/** /**
* Returns the current value of a field present in the view. See the get_value() method * Returns the current value of a field present in the view. See the get_value() method
* method in FieldInterface for further information. * method in FieldInterface for further information.
@ -1100,7 +1100,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
field.on('focused', null, this.proxy('widgetFocused')) field.on('focused', null, this.proxy('widgetFocused'))
.on('blurred', null, this.proxy('widgetBlurred')); .on('blurred', null, this.proxy('widgetBlurred'));
if (this.get_field(name).translate) { if (this.get_field_desc(name).translate) {
this.translatable_fields.push(field); this.translatable_fields.push(field);
} }
field.on('changed_value', this, function() { field.on('changed_value', this, function() {
@ -1118,7 +1118,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
} }
}); });
}, },
get_field: function(field_name) { get_field_desc: function(field_name) {
return this.fields_view.fields[field_name]; return this.fields_view.fields[field_name];
}, },
get_field_value: function(field_name) { get_field_value: function(field_name) {
@ -2017,7 +2017,7 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w
var self = this var self = this
this._super(field_manager, node); this._super(field_manager, node);
this.name = this.node.attrs.name; this.name = this.node.attrs.name;
this.field = this.field_manager.get_field(this.name); this.field = this.field_manager.get_field_desc(this.name);
this.widget = this.node.attrs.widget; this.widget = this.node.attrs.widget;
this.string = this.node.attrs.string || this.field.string || this.name; this.string = this.node.attrs.string || this.field.string || this.name;
this.options = JSON.parse(this.node.attrs.options || '{}'); this.options = JSON.parse(this.node.attrs.options || '{}');
@ -4630,7 +4630,7 @@ instance.web.form.FieldReference = instance.web.form.AbstractField.extend(instan
get_field: function(name) { get_field: function(name) {
if (name === "selection") { if (name === "selection") {
return { return {
selection: this.field_manager.get_field(this.name).selection, selection: this.field_manager.get_field_desc(this.name).selection,
type: "selection", type: "selection",
}; };
} else if (name === "m2o") { } else if (name === "m2o") {