Skip to content

Commit

Permalink
Merge PR #1453 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Oct 3, 2024
2 parents 1355ecf + 7c6e71e commit 33f5d56
Show file tree
Hide file tree
Showing 19 changed files with 892 additions and 0 deletions.
81 changes: 81 additions & 0 deletions mail_print/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
==================
Mail Print Message
==================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:dd21150507ec3adfe337e04f08c50127d7ecd7644dde4d56e77ce0ba6723ddd0
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/licence-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%2Fsocial-lightgray.png?logo=github
:target: https://github.com/OCA/social/tree/15.0/mail_print
:alt: OCA/social
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/social-15-0/social-15-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/social&target_branch=15.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/social/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/social/issues/new?body=module:%20mail_print%0Aversion:%2015.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

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/social <https://github.com/OCA/social/tree/15.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.
29 changes: 29 additions & 0 deletions mail_print/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2024 Tecnativa - Carlos Lopez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Mail Print Message",
"version": "15.0.1.0.0",
"summary": "Print messages from the chatter of any document. ",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/social",
"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/components/**/*.esm.js",
],
"web.assets_qweb": [
"mail_print/static/src/components/*/*.xml",
],
"web.assets_tests": [
"mail_print/static/tests/tours/**/*",
],
},
"installable": True,
"auto_install": False,
"license": "AGPL-3",
}
15 changes: 15 additions & 0 deletions mail_print/data/report_paperformat_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?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
#. openerp-web
#: code:addons/mail_print/static/src/components/print_message/print_message.xml:0
#, python-format
msgid "Print Message"
msgstr "Imprimir Mensaje"
53 changes: 53 additions & 0 deletions mail_print/i18n/mail_print.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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 12:27+0000\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
#. openerp-web
#: 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 ""
1 change: 1 addition & 0 deletions mail_print/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module allows users to print messages from the chatter of any document.
6 changes: 6 additions & 0 deletions mail_print/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
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.
31 changes: 31 additions & 0 deletions mail_print/reports/report_mail_message.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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>
13 changes: 13 additions & 0 deletions mail_print/reports/reports.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?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>
Loading

0 comments on commit 33f5d56

Please sign in to comment.