Browse Source

the module is available in the app store

pull/303/head
Denis Mudarisov 4 years ago
parent
commit
d59b5a33b1
No known key found for this signature in database GPG Key ID: B9AD74DAFB7B53DA
  1. 16
      mail_to/ ⇐ ⇐ ⇐/README.rst
  2. 39
      mail_to/README.rst
  3. 20
      mail_to/__manifest__.py
  4. 66
      mail_to/static/description/index.html
  5. 29
      mail_to/static/src/xml/recipient.xml
  6. 14
      mail_to/templates.xml
  7. 53
      mail_to/tests/test_default.py

16
mail_to/ ⇐ ⇐ ⇐/README.rst

@ -1,16 +0,0 @@
=========================
Show message recipients
=========================
Allows you be sure, that all discussion participants were notified. Adds recipients label the right of message.
Module is available at Odoo Apps Store:
https://www.odoo.com/apps/modules/13.0/mail_to/
We do love FOSS, but sometimes we need to eat ¯\\_(ツ)_/¯
Please consider buying the module and get karma and support in return
`IT Projects Labs Team <https://itpp.dev/>`__

39
mail_to/README.rst

@ -1,39 +0,0 @@
=========================
Show message recipients
=========================
Allows you be sure, that all discussion participants were notified. Adds recipients label the right of message.
Credits
=======
Contributors
------------
* Pavel Romanchenko <apps@it-projects.info>
Sponsors
--------
* `IT-Projects LLC <https://it-projects.info>`__
Maintainers
-----------
* `IT-Projects LLC <https://it-projects.info>`__
To get a guaranteed support you are kindly requested to purchase the module at `odoo apps store <https://apps.odoo.com/apps/modules/13.0/mail_to/>`__.
Thank you for understanding!
`IT-Projects Team <https://www.it-projects.info/team>`__
Further information
===================
Demo: http://runbot.it-projects.info/demo/mail-addons/13.0
HTML Description: https://apps.odoo.com/apps/modules/13.0/mail_to/
Usage instructions: `<doc/index.rst>`_
Changelog: `<doc/changelog.rst>`_
Tested on Odoo 12.0 3c40d732bf03c8b656ab170319425f02fddfb2f4

20
mail_to/__manifest__.py

@ -1,20 +0,0 @@
{
"name": """Show message recipients""",
"summary": """Allows you be sure, that all discussion participants were notified""",
"category": "Discuss",
"images": ["images/1.png"],
"version": "13.0.1.0.1",
"author": "IT-Projects LLC, Pavel Romanchenko",
"support": "apps@itpp.dev",
"website": "https://it-projects.info",
"license": "Other OSI approved licence", # MIT
"price": 40.00,
"currency": "EUR",
"depends": ["mail"],
"external_dependencies": {"python": [], "bin": []},
"data": ["templates.xml"],
"qweb": ["static/src/xml/recipient.xml"],
"demo": [],
"installable": False,
"auto_install": False,
}

66
mail_to/static/description/index.html

