Browse Source

[FIX] 9.0 travis fix (#59)

* [FIX] autopep8

* [FIX] CamelCase

* [FIX] relative-import

* [FIX] delete unused imports

* [FIX] delete prints

* [FIX] fix comments

* [FIX] lint for js

* [FIX] Add the first line (coding) in py-files

* [FIX] Duplicate implicit target name: "changelog"

* [FIX] links in rst files

* [FIX] flake8 F841

* [FIX] flake8 F401

* [FIX] triple underscore
pull/66/head
manawi 8 years ago
committed by Ivan Yelizariev
parent
commit
961e27654b
  1. 2
      mail_all/tests/__init__.py
  2. 1
      mail_all/tests/test_js.py
  3. 2
      mail_archives/tests/__init__.py
  4. 1
      mail_archives/tests/test_js.py
  5. 2
      mail_base/README.rst
  6. 2
      mail_base/__init__.py
  7. 14
      mail_base/static/src/js/base.js
  8. 2
      mail_move_message/controllers/main.py
  9. 4
      mail_move_message/mail_move_message_models.py
  10. 8
      mail_move_message/static/src/js/mail_move_message.js
  11. 2
      mail_recovery/static/src/js/mail_recovery.js
  12. 4
      mail_reply/README.rst
  13. 4
      mail_reply/doc/changelog.rst
  14. 2
      mail_sent/tests/__init__.py
  15. 1
      mail_sent/tests/test_js.py
  16. 4
      mail_to/doc/changelog.rst
  17. 6
      mailgun/README.rst
  18. 4
      mailgun/__init__.py
  19. 2
      mailgun/controllers/__init__.py
  20. 4
      mailgun/controllers/main.py
  21. 4
      mailgun/doc/changelog.rst
  22. 6
      mailgun/models.py

2
mail_all/tests/__init__.py

@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
import test_js
from . import test_js

1
mail_all/tests/test_js.py

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import openerp.tests

2
mail_archives/tests/__init__.py

@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
import test_js
from . import test_js

1
mail_archives/tests/test_js.py

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import openerp.tests

2
mail_base/README.rst

@ -14,6 +14,6 @@ Further information
-------------------
Due to odoo restrictions, module makes mail initialization again. That is browser loads emoji and other chat data twice. This is the only way to make Mail feature extendable.
One can say, that the module do this todo from `addons/mail/static/src/js/chat_manager.js <https://github.com/odoo/odoo/blob/9.0/addons/mail/static/src/js/chat_manager.js#L57>`_
One can say, that the module do this todo from `addons/mail/static/src/js/chat_manager.js <https://github.com/odoo/odoo/blob/9.0/addons/mail/static/src/js/chat_manager.js#L57>`__
// to do: move this to mail.utils

2
mail_base/__init__.py

@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
import models
from . import models

14
mail_base/static/src/js/base.js

@ -287,7 +287,7 @@ var MailTools = core.Class.extend({
return {
is_starred: chat_manager.mail_tools.property_descr("channel_starred", msg, chat_manager.mail_tools),
is_needaction: chat_manager.mail_tools.property_descr("channel_inbox", msg, chat_manager.mail_tools)
}
};
},
set_channel_flags: function(data, msg){
@ -297,7 +297,7 @@ var MailTools = core.Class.extend({
if (_.contains(data.starred_partner_ids, session.partner_id)) {
msg.is_starred = true;
}
return msg
return msg;
},
get_channel_array: function(msg){
@ -393,7 +393,7 @@ var MailTools = core.Class.extend({
} else {
channel = chat_manager.mail_tools.make_channel(data, options);
channels.push(channel);
channels = _.sortBy(channels, function (channel) { return _.isString(channel.name) ? channel.name.toLowerCase() : '' });
channels = _.sortBy(channels, function (channel) { return _.isString(channel.name) ? channel.name.toLowerCase() : ''; });
if (!options.silent) {
chat_manager.bus.trigger("new_channel", channel);
}
@ -786,10 +786,10 @@ var cls = new MailTools();
chat_manager.mail_tools = cls;
// we add this function this way in order to make them extendable via MailTools.include({...})
chat_manager.make_message = function(){
return chat_manager.mail_tools.make_message.apply(chat_manager.mail_tools, arguments)
return chat_manager.mail_tools.make_message.apply(chat_manager.mail_tools, arguments);
};
chat_manager.make_channel = function(){
return chat_manager.mail_tools.make_channel.apply(chat_manager.mail_tools, arguments)
return chat_manager.mail_tools.make_channel.apply(chat_manager.mail_tools, arguments);
};
chat_manager.post_message = function (data, options) {
options = options || {};
@ -1120,7 +1120,7 @@ chat_manager.search_partner = function (search_val, limit) {
});
};
chat_manager.send_native_notification = function(){
return chat_manager.mail_tools.send_native_notification.apply(chat_manager.mail_tools, arguments)
return chat_manager.mail_tools.send_native_notification.apply(chat_manager.mail_tools, arguments);
};
chat_manager.bus.on('client_action_open', null, function (open) {
client_action_open = open;
@ -1162,7 +1162,7 @@ function init(){
// unsubscribe and then subscribe to the event, to avoid duplication of new messages
bus.off('notification');
bus.on('notification', null, function(){
chat_manager.mail_tools.on_notification.apply(chat_manager.mail_tools, arguments)
chat_manager.mail_tools.on_notification.apply(chat_manager.mail_tools, arguments);
});
return $.when(load_menu_id, load_action_id, load_channels, load_emojis).then(function (menu_id, action_id) {

2
mail_move_message/controllers/main.py

@ -13,13 +13,11 @@ class MailChatController(openerp.addons.bus.controllers.main.BusController):
def _poll(self, dbname, channels, last, options):
if request.session.uid:
registry, cr, uid, context = request.registry, request.cr, request.session.uid, request.context
channels.append((request.db, 'mail_move_message'))
channels.append((request.db, 'mail_move_message.delete_message'))
return super(MailChatController, self)._poll(dbname, channels, last, options)
class DataSetCustom(DataSet):
def _extend_name(self, model, records):

4
mail_move_message/mail_move_message_models.py

@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
from openerp import api, models, fields, SUPERUSER_ID
from openerp import api
from openerp import fields
from openerp import models
from openerp.tools import email_split
from openerp.tools.translate import _

8
mail_move_message/static/src/js/mail_move_message.js

@ -20,7 +20,7 @@ odoo.define('mail_move_message.relocate', function (require) {
this.events['click .oe_move'] = function(event) {
var message_id = $(event.currentTarget).data('message-id');
this.trigger("move_message", message_id);
}
};
},
on_move_message: function(message_id){
var action = {
@ -100,9 +100,9 @@ odoo.define('mail_move_message.relocate', function (require) {
var context_built = $.Deferred();
if(this.node.attrs.use_for_mail_move_message) {
var model = new Model(this.view.dataset.model);
var partner_id = self.field_manager.fields['partner_id'].get_value();
var message_name_from = self.field_manager.fields['message_name_from'].get_value();
var message_email_from = self.field_manager.fields['message_email_from'].get_value();
var partner_id = self.field_manager.fields.partner_id.get_value();
var message_name_from = self.field_manager.fields.message_name_from.get_value();
var message_email_from = self.field_manager.fields.message_email_from.get_value();
context_built = model.call('create_partner', [
self.view.dataset.context.default_message_id,
related_field.field.relation,

2
mail_recovery/static/src/js/mail_recovery.js

@ -21,4 +21,4 @@ odoo.define('mail_recovery', function (require) {
return this._super(event);
},
});
})
});

4
mail_reply/README.rst

@ -9,8 +9,8 @@ Further information
HTML Description: https://apps.odoo.com/apps/modules/9.0/mail_reply/
Usage instructions: `<doc/index.rst>`_
Usage instructions: `<doc/index.rst>`__
Changelog: `<doc/changelog.rst>`_
Changelog: `<doc/changelog.rst>`__
Tested on Odoo 9.0 d3dd4161ad0598ebaa659fbd083457c77aa9448d

4
mail_reply/doc/changelog.rst

@ -1,5 +1,5 @@
Changelog
=========
Updates
=======
`1.0.0`
-------

2
mail_sent/tests/__init__.py

@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
import test_js
from . import test_js

1
mail_sent/tests/test_js.py

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import openerp.tests

4
mail_to/doc/changelog.rst

@ -1,5 +1,5 @@
Changelog
=========
Updates
=======
`1.0.0`
-------

6
mailgun/README.rst

@ -22,15 +22,15 @@ Contributors
Sponsors
--------
* `IT-Projects LLC <https://it-projects.info>`_
* `IT-Projects LLC <https://it-projects.info>`__
Further information
===================
HTML Description: https://apps.odoo.com/apps/modules/9.0/mailgun/
Usage instructions: `<doc/index.rst>`_
Usage instructions: `<doc/index.rst>`__
Changelog: `<doc/changelog.rst>`_
Changelog: `<doc/changelog.rst>`__
Tested on Odoo 9.0 c8cd67c5d98b410cabe0a6efb3347a8a4de731d8

4
mailgun/__init__.py

@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
import controllers
import models
from . import controllers
from . import models

2
mailgun/controllers/__init__.py

@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
import main
from . import main

4
mailgun/controllers/main.py

@ -1,10 +1,6 @@
# -*- coding: utf-8 -*-
from openerp.addons.web import http
from openerp.addons.web.http import request
import werkzeug
import email
import requests
import simplejson
import re

4
mailgun/doc/changelog.rst

@ -1,5 +1,5 @@
Changelog
=========
Updates
=======
`1.1.0`
-------

6
mailgun/models.py

@ -1,13 +1,9 @@
# -*- coding: utf-8 -*-
import requests
import time
import dateutil
import pytz
import simplejson
from openerp import models, api
from openerp.addons.mail.models.mail_message import decode
from openerp.addons.mail.models.mail_thread import mail_header_msgid_re
import logging
_logger = logging.getLogger(__name__)

Loading…
Cancel
Save