Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions mail_print/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==================
Mail Print Message
==================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ef9ffe7463dc147e31966e169fe9bac11d464536d350c52b4be536e88a7ecba9
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmail-lightgray.png?logo=github
:target: https://github.com/OCA/mail/tree/19.0/mail_print
:alt: OCA/mail
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/mail-19-0/mail-19-0-mail_print
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/mail&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows users to print messages from the chatter of any
document.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, follow these steps:

1. Navigate to the chatter of any document.
2. Hover the mouse over any message in the chatter (excluding internal
notes).
3. A print icon will appear next to the message.
4. Click the print icon to generate a printable version of the message.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/mail/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/mail/issues/new?body=module:%20mail_print%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__:

- Carlos Lopez
- Eduardo Ezerouali

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/mail <https://github.com/OCA/mail/tree/19.0/mail_print>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Empty file added mail_print/__init__.py
Empty file.
26 changes: 26 additions & 0 deletions mail_print/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2024 Tecnativa - Carlos Lopez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Mail Print Message",
"version": "19.0.1.0.0",
"summary": "Print messages from the chatter of any document. ",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/mail",
"depends": ["mail", "contacts"],
"data": [
"data/report_paperformat_data.xml",
"reports/report_mail_message.xml",
"reports/reports.xml",
],
"assets": {
"web.assets_backend": [
"mail_print/static/src/**/*.esm.js",
],
"web.assets_tests": [
"mail_print/static/tests/tours/**/*",
],
},
"installable": True,
"auto_install": False,
"license": "AGPL-3",
}
13 changes: 13 additions & 0 deletions mail_print/data/report_paperformat_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="report_paperformat_mail_message" model="report.paperformat">
<field name="name">Mail Message</field>
<field name="format">A4</field>
<field name="orientation">Portrait</field>
<field name="margin_top">30</field>
<field name="margin_bottom">20</field>
<field name="margin_left">5</field>
<field name="margin_right">5</field>
<field name="header_spacing">25</field>
</record>
</odoo>
58 changes: 58 additions & 0 deletions mail_print/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_print
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-01 12:27+0000\n"
"PO-Revision-Date: 2024-10-01 07:28-0500\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: Poedit 3.0.1\n"

#. module: mail_print
#: model:ir.actions.report,print_report_name:mail_print.mail_message_report
msgid "(object.display_name)"
msgstr ""

#. module: mail_print
#: model_terms:ir.ui.view,arch_db:mail_print.report_mail_message_document
msgid ""
"<br/>\n"
" <strong>Reply-To: </strong>"
msgstr ""
"<br/>\n"
" <strong>Responder a: </strong>"

#. module: mail_print
#: model_terms:ir.ui.view,arch_db:mail_print.report_mail_message_document
msgid ""
"<br/>\n"
" <strong>To: </strong>"
msgstr ""
"<br/>\n"
" <strong>Para: </strong>"

#. module: mail_print
#: model_terms:ir.ui.view,arch_db:mail_print.report_mail_message_document
msgid "<strong>Date: </strong>"
msgstr "<strong>Fecha: </strong>"

#. module: mail_print
#: model:ir.actions.report,name:mail_print.mail_message_report
msgid "Message"
msgstr "Mensaje"

#. module: mail_print
#. odoo-javascript
#: code:addons/mail_print/static/src/components/print_message/print_message.xml:0
#, python-format
msgid "Print Message"
msgstr "Imprimir Mensaje"
58 changes: 58 additions & 0 deletions mail_print/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_print
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-01-19 14:06+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.6.2\n"

#. module: mail_print
#: model:ir.actions.report,print_report_name:mail_print.mail_message_report
msgid "(object.display_name)"
msgstr "(object.display_name)"

#. module: mail_print
#: model_terms:ir.ui.view,arch_db:mail_print.report_mail_message_document
msgid ""
"<br/>\n"
" <strong>Reply-To: </strong>"
msgstr ""
"<br/>\n"
" <strong>Rispondi a: </strong>"

