diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8b1715f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,34 @@ +language: python + +python: + - "2.7" + +sudo: false +cache: pip + +addons: + apt: + packages: + - expect-dev # provides unbuffer utility + - python-lxml # because pip installation is slow + +env: + - VERSION="9.0" LINT_CHECK="1" + - VERSION="9.0" ODOO_REPO="odoo/odoo" LINT_CHECK="0" + - VERSION="9.0" ODOO_REPO="OCA/OCB" LINT_CHECK="0" + - VERSION="9.0" UNIT_TEST="1" LINT_CHECK="0" + +virtualenv: + system_site_packages: true + +install: + - pip install anybox.testing.openerp + - git clone https://github.com/it-projects-llc/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools + - export PATH=${HOME}/maintainer-quality-tools/travis:${PATH} + - travis_install_nightly + +script: + - travis_run_tests + +after_success: + coveralls diff --git a/mail_all/README.rst b/mail_all/README.rst index 17ded40..48d4e55 100644 --- a/mail_all/README.rst +++ b/mail_all/README.rst @@ -9,8 +9,8 @@ Further information HTML Description: https://apps.odoo.com/apps/modules/9.0/mail_all/ -Usage instructions: ``_ +Usage instructions: ``__ -Changelog: ``_ +Changelog: ``__ Tested on Odoo 9.0 d3dd4161ad0598ebaa659fbd083457c77aa9448d diff --git a/mail_all/views/templates.xml b/mail_all/views/templates.xml index 7ca724f..69fa5ed 100644 --- a/mail_all/views/templates.xml +++ b/mail_all/views/templates.xml @@ -9,4 +9,4 @@ - \ No newline at end of file + diff --git a/mail_check_immediately/__init__.py b/mail_check_immediately/__init__.py index 89d26e2..a0fdc10 100644 --- a/mail_check_immediately/__init__.py +++ b/mail_check_immediately/__init__.py @@ -1,2 +1,2 @@ # -*- coding: utf-8 -*- -import models +from . import models diff --git a/mail_check_immediately/__openerp__.py b/mail_check_immediately/__openerp__.py index dcc2797..4240186 100644 --- a/mail_check_immediately/__openerp__.py +++ b/mail_check_immediately/__openerp__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- { 'name': 'Check mail immediately', 'version': '1.0.1', diff --git a/mail_check_immediately/models.py b/mail_check_immediately/models.py index 3306837..836bdb7 100644 --- a/mail_check_immediately/models.py +++ b/mail_check_immediately/models.py @@ -60,7 +60,6 @@ class FetchMailImmediately(models.AbstractModel): def run_fetchmail_manually(self): fetchmail_task = self.env.ref('fetchmail.ir_cron_mail_gateway_action') - fetchmail_task_id = fetchmail_task.id fetchmail_model = self.env['fetchmail.server'].sudo() fetchmail_task._try_lock() diff --git a/mail_check_immediately/static/src/js/main.js b/mail_check_immediately/static/src/js/main.js index 20b07bd..b9f31b2 100755 --- a/mail_check_immediately/static/src/js/main.js +++ b/mail_check_immediately/static/src/js/main.js @@ -10,7 +10,7 @@ openerp.mail_check_immediately = function(instance, local) { this.imm_model = new instance.web.Model('fetch_mail.imm'); this.events['click a.oe_fetch_new_mails'] = function(){ _this.run_fetchmail_manually(); - } + }; }, start: function() { @@ -22,7 +22,7 @@ openerp.mail_check_immediately = function(instance, local) { this.get_last_fetched_time(); this.get_time_loop = setInterval(function(){ - _this.get_last_fetched_time() + _this.get_last_fetched_time(); }, 30000); }, @@ -31,8 +31,8 @@ openerp.mail_check_immediately = function(instance, local) { var _this = this; this.imm_model.call('run_fetchmail_manually', {context: new instance.web.CompoundContext()}).then(function(){ - _this.get_last_fetched_time() - }) + _this.get_last_fetched_time(); + }); }, get_last_fetched_time: function(){ @@ -43,7 +43,7 @@ openerp.mail_check_immediately = function(instance, local) { value = $.timeago(res); value = value || 'undefined'; _this.$el.find('span.oe_view_manager_fetch_mail_imm_field').html(value); - }) + }); }, destroy: function(){ diff --git a/mail_delete_odoo_footer/__openerp__.py b/mail_delete_odoo_footer/__openerp__.py index 9b7547f..a94ab6d 100644 --- a/mail_delete_odoo_footer/__openerp__.py +++ b/mail_delete_odoo_footer/__openerp__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- { 'name': 'Delete Odoo footer in email (TODO)', 'version': '1.0.0', diff --git a/mail_fix_553/__init__.py b/mail_fix_553/__init__.py index c978833..e9ad948 100644 --- a/mail_fix_553/__init__.py +++ b/mail_fix_553/__init__.py @@ -1 +1,2 @@ -import mail_fix_553 +# -*- coding: utf-8 -*- +from . import mail_fix_553 diff --git a/mail_fix_553/__openerp__.py b/mail_fix_553/__openerp__.py index 91b450d..c173476 100644 --- a/mail_fix_553/__openerp__.py +++ b/mail_fix_553/__openerp__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- { "name": "Fix mail error 553", "version": "0.3", diff --git a/mail_fix_553/mail_fix_553.py b/mail_fix_553/mail_fix_553.py index d6feb19..76ad7dc 100644 --- a/mail_fix_553/mail_fix_553.py +++ b/mail_fix_553/mail_fix_553.py @@ -2,19 +2,18 @@ import base64 import logging +import re from email.utils import formataddr -from urlparse import urljoin -from openerp import api, tools +from openerp import tools from openerp import SUPERUSER_ID from openerp.addons.base.ir.ir_mail_server import MailDeliveryException -from openerp.osv import fields, osv +from openerp.osv import osv from openerp.tools.safe_eval import safe_eval as eval from openerp.tools.translate import _ _logger = logging.getLogger(__name__) -import re class mail_mail(osv.Model): diff --git a/mail_fix_empty_body/__init__.py b/mail_fix_empty_body/__init__.py index bff786c..a0fdc10 100644 --- a/mail_fix_empty_body/__init__.py +++ b/mail_fix_empty_body/__init__.py @@ -1 +1,2 @@ -import models +# -*- coding: utf-8 -*- +from . import models diff --git a/mail_fix_empty_body/__openerp__.py b/mail_fix_empty_body/__openerp__.py index 9228b2c..5842c3b 100644 --- a/mail_fix_empty_body/__openerp__.py +++ b/mail_fix_empty_body/__openerp__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- { 'name': 'Fix "False" in empty email body', 'version': '1.0.0', diff --git a/mail_fix_empty_body/models.py b/mail_fix_empty_body/models.py index 93de6d8..1878c30 100644 --- a/mail_fix_empty_body/models.py +++ b/mail_fix_empty_body/models.py @@ -1,4 +1,6 @@ -from openerp import api, models, fields, SUPERUSER_ID +# -*- coding: utf-8 -*- +from openerp import models + class mail_compose_message(models.TransientModel): diff --git a/mail_fix_header_from/__init__.py b/mail_fix_header_from/__init__.py index bff786c..a0fdc10 100644 --- a/mail_fix_header_from/__init__.py +++ b/mail_fix_header_from/__init__.py @@ -1 +1,2 @@ -import models +# -*- coding: utf-8 -*- +from . import models diff --git a/mail_fix_header_from/__openerp__.py b/mail_fix_header_from/__openerp__.py index 5943613..150fa4b 100644 --- a/mail_fix_header_from/__openerp__.py +++ b/mail_fix_header_from/__openerp__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- { "name": "Fix non-ascii header 'from' (OBSOLETE)", "version": "0.3", diff --git a/mail_fix_header_from/models.py b/mail_fix_header_from/models.py index 83c8941..399fc3b 100644 --- a/mail_fix_header_from/models.py +++ b/mail_fix_header_from/models.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import re from openerp.addons.base.ir import ir_mail_server diff --git a/mail_move_message/__init__.py b/mail_move_message/__init__.py index f247113..9f91a71 100644 --- a/mail_move_message/__init__.py +++ b/mail_move_message/__init__.py @@ -1,2 +1,3 @@ -import controllers -import mail_move_message_models +# -*- coding: utf-8 -*- +from . import controllers +from . import mail_move_message_models diff --git a/mail_move_message/__openerp__.py b/mail_move_message/__openerp__.py index 9bde151..6caae01 100644 --- a/mail_move_message/__openerp__.py +++ b/mail_move_message/__openerp__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- { 'name': 'Mail relocation', 'version': '1.0.4', diff --git a/mail_move_message/controllers/__init__.py b/mail_move_message/controllers/__init__.py index 8ee9bae..757b12a 100644 --- a/mail_move_message/controllers/__init__.py +++ b/mail_move_message/controllers/__init__.py @@ -1 +1,2 @@ -import main +# -*- coding: utf-8 -*- +from . import main diff --git a/mail_move_message/controllers/main.py b/mail_move_message/controllers/main.py index e859165..94a6634 100644 --- a/mail_move_message/controllers/main.py +++ b/mail_move_message/controllers/main.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from openerp.addons.web.controllers.main import DataSet from openerp.tools.translate import _ from openerp import http @@ -18,6 +19,7 @@ class MailChatController(openerp.addons.bus.controllers.main.BusController): return super(MailChatController, self)._poll(dbname, channels, last, options) + class DataSetCustom(DataSet): def _extend_name(self, model, records): diff --git a/mail_move_message/mail_move_message_models.py b/mail_move_message/mail_move_message_models.py index 51f940f..7b216e2 100644 --- a/mail_move_message/mail_move_message_models.py +++ b/mail_move_message/mail_move_message_models.py @@ -1,4 +1,4 @@ -from lxml import etree +# -*- coding: utf-8 -*- from openerp import api, models, fields, SUPERUSER_ID from openerp.tools import email_split from openerp.tools.translate import _ diff --git a/mail_move_message/static/src/js/mail_move_message.js b/mail_move_message/static/src/js/mail_move_message.js index f8fca02..ff53e2b 100644 --- a/mail_move_message/static/src/js/mail_move_message.js +++ b/mail_move_message/static/src/js/mail_move_message.js @@ -96,7 +96,7 @@ odoo.define('mail_move_message.relocate', function (require) { on_click: function(){ if(this.node.attrs.special == 'quick_create'){ var self = this; - var related_field = this.field_manager.fields[this.node.attrs['field']]; + var related_field = this.field_manager.fields[this.node.attrs.field]; var context_built = $.Deferred(); if(this.node.attrs.use_for_mail_move_message) { var model = new Model(this.view.dataset.model); @@ -116,7 +116,7 @@ odoo.define('mail_move_message.relocate', function (require) { } $.when(context_built).pipe(function (context) { if(self.node.attrs.use_for_mail_move_message) { - self.field_manager.fields['partner_id'].set_value(context['partner_id']); + self.field_manager.fields.partner_id.set_value(context.partner_id); } var dialog = new form_common.FormViewDialog(self, { res_model: related_field.field.relation, @@ -130,8 +130,8 @@ odoo.define('mail_move_message.relocate', function (require) { }); dialog.on('create_completed', self, function(id) { related_field.set_value(id); - if(self.field_manager.fields['filter_by_partner']) { - self.field_manager.fields['filter_by_partner'].set_value(true); + if(self.field_manager.fields.filter_by_partner) { + self.field_manager.fields.filter_by_partner.set_value(true); } }); }); diff --git a/mail_outgoing/__init__.py b/mail_outgoing/__init__.py index 698570a..71fed50 100644 --- a/mail_outgoing/__init__.py +++ b/mail_outgoing/__init__.py @@ -1 +1,2 @@ -import mail_outgoing_models +# -*- coding: utf-8 -*- +from . import mail_outgoing_models diff --git a/mail_outgoing/__openerp__.py b/mail_outgoing/__openerp__.py index 7564efa..468538f 100644 --- a/mail_outgoing/__openerp__.py +++ b/mail_outgoing/__openerp__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- { 'name': 'Outgoing mails menu', 'version': '1.0.0', diff --git a/mail_outgoing/mail_outgoing_models.py b/mail_outgoing/mail_outgoing_models.py index 2ba4cb4..2a232dd 100644 --- a/mail_outgoing/mail_outgoing_models.py +++ b/mail_outgoing/mail_outgoing_models.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from openerp.osv import osv diff --git a/mail_outgoing/mail_outgoing_views.xml b/mail_outgoing/mail_outgoing_views.xml index 9bc5d86..3b74479 100644 --- a/mail_outgoing/mail_outgoing_views.xml +++ b/mail_outgoing/mail_outgoing_views.xml @@ -1,7 +1,7 @@ - + Outgoing mail.mail @@ -10,8 +10,8 @@ {} -

