[IMP] sed -i '' -e 's/connection/session/g'
bzr revid: chs@openerp.com-20120814153053-3bznfj7woq2xi1f1
This commit is contained in:
parent
63e4d9b572
commit
c5dc5cef00
|
@ -31,7 +31,7 @@ openerp.auth_reset_password = function(instance) {
|
|||
},
|
||||
do_reset_password: function(db, email) {
|
||||
var self = this;
|
||||
instance.connection.session_authenticate(db, 'anonymous', 'anonymous', true).pipe(function () {
|
||||
instance.session.session_authenticate(db, 'anonymous', 'anonymous', true).pipe(function () {
|
||||
var func = new instance.web.Model("res.users").get_func("send_reset_password_request");
|
||||
return func(email).then(function(res) {
|
||||
// show message
|
||||
|
|
|
@ -12,7 +12,7 @@ openerp.auth_signup = function(instance) {
|
|||
return false;
|
||||
}
|
||||
|
||||
var cnx = instance.connection;
|
||||
var cnx = instance.session;
|
||||
if (cnx.session_is_valid()) {
|
||||
self._signup();
|
||||
} else {
|
||||
|
@ -83,7 +83,7 @@ openerp.auth_signup = function(instance) {
|
|||
type: 'ir.actions.client',
|
||||
tag: 'login',
|
||||
params: {
|
||||
db: instance.connection.db,
|
||||
db: instance.session.db,
|
||||
login: email,
|
||||
password: password,
|
||||
login_successful: function() {
|
||||
|
|
|
@ -6,7 +6,7 @@ openerp.edi.EdiView = openerp.web.Widget.extend({
|
|||
this._super();
|
||||
this.db = db;
|
||||
this.token = token;
|
||||
this.session = openerp.connection;
|
||||
this.session = openerp.session;
|
||||
this.template = "EdiEmpty";
|
||||
this.content = "";
|
||||
this.sidebar = "";
|
||||
|
@ -108,7 +108,7 @@ openerp.edi.EdiView = openerp.web.Widget.extend({
|
|||
});
|
||||
|
||||
openerp.edi.edi_view = function (db, token) {
|
||||
openerp.connection.session_bind().then(function () {
|
||||
openerp.session.session_bind().then(function () {
|
||||
new openerp.edi.EdiView(null,db,token).appendTo($("body").addClass('openerp'));
|
||||
});
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ openerp.edi.EdiImport = openerp.web.Widget.extend({
|
|||
});
|
||||
|
||||
openerp.edi.edi_import = function (url) {
|
||||
openerp.connection.session_bind().then(function () {
|
||||
openerp.session.session_bind().then(function () {
|
||||
new openerp.edi.EdiImport(null,url).appendTo($("body").addClass('openerp'));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -674,7 +674,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
|
|||
self.$('.loader img').hide();
|
||||
return new instance.web.Model("ir.model.data").get_func("search_read")([['name', '=', 'action_pos_session_opening']], ['res_id'])
|
||||
.pipe( _.bind(function(res){
|
||||
return instance.connection.rpc('/web/action/load', {'action_id': res[0]['res_id']})
|
||||
return instance.session.rpc('/web/action/load', {'action_id': res[0]['res_id']})
|
||||
.pipe(_.bind(function(result){
|
||||
var action = result.result;
|
||||
this.do_action(action);
|
||||
|
|
|
@ -35,19 +35,19 @@ openerp.share = function(session) {
|
|||
}
|
||||
|
||||
function has_share(yes, no) {
|
||||
if (!session.connection.share_flag) {
|
||||
session.connection.share_flag = $.Deferred(function() {
|
||||
if (!session.session.share_flag) {
|
||||
session.session.share_flag = $.Deferred(function() {
|
||||
var func = new session.web.Model("share.wizard").get_func("has_share");
|
||||
func(session.connection.uid).pipe(function(res) {
|
||||
func(session.session.uid).pipe(function(res) {
|
||||
if(res) {
|
||||
session.connection.share_flag.resolve();
|
||||
session.session.share_flag.resolve();
|
||||
} else {
|
||||
session.connection.share_flag.reject();
|
||||
session.session.share_flag.reject();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
session.connection.share_flag.done(yes).fail(no);
|
||||
session.session.share_flag.done(yes).fail(no);
|
||||
}
|
||||
|
||||
/* Extend the Sidebar to add Share and Embed links in the 'More' menu */
|
||||
|
|
|
@ -78,7 +78,7 @@ openerp.web_linkedin = function(instance) {
|
|||
}, _.bind(this.linkedin_disabled, this));
|
||||
},
|
||||
linkedin_disabled: function() {
|
||||
if (instance.connection.uid !== 1) {
|
||||
if (instance.session.uid !== 1) {
|
||||
instance.web.dialog($(QWeb.render("LinkedIn.DisabledWarning")), {
|
||||
title: _t("LinkedIn is not enabled"),
|
||||
buttons: [
|
||||
|
|
Loading…
Reference in New Issue