How to upgrade all installed modules in Odoo

In case we need to upgrade all installed modules in an Odoo instance, that can be done directly from the command line using the following command for Linux systems:

python odoo/odoo-bin -c <path-to-config> -d <database-name> -u all --stop-after-init

Should be mentioned that need to be used python​ from the environment that the Odoo instance is using. Also the Odoo server need to be stop before the upgrade is started.

Very good case when such upgrade is needed is when the Odoo source code is updated to more recent commit of the installed version.