- Failed or delayed emails will be shown here. You will be able to retry failed emails and send delayed emails manually. +

+ Failed or delayed emails will be shown here. You will be able to retry failed emails and send delayed emails manually.

@@ -30,5 +30,5 @@ -
+
diff --git a/mail_outgoing/security/mail_outgoing.xml b/mail_outgoing/security/mail_outgoing.xml index b394494..75648c9 100644 --- a/mail_outgoing/security/mail_outgoing.xml +++ b/mail_outgoing/security/mail_outgoing.xml @@ -3,10 +3,10 @@ all_emails - Gets access to all emails. For example to check outgoing emails. - + Gets access to all emails. For example to check outgoing emails. + - + mail.mail: user [('author_id', '=', user.partner_id.id)] @@ -16,9 +16,9 @@ - + - + mail.mail: system [(1, '=', 1)] @@ -28,6 +28,6 @@ - - + + diff --git a/mail_partner_lang/__init__.py b/mail_partner_lang/__init__.py index bff786c..a0fdc10 100644 --- a/mail_partner_lang/__init__.py +++ b/mail_partner_lang/__init__.py @@ -1 +1,2 @@ -import models +# -*- coding: utf-8 -*- +from . import models diff --git a/mail_partner_lang/__openerp__.py b/mail_partner_lang/__openerp__.py index 0cb2ab5..26515e7 100644 --- a/mail_partner_lang/__openerp__.py +++ b/mail_partner_lang/__openerp__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- { 'name': 'Use partner language in mail', 'version': '1.0.0', diff --git a/mail_partner_lang/models.py b/mail_partner_lang/models.py index 283316e..ff364b8 100644 --- a/mail_partner_lang/models.py +++ b/mail_partner_lang/models.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from openerp.osv import osv, fields -from openerp import SUPERUSER_ID +from openerp.osv import osv + class mail_thread(osv.Model): diff --git a/mail_recovery/README.rst b/mail_recovery/README.rst index 04dae5b..7a930cb 100644 --- a/mail_recovery/README.rst +++ b/mail_recovery/README.rst @@ -18,7 +18,7 @@ Contributors Sponsors -------- -* `IT-Projects LLC `_ +* `IT-Projects LLC `__ Further information =================== @@ -27,8 +27,8 @@ Demo: http://runbot.it-projects.info/demo/mail-addons/9.0 HTML Description: https://apps.odoo.com/apps/modules/9.0/mail_recovery/ -Usage instructions: ``_ +Usage instructions: ``__ -Changelog: ``_ +Changelog: ``__ Tested on Odoo 9.0 fd9eb2e4819031c6758c021f4c335b591367632d diff --git a/mail_recovery/static/src/js/mail_recovery.js b/mail_recovery/static/src/js/mail_recovery.js index 0ba7085..482abf6 100644 --- a/mail_recovery/static/src/js/mail_recovery.js +++ b/mail_recovery/static/src/js/mail_recovery.js @@ -10,14 +10,14 @@ odoo.define('mail_recovery', function (require) { on_focus_textarea: function(event) { var $input = $(event.target); if (!$input.val()) { - $input.val(window.localStorage['message_storage']); + $input.val(window.localStorage.message_storage); } }, on_keyup_textarea: function(event) { - window.localStorage['message_storage'] = $(event.target).val(); + window.localStorage.message_storage = $(event.target).val(); }, send_message: function (event) { - window.localStorage['message_storage'] = ''; + window.localStorage.message_storage = ''; return this._super(event); }, }); diff --git a/mail_sent/__init__.py b/mail_sent/__init__.py index c7b5ac7..a0fdc10 100644 --- a/mail_sent/__init__.py +++ b/mail_sent/__init__.py @@ -1,3 +1,2 @@ # -*- coding: utf-8 -*- - -import models +from . import models diff --git a/mail_todo_custom/static/src/js/mail_todo_custom.js b/mail_todo_custom/static/src/js/mail_todo_custom.js index 4d45c0b..983b856 100644 --- a/mail_todo_custom/static/src/js/mail_todo_custom.js +++ b/mail_todo_custom/static/src/js/mail_todo_custom.js @@ -41,4 +41,4 @@ openerp.mail_todo_custom = function(session) { }, }); -} \ No newline at end of file +}; \ No newline at end of file diff --git a/mass_mailing_extra/__init__.py b/mass_mailing_extra/__init__.py index bff786c..a0fdc10 100644 --- a/mass_mailing_extra/__init__.py +++ b/mass_mailing_extra/__init__.py @@ -1 +1,2 @@ -import models +# -*- coding: utf-8 -*- +from . import models diff --git a/mass_mailing_extra/__openerp__.py b/mass_mailing_extra/__openerp__.py index 60f62ed..5f4aa39 100644 --- a/mass_mailing_extra/__openerp__.py +++ b/mass_mailing_extra/__openerp__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- { 'name': 'Improvements for mass mailing', 'version': '1.0.0', diff --git a/mass_mailing_extra/models.py b/mass_mailing_extra/models.py index 904043b..0dadfea 100644 --- a/mass_mailing_extra/models.py +++ b/mass_mailing_extra/models.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from openerp import api, models, fields diff --git a/mass_mailing_extra/views.xml b/mass_mailing_extra/views.xml index 19362b4..3dbb91f 100644 --- a/mass_mailing_extra/views.xml +++ b/mass_mailing_extra/views.xml @@ -5,34 +5,34 @@ mail.mail.statistics.form mail.mail.statistics - + - - - - - - - - - - + + + + + + + + + + mail.mail.statistics.tree mail.mail.statistics - + - - - + + + - + diff --git a/oca_dependencies.txt b/oca_dependencies.txt new file mode 100644 index 0000000..f6428d2 --- /dev/null +++ b/oca_dependencies.txt @@ -0,0 +1,4 @@ +OCA_web https://github.com/OCA/web +access-addons https://github.com/it-projects-llc/access-addons.git +misc-addons https://github.com/it-projects-llc/misc-addons +website-addons https://github.com/it-projects-llc/website-addons diff --git a/res_partner_mails_count/__init__.py b/res_partner_mails_count/__init__.py index 89d26e2..a0fdc10 100644 --- a/res_partner_mails_count/__init__.py +++ b/res_partner_mails_count/__init__.py @@ -1,2 +1,2 @@ # -*- coding: utf-8 -*- -import models +from . import models diff --git a/res_partner_mails_count/tests/test_mail.py b/res_partner_mails_count/tests/test_mail.py index 4fbcf97..d96c3b1 100644 --- a/res_partner_mails_count/tests/test_mail.py +++ b/res_partner_mails_count/tests/test_mail.py @@ -3,7 +3,7 @@ from openerp.tests.common import TransactionCase -class test_message_count(TransactionCase): +class TestMessageCount(TransactionCase): post_install = True def test_count(self): diff --git a/res_partner_mails_count/tests/test_phantom.py b/res_partner_mails_count/tests/test_phantom.py index 360c953..28dd922 100644 --- a/res_partner_mails_count/tests/test_phantom.py +++ b/res_partner_mails_count/tests/test_phantom.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import openerp.tests diff --git a/res_partner_strip_email/__init__.py b/res_partner_strip_email/__init__.py index 89d26e2..a0fdc10 100644 --- a/res_partner_strip_email/__init__.py +++ b/res_partner_strip_email/__init__.py @@ -1,2 +1,2 @@ # -*- coding: utf-8 -*- -import models +from . import models diff --git a/res_partner_strip_email/models.py b/res_partner_strip_email/models.py index bb6f741..2d1b493 100644 --- a/res_partner_strip_email/models.py +++ b/res_partner_strip_email/models.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -from openerp import models, fields, api +from openerp import api +from openerp import models class res_partner_strip_email(models.Model):