- Odoo 11 Development Cookbook(Second Edition)
- Holger Brunn Alexandre Fayolle
- 242字
- 2021-06-25 22:48:25
How it works...
Updating the source code is done by ensuring that we are on the correct branch using git checkout, and then fetching the new revisions using git pull. The --ff-only option will cause a failure if you have local commits not present in the remote repository. If this happens and you want to keep your changes, you can use git pull (without --ff-only) to merge the remote changes with yours; otherwise, use git reset --hard origin/11.0 to force the update, discarding your local modifications.
The update command uses the following options:
- -c: Specifies the configuration file
- --stop-after-init: Stops the instance when the update is over
- -u base or --update base: Requests the update of the base module
When updating a module, Odoo does the following:
- It updates the database structure for the models defined in the module for which the structure changes. For updates on the stable branch of Odoo, there should be no such changes, but this can happen for your own addons or third party addons.
- It updates the database records stored in data files of the module, most notably the views. It then recursively updates the installed modules that have declared a dependency on the module.
Since the base module is an implicit dependency of all Odoo modules, updating it will trigger an update of all of the installed modules in your instance. To update all installed modules, the alias all can be used instead of base.