diff --git a/content/applications/productivity/discuss/advanced/email_servers.rst b/content/applications/productivity/discuss/advanced/email_servers.rst index 669346bb4..0a04ef33a 100644 --- a/content/applications/productivity/discuss/advanced/email_servers.rst +++ b/content/applications/productivity/discuss/advanced/email_servers.rst @@ -60,7 +60,8 @@ Then set your email domain name in the General Settings. Can I use an Office 365 server ------------------------------ You can use an Office 365 server if you run Odoo on-premise. -Office 365 SMTP relays are not compatible with Odoo Online. +Office 365 SMTP relays are not compatible with Odoo Online unless you configure +Odoo to force the outgoing "From" address (see below). Please refer to `Microsoft's documentation `__ to configure a SMTP relay for your Odoo's IP address. @@ -108,6 +109,48 @@ Restriction ----------- Please note that the port 25 is blocked for security reasons. Try using 587, 465 or 2525. +Choose allowed "From" email addresses +------------------------------------- + +Sometimes, an email's "From" (outgoing) address can belong to a different +domain, and that can be a problem. + +For example, if a customer with address *mary@customer.example.com* responds to +a message, Odoo will try to redistribute that same email to other subscribers +in the thread. But if the domain *customer.example.com* forbids that kind of +usage for security (kudos for that), the Odoo's redistributed email would get +rejected by some recipients' mail servers. + +To avoid those kind of problems, you should make sure all emails use a "From" +address from your authorized domain. + +If your MTA supports `SRS (Sender Rewriting Scheme) +`_, you can enable it +to handle these situations. However, that is more complex and requires more +technical knowledge that is not meant to be covered by this documentation. + +Instead, you can also configure Odoo to do something similar by itself: + +#. Set your domain name in the General Settings. + + .. image:: media/alias_domain.png + :align: center + +#. In developer mode, go to :menuselection:`Settings --> Technical --> + Parameters --> System Parameters`. + +#. Add one system parameter from these: + + * If you want *all* your outgoing messages to use the same "From" address, + use the key ``mail.force.smtp.from`` and set that address as value + (such as ``outgoing@mycompany.example.com``). + + * If you want to keep the original "From" address for emails that use your + same domain, but change it for emails that use a different domain, use + the key ``mail.dynamic.smtp.from`` and set as value the email address + that should be used in those cases (such as + ``outgoing@mycompany.example.com``). + .. _discuss/email_servers/inbound_messages: How to manage inbound messages diff --git a/extensions/odoo_theme/__init__.py b/extensions/odoo_theme/__init__.py index 4e61aaefb..5ae55222c 100644 --- a/extensions/odoo_theme/__init__.py +++ b/extensions/odoo_theme/__init__.py @@ -59,16 +59,23 @@ def resolve(old_resolve, tree, docname, *args, **kwargs): _update_toctree_nodes(_subnode) def _get_docname(_node): - """ - docname = a/b/c/the_page_being_rendered + """ Return the docname of the targeted document. + + docname = some_common_root/foo/bar/the_page_being_rendered _ref = ../../contributing/documentation _path_parts = ['..', '..', 'contributing', 'documentation'] - _res = ['a', 'contributing', 'documentation'] - _docname = a/contributing/documentation + _res = ['some_common_root', 'contributing', 'documentation'] + _docname = some_common_root/contributing/documentation + + :return: The docname of the document targeted by `_node`, i.e. the relative path from the + documentation source directory (the `content/` directory) + :rtype: str """ _ref = _node['refuri'].replace('.html', '') _parent_directory_occurrences = _ref.count('..') - if not _parent_directory_occurrences: # The ref is already the docname + if not _parent_directory_occurrences and '/' not in docname: + # The current document is at the root of the documentation source directory + # (e.g. docname == 'index'|'applications'|...). i.e., the ref is already the docname. _docname = _ref else: _path_parts = _ref.split('/') diff --git a/extensions/odoo_theme/layout.html b/extensions/odoo_theme/layout.html index 0c1a31f44..c0ccb1a51 100644 --- a/extensions/odoo_theme/layout.html +++ b/extensions/odoo_theme/layout.html @@ -79,6 +79,10 @@ {%- set main_classes = main_classes + ['o_index'] %} {%- endif %} + {%- if 'show-content' in meta %} {# The page is an accessible toctree #} + {%- set main_classes = main_classes + ['o_hide_toc'] %} + {%- endif %} + {%- if 'code-column' in meta %} {# The page contains a 'memento' (dynamic side block) #} {%- set main_classes = main_classes + ['o_has_code_column'] %} {%- endif %} @@ -110,7 +114,8 @@ {%- endif %} {%- if 'hide-page-toc' not in meta %} -