[MERGE] Forward-port of branch 12.0 to 13.0

This commit is contained in:
Victor Feyens
2021-05-31 14:54:23 +02:00
53 changed files with 919 additions and 115 deletions
+1 -1
View File
@@ -236,7 +236,7 @@ corresponding behaviors) are shared between states:
* ``object_write``: Updates the current record(s) following ``fields_lines`` specifications
* ``multi``: Executes serveral actions given through the ``child_ids`` argument.
* ``multi``: Executes several actions given through the ``child_ids`` argument.
State fields
------------
+1 -1
View File
@@ -165,7 +165,7 @@ Database
.. option:: --db_sslmode
Control the SSL security of the connection between Odoo and PostgreSQL.
Value should bve one of 'disable', 'allow', 'prefer', 'require',
Value should be one of 'disable', 'allow', 'prefer', 'require',
'verify-ca' or 'verify-full'
Default value is 'prefer'
+1 -1
View File
@@ -330,7 +330,7 @@ should have a real naming as it is used as display name.
</record>
<record id="model_name_action_child_list" model="ir.actions.act_window">
<field name="name">Model Access Childs</field>
<field name="name">Model Access Children</field>
</record>
<!-- menus and sub-menus -->
@@ -177,7 +177,7 @@ to add a file from that addon. In that case, it should be done in three steps:
Note that the files in a bundle are all loaded immediately when the user loads the
odoo web client. This means that the files are transferred through the network
everytime (except when the browser cache is active). In some cases, it may be
every time (except when the browser cache is active). In some cases, it may be
better to lazyload some assets. For example, if a widget requires a large
library, and that widget is not a core part of the experience, then it may be
a good idea to only load the library when the widget is actually created. The
@@ -1186,7 +1186,7 @@ may need to directly call a controller (available on some route).
Notifications
==============
The Odoo framework has a standard way to communicate various informations to the
The Odoo framework has a standard way to communicate various information to the
user: notifications, which are displayed on the top right of the user interface.
There are two types of notifications:
@@ -1556,7 +1556,7 @@ integer (FieldInteger)
- type: setting the input type (*text* by default, can be set on *number*)
On edit mode, the field is rendered as an input with the HTML attribute type
setted on *number* (so user can benefit the native support, especially on
set on *number* (so user can benefit the native support, especially on
mobile). In this case, the default formatting is disabled to avoid incompability.
.. code-block:: xml
@@ -1588,7 +1588,7 @@ float (FieldFloat)
- type: setting the input type (*text* by default, can be set on *number*)
On edit mode, the field is rendered as an input with the HTML attribute type
setted on *number* (so user can benefit the native support, especially on
set on *number* (so user can benefit the native support, especially on
mobile). In this case, the default formatting is disabled to avoid incompability.
.. code-block:: xml
+10 -10
View File
@@ -109,7 +109,7 @@ to manage followers on your record:
Helper method to send a mail with a template
:param template_id: the id of the template to render to create the body of the message
:param `\**kwargs`: parameter to create a mail.compose.message wizzard (which inherit from mail.message)
:param `\**kwargs`: parameter to create a mail.compose.message wizard (which inherit from mail.message)
.. rubric:: Receiving messages
@@ -251,11 +251,11 @@ Subtypes are created as data in your module; the model has the following fields:
``res_model`` - :class:`~odoo.fields.Char`
model the subtype applies to; if False, this subtype applies to all models
``default`` - :class:`~odoo.fields.Boolean`
wether the subtype is activated by default when subscribing
whether the subtype is activated by default when subscribing
``sequence`` - :class:`~odoo.fields.Integer`
used to order subtypes in the notification customization popup
``hidden`` - :class:`~odoo.fields.Boolean`
wether the subtype is hidden in the notification customization popup
whether the subtype is hidden in the notification customization popup
Interfacing subtypes with field tracking allows to subscribe to different kind
@@ -378,7 +378,7 @@ yourself by overriding the function ``_notification_recipients``.
following the thread). True by default for new groups, False for
portal / customer.
- button_follow
dict with url adn title of the button
dict with url and title of the button
- has_button_unfollow
whether to display Unfollow in email (if recipient is currently following the thread).
True by default for new groups, False for portal / customer.
@@ -575,7 +575,7 @@ some default values these records may have depending on the parent object:
tasks getting created in the right project) by setting a dictionary of
default values in the alias' ``alias_defaults`` field.
:return: dictionnary of values that will be written to the new alias
:return: dictionary of values that will be written to the new alias
:rtype: dict
The ``get_alias_values()`` override is particularly interesting as it allows you
@@ -638,7 +638,7 @@ you to make your alias easily configurable from the record's form view.
def get_alias_values(self):
""" Specify some default values that will be set in the alias at its creation """
values = super(BusinessTrip, self).get_alias_values()
# alias_defaults holds a dictionnary that will be written
# alias_defaults holds a dictionary that will be written
# to all records created by this alias
#
# in this case, we want all expense records sent to a trip alias
@@ -703,7 +703,7 @@ you to make your alias easily configurable from the record's form view.
of the expense, try to find a partner with this email address and
do a regex match to find the amount of the expense."""
name = msg_dict.get('subject', 'New Expense')
# Match the last occurence of a float in the string
# Match the last occurrence of a float in the string
# Example: '50.3 bar 34.5' becomes '34.5'. This is potentially the price
# to encode on the expense. If not, take 1.0 instead
amount_pattern = '(\d+(\.\d*)?|\.\d+)'
@@ -755,7 +755,7 @@ widgets, respectively).
name = fields.Char()
# [...]
We modify the form view of our trips to display their next activites:
We modify the form view of our trips to display their next activities:
.. code-block:: xml
@@ -778,7 +778,7 @@ You can find concrete examples of integration in the following models:
* ``crm.lead`` in the CRM (*crm*) Application
* ``sale.order`` in the Sales (*sale*) Application
* ``project.task`` in the Project (*poject*) Application
* ``project.task`` in the Project (*project*) Application
.. _reference/mixins/website:
@@ -868,7 +868,7 @@ case for this mixin is any object that has a frontend-page; being able to contro
the visibility of the page allows you to take your time while editing the page
and only publish it when you're satisfied.
To include the functionnality, you only need to inherit ``website.published.mixin``:
To include the functionality, you only need to inherit ``website.published.mixin``:
.. code-block:: python
+1 -1
View File
@@ -60,7 +60,7 @@ Check if the method is available and then execute it.
Methods
-------
.. note:: Each of the methods returns a JQuery Deffered object which returns
.. note:: Each of the methods returns a JQuery Deferred object which returns
a data JSON dictionary
Show Toast in device
+1 -1
View File
@@ -182,7 +182,7 @@ Date / Datetime comparison best practices:
date string, therefore this practice is **heavily**
discouraged.
Common operations with dates and datetimes such as addition, substraction or
Common operations with dates and datetimes such as addition, subtraction or
fetching the start/end of a period are exposed through both
:class:`~odoo.fields.Date` and :class:`~odoo.fields.Datetime`.
These helpers are also available by importing `odoo.tools.date_utils`.
+1 -1
View File
@@ -56,7 +56,7 @@ can take the following attributes:
for example)
``attachment``
python expression that defines the name of the report; the record is
acessible as the variable ``object``
accessible as the variable ``object``
``paperformat``
external id of the paperformat you wish to use (defaults to the company's
paperformat if not specified)
+1 -1
View File
@@ -10,7 +10,7 @@ data-driven mechanisms to manage or restrict access to data.
Both mechanisms are linked to specific users through *groups*: a user belongs
to any number of groups, and security mechanisms are associated to groups,
thus applying security mechamisms to users.
thus applying security mechanisms to users.
.. _reference/security/acl:
+5 -5
View File
@@ -148,7 +148,7 @@ default you can remove the ``standard`` tag:
...
This test will not be selected by default, to run it the relevant tag will
have to be selected explicitely:
have to be selected explicitly:
.. code-block:: console
@@ -176,7 +176,7 @@ ones:
When you write a test that does not inherit from the
:class:`~odoo.tests.common.BaseCase`, this test will not have the default tags,
you have to add them explicitely to have the test included in the default test
you have to add them explicitly to have the test included in the default test
suite. This is a common issue when using a simple ``unittest.TestCase`` as
they're not going to get run:
@@ -193,7 +193,7 @@ Special tags
^^^^^^^^^^^^
- ``standard``: All Odoo tests that inherit from
:class:`~odoo.tests.common.BaseCase` are implicitely tagged standard.
:class:`~odoo.tests.common.BaseCase` are implicitly tagged standard.
:option:`--test-tags <odoo-bin --test-tags>` also defaults to ``standard``.
That means untagged test will be executed by default when tests are enabled.
@@ -207,7 +207,7 @@ Special tags
will generally not want both ``post_install`` is usually paired with
``-at_install`` when tagging a test class.
- *module_name*: Odoo tests classes extending
:class:`~odoo.tests.common.BaseCase` are implicitely tagged with the
:class:`~odoo.tests.common.BaseCase` are implicitly tagged with the
technical name of their module. This allows easily selecting or excluding
specific modules when testing e.g. if you want to only run tests from
``stock_account``:
@@ -335,7 +335,7 @@ testing system, since this means that a test in the addon web will fail whenever
the voip addon is installed (note that the runbot runs the tests with all addons
installed).
At the same time, our testing sytem is good, because it can detect whenever
At the same time, our testing system is good, because it can detect whenever
another module breaks some core functionality. There is no complete solution to
this issue. For now, we solve this on a case by case basis.
+2 -2
View File
@@ -963,7 +963,7 @@ take the following attributes:
``consolidation``
field name to display consolidation value in record cell
``consolidation_max``
dictionnary with the "group by" field as key and the maximum consolidation
dictionary with the "group by" field as key and the maximum consolidation
value that can be reached before displaying the cell in red
(e.g. ``{"user_id": 100}``)
``consolidation_exclude``
@@ -1829,7 +1829,7 @@ Possible children elements of the search view are:
2018
2017
Muti selection of options is allowed.
Multi selection of options is allowed.
``default_period`` (optional)
only makes sense for a filter with non empty ``date`` attribute.