[MERGE] Forward-port of branch 14.0 to master

This commit is contained in:
Antoine Vandevenne (anv)
2021-05-28 17:38:56 +02:00
44 changed files with 1248 additions and 574 deletions

View File

@@ -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()``

View File

@@ -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

View File

@@ -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::

View File

@@ -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``