Metadata-Version: 2.1
Name: odoo-addon-mail_brand
Version: 18.0.1.0.0.2
Requires-Python: >=3.10
Requires-Dist: odoo-addon-brand==18.0.*
Requires-Dist: odoo==18.0.*
Summary: If a model has a brand defined to it, emails send from this model will be branded accordingly.
Home-page: https://github.com/OCA/brand
License: AGPL-3
Author: Odoo Community Association (OCA), Gert Pellin / Snakebyte Development, bosd
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 18.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

===========
Email Brand
===========

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

.. |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%2Fbrand-lightgray.png?logo=github
    :target: https://github.com/OCA/brand/tree/18.0/mail_brand
    :alt: OCA/brand
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/brand-18-0/brand-18-0-mail_brand
    :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/brand&target_branch=18.0
    :alt: Try me on Runboat

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

This module enhances Odoo's email communication with branding
capabilities.

**Key Features:**

- **Comprehensive Email Branding:** Automatically applies branding to
  outgoing emails. This includes:

  - Displaying the correct brand logo, derived from the linked partner's
    image.
  - Setting the sender's company details (website, address, phone
    number) according to the selected brand's information.

- **Website Contextualization:** Dynamically adjusts the base URL for
  links within emails to reflect the website associated with a selected
  brand.

- **Brand Selection in Email compose wizard:** Extends the standard
  "Compose Email" wizard with a 'Brand' selection field. This allows
  users to explicitly apply a brand to outgoing emails, particularly
  useful when the originating record isn't directly linked to a brand.

- **Dynamic Logo Delivery:** Includes a custom controller to serve the
  appropriate brand logo in emails based on the selected brand context.

**Table of contents**

.. contents::
   :local:

Use Cases / Context
===================

**In summary:**

The module prioritizes automatic branding based on the originating
record. If no brand is associated with the record, or if you need to
override it, you can manually select a brand in the "Compose Email"
wizard. Ensure your brands are correctly configured with linked partners
and logos for the branding to appear in your outgoing emails.

Usage
=====

**1. Defining Brands:**

- Navigate to **Contacts > Brands**.

- Create new brand records. For each brand, you can:

  - **Partner:** Link the brand to an existing partner (company). The
    logo displayed in emails will be derived from the image of this
    partner. Ensure the partner has a logo uploaded (visible in the
    contact form).
  - **Website:** Optionally specify a website URL associated with the
    brand. This URL may be used for links in emails.

**2. Automatic Email Branding (Based on Originating Record):**

- When sending emails from records that have a ``brand_id`` field
  populated (e.g., Sales Orders, Invoices, or other relevant models),
  the module will automatically attempt to use the branding associated
  with that record's brand.
- The email will display the logo of the linked brand, and any company
  details (website, address, phone number) in the email footer should
  correspond to the brand's partner information.

**3. Manual Brand Selection (Using the Compose Email Wizard):**

- When composing a new email (e.g., via the "Send message" button in the
  chatter or through other email actions), a **Brand** field will be
  available in the "Compose Email" wizard. ( The brand field is only
  available in the full view of the compose wizard. )

- Usefull if the originating record does not have a ``brand_id`` set, or
  if you want to use a different brand for this specific email:

     1. Open the "Compose Email" wizard.
     2. In the wizard form, select the desired brand from the **Brand**
        dropdown field.
     3. Compose your email content as usual.
     4. Click **Send**.

- The email sent will then use the logo and company details associated
  with the brand you selected in the wizard.

**4. Website Links in Emails:**

- If a website is defined for the selected brand, the module may use
  this website URL for any relevant links included in the email.

Known issues / Roadmap
======================

- If the brand module gets implemented more broadly this module could
  need extension to work properly, because not all odoo modules use the
  same mail templates
- Color the buttons & other elements in the email according to brand
  style.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/brand/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/brand/issues/new?body=module:%20mail_brand%0Aversion:%2018.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
-------

* Gert Pellin / Snakebyte Development
* bosd

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

- Gert Pellin <gert@pellin.be>
- Bosd

Other credits
-------------



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.

.. |maintainer-switch87| image:: https://github.com/switch87.png?size=40px
    :target: https://github.com/switch87
    :alt: switch87
.. |maintainer-bosd| image:: https://github.com/bosd.png?size=40px
    :target: https://github.com/bosd
    :alt: bosd

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-switch87| |maintainer-bosd| 

This module is part of the `OCA/brand <https://github.com/OCA/brand/tree/18.0/mail_brand>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