#. module: mail_print
#: model_terms:ir.ui.view,arch_db:mail_print.report_mail_message_document
msgid ""
"<br/>\n"
" <strong>To: </strong>"
msgstr ""
"<br/>\n"
" <strong>A: </strong>"

#. module: mail_print
#: model_terms:ir.ui.view,arch_db:mail_print.report_mail_message_document
msgid "<strong>Date: </strong>"
msgstr "<strong>Data: </strong>"

#. module: mail_print
#: model:ir.actions.report,name:mail_print.mail_message_report
msgid "Message"
msgstr "Messaggio"

#. module: mail_print
#. odoo-javascript
#: code:addons/mail_print/static/src/components/print_message/print_message.xml:0
#: code:addons/mail_print/static/src/components/print_message/print_message.xml:0
#, python-format
msgid "Print Message"
msgstr "Stampa messaggio"
51 changes: 51 additions & 0 deletions mail_print/i18n/mail_print.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_print
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: mail_print
#: model:ir.actions.report,print_report_name:mail_print.mail_message_report
msgid "(object.display_name)"
msgstr ""

#. module: mail_print
#: model_terms:ir.ui.view,arch_db:mail_print.report_mail_message_document
msgid ""
"<br/>\n"
" <strong>Reply-To: </strong>"
msgstr ""

#. module: mail_print
#: model_terms:ir.ui.view,arch_db:mail_print.report_mail_message_document
msgid ""
"<br/>\n"
" <strong>To: </strong>"
msgstr ""

#. module: mail_print
#: model_terms:ir.ui.view,arch_db:mail_print.report_mail_message_document
msgid "<strong>Date: </strong>"
msgstr ""

#. module: mail_print
#: model:ir.actions.report,name:mail_print.mail_message_report
msgid "Message"
msgstr ""

#. module: mail_print
#. odoo-javascript
#: code:addons/mail_print/static/src/components/print_message/print_message.xml:0
#: code:addons/mail_print/static/src/components/print_message/print_message.xml:0
#, python-format
msgid "Print Message"
msgstr ""
3 changes: 3 additions & 0 deletions mail_print/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions mail_print/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- [Tecnativa](https://www.tecnativa.com):

- Carlos Lopez
- Eduardo Ezerouali
2 changes: 2 additions & 0 deletions mail_print/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module allows users to print messages from the chatter of any
document.
7 changes: 7 additions & 0 deletions mail_print/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
To use this module, follow these steps:

1. Navigate to the chatter of any document.
2. Hover the mouse over any message in the chatter (excluding internal
notes).
3. A print icon will appear next to the message.
4. Click the print icon to generate a printable version of the message.
36 changes: 36 additions & 0 deletions mail_print/reports/report_mail_message.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="report_mail_message_document">
<t t-call="web.external_layout">
<div class="page">
<hr />
<h2 t-out="o.subject" />
<hr />
<div class="row col-12">
<strong>Date: </strong>
<span t-out="o.date" />
<br />
<strong t-out="o.email_from" />
<br />
<strong>Reply-To: </strong>
<span t-out="o.reply_to" />
<br />
<strong>To: </strong>
<span
t-out="';'.join([notification.res_partner_id.email_formatted for notification in o.notification_ids if notification.res_partner_id.email_formatted])"
/>
</div>
<p t-out="o.body" />
</div>
</t>
</template>

<template id="report_mail_message">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-set="lang" t-value="o.author_id.lang" />
<t t-call="mail_print.report_mail_message_document" t-lang="lang" />
</t>
</t>
</template>
</odoo>
12 changes: 12 additions & 0 deletions mail_print/reports/reports.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="mail_message_report" model="ir.actions.report">
<field name="name">Message</field>
<field name="model">mail.message</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">mail_print.report_mail_message</field>
<field name="report_file">mail_print.report_mail_message</field>
<field name="print_report_name">(object.display_name)</field>
<field name="paperformat_id" ref="report_paperformat_mail_message" />
</record>
</odoo>
Binary file added mail_print/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading