[FIX] remove Login usage from edi module
bzr revid: fme@openerp.com-20140113152410-p32djnzq80xgh0o7
This commit is contained in:
parent
f319a68196
commit
bbfae00dde
|
@ -1,6 +1,7 @@
|
||||||
openerp.edi = function(instance) {
|
openerp.edi = function(instance) {
|
||||||
var _t = instance.web._t;
|
var _t = instance.web._t;
|
||||||
instance.edi = {}
|
instance.edi = {};
|
||||||
|
|
||||||
|
|
||||||
instance.edi.EdiImport = instance.web.Widget.extend({
|
instance.edi.EdiImport = instance.web.Widget.extend({
|
||||||
|
|
||||||
|
@ -10,11 +11,7 @@ instance.edi.EdiImport = instance.web.Widget.extend({
|
||||||
},
|
},
|
||||||
start: function() {
|
start: function() {
|
||||||
if (!this.session.session_is_valid()) {
|
if (!this.session.session_is_valid()) {
|
||||||
this.show_login();
|
instance.redirect('/web/login?redir=' + encodeURIComponent(window.location));
|
||||||
this.session.on_session_valid.add({
|
|
||||||
callback: this.proxy('show_import'),
|
|
||||||
unique: true,
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
this.show_import();
|
this.show_import();
|
||||||
}
|
}
|
||||||
|
@ -25,12 +22,6 @@ instance.edi.EdiImport = instance.web.Widget.extend({
|
||||||
this.do_import();
|
this.do_import();
|
||||||
},
|
},
|
||||||
|
|
||||||
show_login: function() {
|
|
||||||
this.destroy_content();
|
|
||||||
this.login = new instance.web.Login(this);
|
|
||||||
this.login.appendTo(this.$el);
|
|
||||||
},
|
|
||||||
|
|
||||||
destroy_content: function() {
|
destroy_content: function() {
|
||||||
_.each(_.clone(this.getChildren()), function(el) {
|
_.each(_.clone(this.getChildren()), function(el) {
|
||||||
el.destroy();
|
el.destroy();
|
||||||
|
|
Loading…
Reference in New Issue