Changed my mind about method naming

bzr revid: nicolas.vanhoren@openerp.com-20120726095653-bi90exba20x8gu4n
This commit is contained in:
niv-openerp 2012-07-26 11:56:53 +02:00
parent 5d80e9a3e7
commit f6e615cedc
1 changed files with 4 additions and 4 deletions

View File

@ -312,7 +312,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
return $.Deferred().reject();
}
this.datarecord = record;
this._check_mode();
this._actualize_mode();
this.set({ 'title' : record.id ? record.name : "New record" });
if (this.qweb) {
@ -590,15 +590,15 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
}
},
to_view_mode: function() {
this._check_mode("view");
this._actualize_mode("view");
},
to_edit_mode: function() {
this._check_mode("edit");
this._actualize_mode("edit");
},
/**
* Reactualize actual_mode.
*/
_check_mode: function(switch_to) {
_actualize_mode: function(switch_to) {
var mode = switch_to || this.get("actual_mode");
if (! this.datarecord.id)
mode = "create";