diff --git a/content/applications/finance.rst b/content/applications/finance.rst index 67be59b0a..56ab1b6c4 100644 --- a/content/applications/finance.rst +++ b/content/applications/finance.rst @@ -7,4 +7,5 @@ Finance finance/accounting finance/expenses - finance/sign + finance/documents + finance/sign \ No newline at end of file diff --git a/content/applications/finance/documents.rst b/content/applications/finance/documents.rst new file mode 100644 index 000000000..940319431 --- /dev/null +++ b/content/applications/finance/documents.rst @@ -0,0 +1,124 @@ +========= +Documents +========= + +**Odoo Documents** allows you to store, view and manage files within Odoo. + +You can upload any type of file (max 64MB per file on Odoo Online/SaaS), and organize them in +various workspaces. + +.. seealso:: + - `Odoo Documents: product page `_ + +Workflow actions +================ + +Workflow actions are automated actions you can create and customize at the level of each +workspace. They appear next to a file whenever it meets the criteria you set. That way you can, +for example, add tags to a file or move it to another workspace with a single click. Workflow +actions help you streamline the management of your documents and your overall business operations. + +Create workflow actions +----------------------- + +To create workflow actions, go to :menuselection:`Documents --> Configuration --> Workspaces` and +select the workspace where the action should apply. Click on the *Actions* smart button, and then +on *Create*. + +.. image:: documents/access-workflow-actions.png + :align: center + :alt: Workflow actions smart button in Odoo Documents + +.. note:: + An action applies to all *Child Workspaces* under the *Parent Workspace* you selected. + +.. tip:: + If you use the :doc:`developer mode <../general/developer_mode/activate>`, you can directly + access all your actions by going to :menuselection:`Documents --> Configuration --> Actions`. + +Set the conditions +------------------ + +After naming your workflow action, you can set the conditions that trigger the appearance of the +action button on the right-side panel when selecting a file. + +There are three basic types of conditions you can set: + +#. **Tags**: you can both use the *Contains* and *Does not contain* conditions, meaning the files + *must have* or *mustn't have* the tags set here. + +#. **Contact**: the files must be associated with the contact set here. + +#. **Owner**: the files must be associated with the owner set here. + +.. image:: documents/basic-condition-example.png + :align: center + :alt: Example of a workflow action's basic condition in Odoo Documents + +.. tip:: + If you don't set any conditions, the action button appears for all files located inside the + selected workspace. + +Advanced condition type: domain +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. important:: + It is recommended to have some knowledge of Odoo development to properly configure *Domain* + filters. + +To access the *Domain* condition, the :doc:`developer mode <../general/developer_mode/activate>` +needs to be activated. Once that's done, select the *Domain* condition type, and click on *Add +Filter*. + +.. image:: documents/activate-domain-condition.png + :align: center + :alt: Activating the domain condition type in Odoo Documents + +To create a rule, you typically select a field, an operator, and a value. For example, if you want +to add a workflow action to all the PDF files inside a workspace, set the field to *Mime Type*, the +operator to *contains*, and the value to *pdf*. + +.. image:: documents/domain-condition-example.png + :align: center + :alt: Example of a workflow action's domain condition in Odoo Documents + +Click on *Add node* (plus-circle icon) and *Add branch* (ellipsis icon) to add conditions and +sub-conditions. You can then specify if your rule should match *ALL* or *ANY* conditions. You can +also edit the rule directly using the *Code editor*. + +.. image:: documents/use-domain-condition.png + :align: center + :alt: Add a node or a branch to a workflow action's condition in Odoo Documents + +Configure the actions +--------------------- + +Select the *Actions* tab to set up your action. You can simultaneously: + +- **Set Contact**: add a contact to the file, or replace an existing contact with a new one. +- **Set Owner**: add an owner to the file, or replace an existing owner with a new one. +- **Move to Workspace**: move the file to any workspace. +- **Create**: create one of the following items attached to the file in your database: + + - **Product template**: create a product you can edit directly. + - **Task**: create a Project task you can edit directly. + - **Signature request**: create a new Sign template to send out. + - **Sign directly**: create a Sign template to sign directly. + - **Vendor bill**: create a vendor bill using OCR and AI to scrape information from the file + content. + - **Customer invoice**: create a customer invoice using OCR and AI to scrape information from + the file. + - **Vendor credit note**: create a vendor credit note using OCR and AI to scrape information + from the file. + - **Credit note**: create a customer credit note using OCR and AI to scrape information from + the file. + - **Applicant**: create a new HR application you can edit directly. + +- **Set Tags**: add, remove, and replace any number of tags. +- **Activities - Mark all as Done**: mark all activities linked to the file as done. +- **Activities - Schedule Activity**: create a new activity linked to the file as configured in + the action. You can choose to set the activity on the document owner. + +.. image:: documents/workflow-action-example.png + :align: center + :alt: Example of a workflow action Odoo Documents \ No newline at end of file diff --git a/content/applications/finance/documents/access-workflow-actions.png b/content/applications/finance/documents/access-workflow-actions.png new file mode 100644 index 000000000..4de985a82 Binary files /dev/null and b/content/applications/finance/documents/access-workflow-actions.png differ diff --git a/content/applications/finance/documents/activate-domain-condition.png b/content/applications/finance/documents/activate-domain-condition.png new file mode 100644 index 000000000..477ec4895 Binary files /dev/null and b/content/applications/finance/documents/activate-domain-condition.png differ diff --git a/content/applications/finance/documents/basic-condition-example.png b/content/applications/finance/documents/basic-condition-example.png new file mode 100644 index 000000000..15c8037dd Binary files /dev/null and b/content/applications/finance/documents/basic-condition-example.png differ diff --git a/content/applications/finance/documents/domain-condition-example.png b/content/applications/finance/documents/domain-condition-example.png new file mode 100644 index 000000000..7af878b01 Binary files /dev/null and b/content/applications/finance/documents/domain-condition-example.png differ diff --git a/content/applications/finance/documents/use-domain-condition.png b/content/applications/finance/documents/use-domain-condition.png new file mode 100644 index 000000000..1e59123b8 Binary files /dev/null and b/content/applications/finance/documents/use-domain-condition.png differ diff --git a/content/applications/finance/documents/workflow-action-example.png b/content/applications/finance/documents/workflow-action-example.png new file mode 100644 index 000000000..c3bb6c605 Binary files /dev/null and b/content/applications/finance/documents/workflow-action-example.png differ diff --git a/content/applications/general/voip/axivox.rst b/content/applications/general/voip/axivox.rst index a2981475b..96c5428a9 100644 --- a/content/applications/general/voip/axivox.rst +++ b/content/applications/general/voip/axivox.rst @@ -17,7 +17,7 @@ Configuration Go to :menuselection:`Apps` and install the **VoIP Module**. -.. image:: media/axivox-voip-installation.png +.. image:: axivox/voip-installation.png :align: center :alt: VoIP module installation on an Odoo database @@ -29,21 +29,28 @@ Go to :menuselection:`Settings --> General Settings --> Integrations`, and fill - **WebSocket**: type in ``wss://pabx.axivox.com:3443`` - **VoIP Environment**: set as *Production* -.. image:: media/axivox-voip-configuration.png +.. image:: axivox/voip-configuration.png :align: center :alt: Integration of Axivox as VoIP provider in an Odoo database +Configure the VOIP user in the Odoo's user +------------------------------------------ + Go to :menuselection:`Settings --> Users & Companies --> Users`, then open the user's form you want to configure. Under the **Preferences** tab, fill out the section **PBX Configuration**: - **SIP Login / Browser's Extension**: the Axivox *username* - **SIP Password**: the Axivox *SIP Password* +.. image:: axivox/odoo-user.png + :align: center + :alt: Integration of Axivox user in the Odoo user preference + .. note:: You can find all this information by logging in at https://manage.axivox.com/, selecting the user you want to configure, and referring to the fields as pictured below. - .. image:: media/axivox-manager-sip.png + .. image:: axivox/manager-sip.png :align: center :alt: SIP credentials in the Axivox manager @@ -57,7 +64,7 @@ You can also receive phone calls. Odoo rings and displays a notification. .. note:: Your number is the one provided by Axivox. -.. image:: media/axivox-incoming-call.png +.. image:: axivox/incoming-call.png :align: center :alt: Incoming VoIP call in Odoo @@ -65,7 +72,7 @@ You can also receive phone calls. Odoo rings and displays a notification. If you see a *Missing Parameter* message in the **Odoo softphone**, refresh your Odoo window and try again. - .. image:: media/axivox-missing-parameter.png + .. image:: axivox/missing-parameter.png :align: center :alt: "Missing Parameter" error message in the Odoo softphone @@ -74,6 +81,6 @@ You can also receive phone calls. Odoo rings and displays a notification. international format, leading with the plus (+) sign followed by the international country code. E.g., +16506913277 (where +1 is the international prefix for the United States). - .. image:: media/axivox-incorrect-number.png + .. image:: axivox/incorrect-number.png :align: center :alt: "Incorrect Number" error message in the Odoo softphone \ No newline at end of file diff --git a/content/applications/general/voip/media/axivox-incoming-call.png b/content/applications/general/voip/axivox/incoming-call.png similarity index 100% rename from content/applications/general/voip/media/axivox-incoming-call.png rename to content/applications/general/voip/axivox/incoming-call.png diff --git a/content/applications/general/voip/media/axivox-incorrect-number.png b/content/applications/general/voip/axivox/incorrect-number.png similarity index 100% rename from content/applications/general/voip/media/axivox-incorrect-number.png rename to content/applications/general/voip/axivox/incorrect-number.png diff --git a/content/applications/general/voip/media/axivox-manager-sip.png b/content/applications/general/voip/axivox/manager-sip.png similarity index 100% rename from content/applications/general/voip/media/axivox-manager-sip.png rename to content/applications/general/voip/axivox/manager-sip.png diff --git a/content/applications/general/voip/media/axivox-missing-parameter.png b/content/applications/general/voip/axivox/missing-parameter.png similarity index 100% rename from content/applications/general/voip/media/axivox-missing-parameter.png rename to content/applications/general/voip/axivox/missing-parameter.png diff --git a/content/applications/general/voip/axivox/odoo-user.png b/content/applications/general/voip/axivox/odoo-user.png new file mode 100644 index 000000000..1d3ed8004 Binary files /dev/null and b/content/applications/general/voip/axivox/odoo-user.png differ diff --git a/content/applications/general/voip/media/axivox-voip-configuration.png b/content/applications/general/voip/axivox/voip-configuration.png similarity index 100% rename from content/applications/general/voip/media/axivox-voip-configuration.png rename to content/applications/general/voip/axivox/voip-configuration.png diff --git a/content/applications/general/voip/media/axivox-voip-installation.png b/content/applications/general/voip/axivox/voip-installation.png similarity index 100% rename from content/applications/general/voip/media/axivox-voip-installation.png rename to content/applications/general/voip/axivox/voip-installation.png diff --git a/content/applications/inventory_and_mrp/manufacturing/management/bill_configuration.rst b/content/applications/inventory_and_mrp/manufacturing/management/bill_configuration.rst index ef6178136..a6183eab2 100644 --- a/content/applications/inventory_and_mrp/manufacturing/management/bill_configuration.rst +++ b/content/applications/inventory_and_mrp/manufacturing/management/bill_configuration.rst @@ -33,6 +33,10 @@ type, which is *Manufacture this Product*. .. image:: media/bills_of_materials_01.png :align: center +.. warning:: + The destination location should **not** be a scrap location. A scrap location is where you put + products that you don't need. + Using the same BoM to describe Variants --------------------------------------- @@ -87,4 +91,4 @@ mind that you need to register during which operation your by-product is produced. .. image:: media/bills_of_materials_06.png - :align: center \ No newline at end of file + :align: center 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/content/developer/howtos/rdtraining/16_guidelines_pr.rst b/content/developer/howtos/rdtraining/16_guidelines_pr.rst index 522698f1c..566e4efde 100644 --- a/content/developer/howtos/rdtraining/16_guidelines_pr.rst +++ b/content/developer/howtos/rdtraining/16_guidelines_pr.rst @@ -52,7 +52,7 @@ folder to be able to commit your work. $ git remote add training git@github.com:odoo/technical-training-sandbox.git $ git remote add training-dev git@github.com:xyz-odoo/technical-training-sandbox.git #Don't forget to change xyz-odoo to your own GitHub account $ git remote set-url --push training no_push #Avoid pushing directly into the main repository - $ git fetch --all --prune + $ git fetch training master $ git branch master training/master $ git checkout master #Two new files will be downloaded README.md and .gitignore @@ -95,7 +95,7 @@ Push your new branch to your development repository: .. code-block:: console - $ git push -u master-my_first_branch-xyz + $ git push -u training-dev master-my_first_branch-xyz .. warning:: NEVER use `git push --force` (or `git push -f`) with a branch that does not belong to you or in a stable branch. Never, never, never! diff --git a/content/developer/reference/guidelines.rst b/content/developer/reference/guidelines.rst index 7f0e16a93..5a714a986 100644 --- a/content/developer/reference/guidelines.rst +++ b/content/developer/reference/guidelines.rst @@ -438,7 +438,6 @@ Inside these 3 groups, the imported lines are alphabetically sorted. Idiomatics of Programming (Python) ---------------------------------- -- Each python file should have ``# -*- coding: utf-8 -*-`` as first line. - Always favor *readability* over *conciseness* or using the language features or idioms. - Don't use ``.clone()`` diff --git a/content/developer/reference/module.rst b/content/developer/reference/module.rst index 251de77f2..29ef8efab 100644 --- a/content/developer/reference/module.rst +++ b/content/developer/reference/module.rst @@ -79,6 +79,11 @@ Available manifest fields are: When a module is installed, all of its dependencies are installed before it. Likewise dependencies are loaded before a module is loaded. + +.. note:: + Module `base` is always installed in any Odoo instance. + But you still need to specify it as dependency to make sure your module is updated when `base` is updated. + ``data`` (``list(str)``) List of data files which must always be installed or updated with the module. A list of paths from the module root directory diff --git a/content/developer/reference/orm.rst b/content/developer/reference/orm.rst index a5fba407b..dbf3a0a41 100644 --- a/content/developer/reference/orm.rst +++ b/content/developer/reference/orm.rst @@ -339,18 +339,33 @@ relational fields and reading a field on the reached model. The complete sequence of fields to traverse is specified by the ``related`` attribute. Some field attributes are automatically copied from the source field if -they are not redefined: ``string``, ``help``, ``readonly``, ``required`` (only +they are not redefined: ``string``, ``help``, ``required`` (only if all fields in the sequence are required), ``groups``, ``digits``, ``size``, ``translate``, ``sanitize``, ``selection``, ``comodel_name``, ``domain``, ``context``. All semantic-free attributes are copied from the source field. -By default, the values of related fields are not stored to the database. +By default, related fields are: + +* not stored +* not copied +* readonly +* computed in superuser mode + Add the attribute ``store=True`` to make it stored, just like computed fields. Related fields are automatically recomputed when their dependencies are modified. -.. note:: The related fields are computed in sudo mode. +.. tip:: + + You can specify precise field dependencies if you don't want + the related field to be recomputed on any dependency change:: + + nickname = fields.Char( + related='partner_id.name', store=True, + depends=['partner_id']) + # The nickname will only be recomputed when the partner_id + # is modified, not when the name is modified on the partner. .. warning:: diff --git a/content/developer/reference/views.rst b/content/developer/reference/views.rst index 6fcb89faf..9b95e8091 100644 --- a/content/developer/reference/views.rst +++ b/content/developer/reference/views.rst @@ -991,6 +991,8 @@ take the following attributes: ``info``, ``secondary``, ``success`` or ``warning``). ``default_group_by`` name of a field to group tasks by +``disable_drag_drop`` + if set to true, the gantt view will not have any drag&drop support ``consolidation`` field name to display consolidation value in record cell ``consolidation_max`` 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 %} -