@ -1,66 +0,0 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h2 class="oe_slogan">Show message recipients</h2>
<h3 class="oe_slogan">Allows you be sure, that all discussion participants were notified</h3>
</div>
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="1.png"/>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span8">
<h2>Need our service?</h2>
<p class="oe_mt32">Contact us by <a href="mailto:apps@it-projects.info">email</a> or fill out <a href="https://www.it-projects.info/page/website.contactus " target="_blank">request form</a></p>
<ul>
<li><a href="mailto:apps@it-projects.info">apps@it-projects.info <i class="fa fa-envelope-o"></i></a></li>
<li><a href="https://www.it-projects.info/page/website.contactus " target="_blank">https://www.it-projects.info/page/website.contactus <i class="fa fa-list-alt"></i></a></li>
<li><a href="https://m.me/itprojectsllc" target="_blank">https://m.me/itprojectsllc <i class="fa fa-facebook-square"></i></a></li>
<li>skype@it-projects.info <i class="fa fa-skype"></i></li>
</ul>
</div>
<div class="oe_span4">
<div class="stamp" style="width:200px;">
<div style="margin-top: 15px;
position: relative;
font-family:'Vollkorn', serif;
font-size: 16px;
line-height: 25px;
text-transform: uppercase;
font-weight: bold;
color: #75526b;
border: 3px dashed #75526b;
float: left;
padding: 4px 12px;
-webkit-transform: rotate(5deg);
-o-transform: rotate(5deg);
-moz-transform: rotate(5deg);
-ms-transform: rotate(5deg);">
Tested on Odoo<br/>12.0 community
</div>
<div style="margin-top: 15px;
position: relative;
font-family:'Vollkorn', serif;
font-size: 16px;
line-height: 25px;
text-transform: uppercase;
font-weight: bold;
color: #75526b;
border: 3px dashed #75526b;
float: left;
padding: 4px 12px;
-webkit-transform: rotate(3deg);
-o-transform: rotate(3deg);
-moz-transform: rotate(3deg);
-ms-transform: rotate(3deg);">
Tested on Odoo<br/>12.0 enterprise
</div>
</div>
</div>
</div>
</section>

29
mail_to/static/src/xml/recipient.xml

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<template>
<t t-extend="mail.widget.Thread.Message">
<t t-jquery="p.o_mail_info" t-operation="append">
<span class="recipients_info">
<t t-set="partner_ids" t-value="message.getCustomerEmailData()" />
<t t-if="partner_ids">
<t t-if="partner_ids.length > 0">To: </t>
<t t-foreach="partner_ids.length" t-as="i">
<t t-if="i &lt; 4">
<a
t-att-href="_.str.sprintf('/web?#id=%s&amp;view_type=form&amp;model=res.partner', partner_ids[i][0])"
class="recipient_link"
>
<i t-esc="partner_ids[i][1]" />
<t t-if="i &lt; partner_ids.length - 1">; </t>
</a>
</t>
</t>
<t t-if="partner_ids.length &gt; 4">
<span t-att-title="more_recipients">
and <t t-esc="partner_ids.length - 4" /> more
</span>
</t>
</t>
</span>
</t>
</t>
</template>

14
mail_to/templates.xml

@ -1,14 +0,0 @@
<?xml version="1.0" ?>
<openerp>
<data>
<template
id="mail_to_assets_backend"
name="mail_to_assets_backend"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside">
<link rel="stylesheet" href="/mail_to/static/src/css/mail_to.css" />
</xpath>
</template>
</data>
</openerp>

53
mail_to/tests/test_default.py

@ -1,53 +0,0 @@
from werkzeug import url_encode
import odoo.tests
@odoo.tests.common.at_install(True)
@odoo.tests.common.post_install(True)
class TestUi(odoo.tests.HttpCase):
def test_01_mail_to(self):
# checks the presence of an element with a link to the recipient
env = self.env
# 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.
env["ir.module.module"].search(
[("name", "=", "mail_to")], limit=1
).state = "installed"
# Handle messages in Odoo
res_users_ids = env["res.users"].search([])
res_users_ids.write({"notification_type": "inbox"})
# demo messages
partner_ids = env["res.partner"].search([])
msg = env["mail.message"].create(
{
"subject": "_Test",
"body": self._testMethodName,
"subtype_id": self.ref("mail.mt_comment"),
"model": "mail.channel",
"partner_ids": [(6, 0, [i.id for i in partner_ids])],
}
)
# notifications for everyone
for p in partner_ids.ids:
env["mail.notification"].create(
{"res_partner_id": p, "mail_message_id": msg.id, "is_read": False}
)
code = """
setTimeout(function () {
console.log($('a.recipient_link').length && 'ok' || 'error');
}, 3000);
"""
link = "/web#%s" % url_encode({"action": "mail.action_discuss"})
self.phantom_js(
link,
code,
"odoo.__DEBUG__.services['web_tour.tour'].tours.mail_tour.ready",
login="admin",
)
Loading…
Cancel
Save