@ -28,6 +28,7 @@ Contributors
------------
* Rami Alwafaie <rami.alwafaie@initos.com>
* Mathias Francke <mathias.francke@initos.com>
Maintainer
----------
@ -14,9 +14,14 @@
'depends': [
'report',
'mail',
'web',
],
'data': [
'report.xml',
'views/mail_message_report.xml',
'views/templates.xml',
'qweb': [
'static/src/xml/mail.xml',
}
@ -0,0 +1,4 @@
.openerp .oe_mail .oe_msg .oe_msg_icons .oe_mail_print:hover a{
color: #1FFF10;
text-shadow: 0px 1px #149E0B,0px -1px #149E0B, -1px 0px #149E0B, 1px 0px #149E0B, 0px 3px 3px rgba(0,0,0,0.1);
@ -0,0 +1,17 @@
openerp.mail_print = function(instance) {
instance.mail.ThreadMessage.include({
bind_events: function () {
this._super();
this.$('.oe_mail_print').on('click', this.on_mail_print);
},
on_mail_print: function (event) {
event.preventDefault();
this.session.get_file({
'url': '/report/download',
'data': {'data': '["/report/pdf/mail_print.mail_message/' + this.id + '","qweb-pdf"]'}
});
};
@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="mail.thread.message">
<t t-jquery="div[class=oe_msg_center] div[class=oe_msg_icons]" t-operation="append">
<span class='oe_mail_print'><a title="Print Email" class="oe_e"><</a></span>
</t>
</templates>
@ -0,0 +1,12 @@
<openerp>
<data>
<template id="assets_backend" name="mail_print assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/mail_print/static/src/js/mail.js"></script>
<link rel="stylesheet" href="/mail_print/static/src/css/mail.css"/>
</xpath>
</template>
</data>
</openerp>