summaryrefslogtreecommitdiff
path: root/addons/mail/static
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2014-07-06 16:44:26 +0200
committerAntony Lesuisse <al@openerp.com>2014-07-06 17:05:41 +0200
commitcbe2dbb672a6c55d86f2e515f9d1cdfee426ef80 (patch)
treed6ff62b719fce32392397783c961b734b1e4c50e /addons/mail/static
parentd78192c489d3be66cd6487b39f5ce7ba4733a187 (diff)
[MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from bzr to git was not correctly done. The git history contains irrelevant blobs and commits. This branch brings a lot of changes and fixes, too many to list exhaustively. - New orm api, objects are now used instead of ids - Environements to encapsulates cr uid context while maintaining backward compatibility - Field compute attribute is a new object oriented way to define function fields - Shared browse record cache - New onchange protocol - Optional copy flag on fields - Documentation update - Dead code cleanup - Lots of fixes
Diffstat (limited to 'addons/mail/static')
-rw-r--r--addons/mail/static/scripts/__init__.py22
-rwxr-xr-xaddons/mail/static/scripts/openerp_mailgate.py8
-rw-r--r--addons/mail/static/scripts/openerp_mailgate/__init__.py22
-rw-r--r--addons/mail/static/src/js/mail_followers.js4
4 files changed, 6 insertions, 50 deletions
diff --git a/addons/mail/static/scripts/__init__.py b/addons/mail/static/scripts/__init__.py
deleted file mode 100644
index 3b6a8c7e4b0..00000000000
--- a/addons/mail/static/scripts/__init__.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2009-2010 OpenERP SA (<http://www.openerp.com>).
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-import openerp_mailgate \ No newline at end of file
diff --git a/addons/mail/static/scripts/openerp_mailgate.py b/addons/mail/static/scripts/openerp_mailgate.py
index 99ebc8f770b..e3dbdf4adc0 100755
--- a/addons/mail/static/scripts/openerp_mailgate.py
+++ b/addons/mail/static/scripts/openerp_mailgate.py
@@ -30,10 +30,10 @@ import optparse
import sys
import xmlrpclib
import smtplib
-from email.MIMEMultipart import MIMEMultipart
-from email.MIMEBase import MIMEBase
-from email.MIMEText import MIMEText
-from email.Utils import COMMASPACE, formatdate
+from email.mime.multipart import MIMEMultipart
+from email.mime.base import MIMEBase
+from email.mime.text import MIMEText
+from email.utils import COMMASPACE, formatdate
from email import Encoders
class DefaultConfig(object):
diff --git a/addons/mail/static/scripts/openerp_mailgate/__init__.py b/addons/mail/static/scripts/openerp_mailgate/__init__.py
deleted file mode 100644
index de2e2bf390d..00000000000
--- a/addons/mail/static/scripts/openerp_mailgate/__init__.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2009-2010 OpenERP SA (<http://www.openerp.com>).
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-import openerp_mailgate
diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js
index bf83fe6d7c6..bd84dac714d 100644
--- a/addons/mail/static/src/js/mail_followers.js
+++ b/addons/mail/static/src/js/mail_followers.js
@@ -172,8 +172,8 @@ openerp_mail_followers = function(session, mail) {
fetch_generic: function (error, event) {
var self = this;
event.preventDefault();
- return this.ds_users.call('read', [this.session.uid, ['partner_id']]).then(function (results) {
- var pid = results['partner_id'][0];
+ return this.ds_users.call('read', [[this.session.uid], ['partner_id']]).then(function (results) {
+ var pid = results[0]['partner_id'][0];
self.message_is_follower = (_.indexOf(self.value, pid) != -1);
}).then(self.proxy('display_generic'));
},