From dce889bd2c6be5d5b82cf106904de97d7b7daf59 Mon Sep 17 00:00:00 2001 From: rusllan Date: Fri, 28 Dec 2018 20:03:57 +0500 Subject: [PATCH 1/8] :book: Travis status added --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3228260..f34a62e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.com/it-projects-llc/mail-addons.svg?branch=10.0)](https://travis-ci.com/it-projects-llc/mail-addons) + # mail-addons Odoo (OpenERP) mail addons From 836efa8363c558e9ecde226a687e435e10beabcd Mon Sep 17 00:00:00 2001 From: KolushovAlexandr Date: Sat, 29 Dec 2018 16:11:50 +0500 Subject: [PATCH 2/8] :shield: mail_private tests --- mail_private/__manifest__.py | 2 +- mail_private/full_composer_wizard.xml | 2 - mail_private/static/src/js/test_private.js | 48 ++++++++++++++++++++++ mail_private/template.xml | 3 ++ mail_private/tests/__init__.py | 4 ++ mail_private/tests/test_js.py | 26 ++++++++++++ 6 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 mail_private/static/src/js/test_private.js create mode 100644 mail_private/tests/__init__.py create mode 100644 mail_private/tests/test_js.py diff --git a/mail_private/__manifest__.py b/mail_private/__manifest__.py index c483f50..6c0e421 100644 --- a/mail_private/__manifest__.py +++ b/mail_private/__manifest__.py @@ -4,7 +4,7 @@ "summary": """Send private messages to specified recipients, regardless of who are in followers list.""", "category": "Discuss", "images": ['images/mail_private_image.png'], - "version": "1.0.1", + "version": "10.0.1.0.1", "application": False, "author": "IT-Projects LLC, Pavel Romanchenko", diff --git a/mail_private/full_composer_wizard.xml b/mail_private/full_composer_wizard.xml index 7bb5471..9f57a20 100644 --- a/mail_private/full_composer_wizard.xml +++ b/mail_private/full_composer_wizard.xml @@ -1,6 +1,5 @@ - mail.compose.message.form.private @@ -23,5 +22,4 @@ - diff --git a/mail_private/static/src/js/test_private.js b/mail_private/static/src/js/test_private.js new file mode 100644 index 0000000..8b9886e --- /dev/null +++ b/mail_private/static/src/js/test_private.js @@ -0,0 +1,48 @@ +/* Copyright 2018 Kolushov Alexandr + License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).*/ +odoo.define('mail_private.tour', function (require) { + "use strict"; + + var tour = require("web_tour.tour"); + var core = require('web.core'); + var _t = core._t; + + var email = 'You Are Whalecum'; + var steps = [{ + trigger: '.o_thread_message strong.o_mail_redirect:contains("Agrolait")', + content: _t("Open Partners Form"), + position: 'bottom', + }, { + trigger: "button.oe_compose_post_private", + content: _t("Click on Private mail creating button"), + position: "bottom" + }, { + // for some reason (due to tricky renderings) button.oe_composer_uncheck could not be find by the tour manager + trigger: ".o_control_panel.o_breadcrumb_full li.active", + content: _t("Dummy action"), + }, { + trigger: "button.oe_composer_uncheck", + extra_trigger: "button.oe_composer_uncheck", + content: _t("Uncheck all Followers"), + timeout: 22000, + }, { + trigger: "div.o_composer_suggested_partners input:first", + content: _t("Check the first one"), + }, { + trigger: "textarea.o_composer_text_field:first", + content: _t("Write some email"), + run: function() { + $('textarea.o_composer_text_field:first').val(email); + }, + }, { + trigger: ".o_composer_buttons .o_composer_button_send", + content: _t("Send email"), + }, { + trigger: ".o_mail_thread .o_thread_message:contains(" + email + ")", + content: _t("Send email"), + } + ]; + + tour.register('mail_private_tour', { test: true, url: '/web' }, steps); + +}); diff --git a/mail_private/template.xml b/mail_private/template.xml index 534e53c..4da60c7 100644 --- a/mail_private/template.xml +++ b/mail_private/template.xml @@ -9,6 +9,9 @@ + diff --git a/mail_private/tests/__init__.py b/mail_private/tests/__init__.py new file mode 100644 index 0000000..4f6aa47 --- /dev/null +++ b/mail_private/tests/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). + +from . import test_js diff --git a/mail_private/tests/test_js.py b/mail_private/tests/test_js.py new file mode 100644 index 0000000..b7dc70e --- /dev/null +++ b/mail_private/tests/test_js.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Copyright 2018 Kolushov Alexandr +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). + +import odoo.tests +from odoo.api import Environment + + +@odoo.tests.common.at_install(True) +@odoo.tests.common.post_install(True) +class TestUi(odoo.tests.HttpCase): + + def test_01_mail_private(self): + # needed because tests are run before the module is marked as + # installed. In js web will only load qweb coming from modules + # that are returned by the backend in module_boot. Without + # this you end up with js, css but no qweb. + cr = self.registry.cursor() + env = Environment(cr, self.uid, {}) + env['ir.module.module'].search([('name', '=', 'mail_private')], limit=1).state = 'installed' + cr.release() + + self.phantom_js("/web", + "odoo.__DEBUG__.services['web_tour.tour'].run('mail_private_tour', 1000)", + "odoo.__DEBUG__.services['web_tour.tour'].tours.mail_private_tour.ready", + login="admin", timeout=70) From a399d1e83389b1de617d2862a8a48f51941730d5 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Sun, 6 Jan 2019 18:32:46 +0500 Subject: [PATCH 3/8] :book: readme clean up --- mail_attachment_popup/README.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mail_attachment_popup/README.rst b/mail_attachment_popup/README.rst index 55283bc..927cd02 100644 --- a/mail_attachment_popup/README.rst +++ b/mail_attachment_popup/README.rst @@ -13,23 +13,23 @@ Contributors Sponsors -------- -* `IT-Projects LLC `_ +* `IT-Projects LLC `__ Maintainers ----------- -* `IT-Projects LLC `_ +* `IT-Projects LLC `__ The module is not maintained in future versions because it's functionality built-in since Odoo 11.0. Further information =================== -Demo: http://runbot.it-projects.info/demo/mail-addons/9.0 +Demo: http://runbot.it-projects.info/demo/mail-addons/10.0 -HTML Description: https://apps.odoo.com/apps/modules/9.0/mail_attachment_popup/ +HTML Description: https://apps.odoo.com/apps/modules/10.0/mail_attachment_popup/ Usage instructions: ``_ Changelog: ``_ -Tested on Odoo 9.0 021878f9c41c6d652abf345c3c5537fe92f8bc5b +Tested on Odoo 10.0 9cf666288076dc4e315e62e7ca0d6fc59995a498 From 4c96e820a44d0a14f71ee2041a68de495e9c88c8 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Sun, 6 Jan 2019 20:33:46 +0500 Subject: [PATCH 4/8] :book: fix version format --- mail_attachment_popup/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail_attachment_popup/__manifest__.py b/mail_attachment_popup/__manifest__.py index 156363a..52d7491 100644 --- a/mail_attachment_popup/__manifest__.py +++ b/mail_attachment_popup/__manifest__.py @@ -3,7 +3,7 @@ "name": """Popup Attachments""", "summary": """Open attached mail images in popup""", "category": "Extra Tools", - "version": "1.0.0", + "version": "10.0.1.0.0", "images": ['images/popup_image.png'], "author": "IT-Projects LLC, Dinar Gabbasov", From c6ad6dbc008d040247688988957809417b25e22b Mon Sep 17 00:00:00 2001 From: KolushovAlexandr Date: Wed, 9 Jan 2019 20:19:31 +0500 Subject: [PATCH 5/8] :rose: writing/spelling --- mail_private/static/src/js/test_private.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail_private/static/src/js/test_private.js b/mail_private/static/src/js/test_private.js index 8b9886e..876536d 100644 --- a/mail_private/static/src/js/test_private.js +++ b/mail_private/static/src/js/test_private.js @@ -7,7 +7,7 @@ odoo.define('mail_private.tour', function (require) { var core = require('web.core'); var _t = core._t; - var email = 'You Are Whalecum'; + var email = 'mail_private test email'; var steps = [{ trigger: '.o_thread_message strong.o_mail_redirect:contains("Agrolait")', content: _t("Open Partners Form"), From 128a7de1ed70c1a7f2c3cad7b4ac252bb372a315 Mon Sep 17 00:00:00 2001 From: KolushovAlexandr Date: Wed, 23 Jan 2019 13:59:23 +0500 Subject: [PATCH 6/8] :shield: mail_private tests --- mail_private/static/src/js/test_private.js | 4 ++-- mail_private/tests/test_js.py | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mail_private/static/src/js/test_private.js b/mail_private/static/src/js/test_private.js index 876536d..4b6efda 100644 --- a/mail_private/static/src/js/test_private.js +++ b/mail_private/static/src/js/test_private.js @@ -24,7 +24,7 @@ odoo.define('mail_private.tour', function (require) { trigger: "button.oe_composer_uncheck", extra_trigger: "button.oe_composer_uncheck", content: _t("Uncheck all Followers"), - timeout: 22000, + timeout: 10000, }, { trigger: "div.o_composer_suggested_partners input:first", content: _t("Check the first one"), @@ -35,7 +35,7 @@ odoo.define('mail_private.tour', function (require) { $('textarea.o_composer_text_field:first').val(email); }, }, { - trigger: ".o_composer_buttons .o_composer_button_send", + trigger: ".o_composer_send .o_composer_button_send", content: _t("Send email"), }, { trigger: ".o_mail_thread .o_thread_message:contains(" + email + ")", diff --git a/mail_private/tests/test_js.py b/mail_private/tests/test_js.py index b7dc70e..88e0f73 100644 --- a/mail_private/tests/test_js.py +++ b/mail_private/tests/test_js.py @@ -20,7 +20,13 @@ class TestUi(odoo.tests.HttpCase): env['ir.module.module'].search([('name', '=', 'mail_private')], limit=1).state = 'installed' cr.release() + env = Environment(self.registry.test_cr, self.uid, {}) + partners = env['res.partner'].search([]) + new_follower = env['res.partner'].search([('name', 'ilike', 'Ja')]) + for partner in partners: + partner.message_subscribe(new_follower.ids, []) + self.phantom_js("/web", "odoo.__DEBUG__.services['web_tour.tour'].run('mail_private_tour', 1000)", "odoo.__DEBUG__.services['web_tour.tour'].tours.mail_private_tour.ready", - login="admin", timeout=70) + login="admin", timeout=90) From bd0496e126cde9d6162c05f9ba23f20fbad9f450 Mon Sep 17 00:00:00 2001 From: KolushovAlexandr Date: Fri, 1 Feb 2019 14:43:14 +0500 Subject: [PATCH 7/8] :rose: fixed confusing comment --- mail_multi_website/models/mail_template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail_multi_website/models/mail_template.py b/mail_multi_website/models/mail_template.py index 7342663..2b7db1c 100644 --- a/mail_multi_website/models/mail_template.py +++ b/mail_multi_website/models/mail_template.py @@ -98,7 +98,7 @@ class MailTemplate(models.Model): if record_company and record_website \ and record_website.company_id != company: - # company and website are incompatible, so keep only website + # company and website are incompatible, so keep only company record_website = self.env['website'] # empty value record_context = dict(force_company=record_company.id, website_id=record_website.id) From 9d07d4e9a0fc9ebfeb46075754e850af14de29d8 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Sat, 9 Feb 2019 20:23:07 +0500 Subject: [PATCH 8/8] :arrow_up::one::one: fix version in repos's README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ba4aa7..4190d31 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.com/it-projects-llc/mail-addons.svg?branch=10.0)](https://travis-ci.com/it-projects-llc/mail-addons) +[![Build Status](https://travis-ci.com/it-projects-llc/mail-addons.svg?branch=11.0)](https://travis-ci.com/it-projects-llc/mail-addons) # mail-addons Odoo mail addons