|
| 1 | +================= |
| 2 | +Mail Layout Force |
| 3 | +================= |
| 4 | + |
| 5 | +.. |
| 6 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 7 | + !! This file is generated by oca-gen-addon-readme !! |
| 8 | + !! changes will be overwritten. !! |
| 9 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 10 | + !! source digest: sha256:75c9b356ed3fb4496d5dedee1dfa1599e2cba7e8b8558728c0c1dba22a87b1c2 |
| 11 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 12 | +
|
| 13 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png |
| 14 | + :target: https://odoo-community.org/page/development-status |
| 15 | + :alt: Beta |
| 16 | +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png |
| 17 | + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
| 18 | + :alt: License: AGPL-3 |
| 19 | +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github |
| 20 | + :target: https://github.com/OCA/social/tree/16.0/mail_layout_force |
| 21 | + :alt: OCA/social |
| 22 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 23 | + :target: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_layout_force |
| 24 | + :alt: Translate me on Weblate |
| 25 | +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png |
| 26 | + :target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=16.0 |
| 27 | + :alt: Try me on Runboat |
| 28 | + |
| 29 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 30 | + |
| 31 | +Odoo will add a default email layout on most commercial communications. |
| 32 | + |
| 33 | +The email layout is a ``QWeb`` view that ends up wrapping the message body |
| 34 | +when sending an email. It usually displays the related document reference, |
| 35 | +the company logo, and a small footer saying "Powered by Odoo". |
| 36 | + |
| 37 | +There are notably two main layouts used in Odoo, and the user can't control when |
| 38 | +they're used, as it's hardcoded into the different applications. |
| 39 | + |
| 40 | +* ``mail.message_notification_email`` |
| 41 | +* ``mail.mail_notification_light`` |
| 42 | +* ``mail.mail_notification_paynow`` |
| 43 | + |
| 44 | +This module allows to force a specific layout for a given ``email.template``, |
| 45 | +effectively overwritting the one hardcoded by Odoo. Additionally, it enables |
| 46 | +forcing a custom layout for emails that do not use an existing ``email.template`` |
| 47 | +record (e.g., when sending an email from the chatter). |
| 48 | + |
| 49 | +This allows you to fully customize the way Odoo emails are rendered and sent |
| 50 | +to your customers. |
| 51 | + |
| 52 | +**Table of contents** |
| 53 | + |
| 54 | +.. contents:: |
| 55 | + :local: |
| 56 | + |
| 57 | +Configuration |
| 58 | +============= |
| 59 | + |
| 60 | +#. Go to Settings > Technical > Emails > Templates |
| 61 | +#. Open the desired ``email.template`` record. |
| 62 | +#. In Advanced Parameters tab, find the Force Layout field. |
| 63 | + |
| 64 | +You can leave it empty to use the default email layout (chosen by Odoo). |
| 65 | +You can force a custom email layout of your own. |
| 66 | +You can use the *Mail: No-Layout notification template* to prevent Odoo |
| 67 | +from adding a layout. |
| 68 | + |
| 69 | +To configure a custom layout of your own, some technical knowledge is needed. |
| 70 | +You can see how the existing layouts are defined for details or inspiration: |
| 71 | + |
| 72 | +* ``mail.mail_notification_light`` |
| 73 | +* ``mail.mail_notification_paynow`` |
| 74 | +* ``mail.mail_notification_borders`` |
| 75 | + |
| 76 | +To force a new custom layout for emails that do not use an existing ``email.template`` |
| 77 | +record (e.g., emails sent from the chatter): |
| 78 | + |
| 79 | +#. Go to Settings > Technical > User Interface > Views. |
| 80 | +#. Copy the current layout (e.g., mail.message_notification_email) to create a new one, and remove any parts you don’t need. |
| 81 | +#. Open the layout that you want to swap with a substitute. Then, under the Layout Mapping tab: |
| 82 | + * Set ``Substitute Layout`` to the new custom layout you created. |
| 83 | + * Set ``Models`` if you want to apply the replacement only to specific models. If left empty, |
| 84 | + the email layout will be replaced for all models. |
| 85 | + |
| 86 | +Bug Tracker |
| 87 | +=========== |
| 88 | + |
| 89 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_. |
| 90 | +In case of trouble, please check there if your issue has already been reported. |
| 91 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 92 | +`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_layout_force%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 93 | + |
| 94 | +Do not contact contributors directly about support or help with technical issues. |
| 95 | + |
| 96 | +Credits |
| 97 | +======= |
| 98 | + |
| 99 | +Authors |
| 100 | +~~~~~~~ |
| 101 | + |
| 102 | +* Camptocamp |
| 103 | + |
| 104 | +Contributors |
| 105 | +~~~~~~~~~~~~ |
| 106 | + |
| 107 | +* `Camptocamp <https://www.camptocamp.com>`_ |
| 108 | + |
| 109 | + * Iván Todorovich <ivan.todorovich@camptocamp.com> |
| 110 | +* Abraham Anes <abrahamanes@gmail.com> |
| 111 | +* `Quartile <https://www.quartile.co>`_ |
| 112 | + |
| 113 | + * Aung Ko Ko Lin |
| 114 | + * Yoshi Tashiro |
| 115 | + |
| 116 | +Maintainers |
| 117 | +~~~~~~~~~~~ |
| 118 | + |
| 119 | +This module is maintained by the OCA. |
| 120 | + |
| 121 | +.. image:: https://odoo-community.org/logo.png |
| 122 | + :alt: Odoo Community Association |
| 123 | + :target: https://odoo-community.org |
| 124 | + |
| 125 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 126 | +mission is to support the collaborative development of Odoo features and |
| 127 | +promote its widespread use. |
| 128 | + |
| 129 | +.. |maintainer-ivantodorovich| image:: https://github.com/ivantodorovich.png?size=40px |
| 130 | + :target: https://github.com/ivantodorovich |
| 131 | + :alt: ivantodorovich |
| 132 | + |
| 133 | +Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: |
| 134 | + |
| 135 | +|maintainer-ivantodorovich| |
| 136 | + |
| 137 | +This module is part of the `OCA/social <https://github.com/OCA/social/tree/16.0/mail_layout_force>`_ project on GitHub. |
| 138 | + |
| 139 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments