Tags: initOS/dob-lib
Tags
Fix remove early initialization of res.{partner,company,users} (#25)
* Fix remove early initialization of res.{partner,company,users}
This early initialization was there to prevent exceptions caused by
fetching values of (newly added) fields of those models that were not yet
present in the database, but had already been added to the model on the
Python side.
Unfortunately, this did run before any module migration. Consequently, a
module's pre-migration, which should run before any module and module
upgrade, did then run only after those models had already been updated.
Also, the early initialization as implemented did already come too late.
It had to run before `check_auto_install()`, but did run only in
`update_changed()`, a couple of code lines later.
In the end, it is unnecessary if `prefetch_fields=False` is in the context.
But the `context_get()` does not put this entry into the context.
This commit fixes all those issue. It makes the early initialization of the
three models superfluous, and thus automatically let's the migration work
as expected again.
* Restructure code a bit to reduce duplicate actions. Reuse context
---------
Co-authored-by: fkantelberg <florian.kantelberg@initos.com>
Fix adapting to changed CLI of Odoo 19 (#24) The Odoo 19 executable has a changed command line interface, reorganizing more options by grouping them into further commands, see https://www.odoo.com/documentation/19.0/developer/reference/cli.html and the output of docker compose run --rm odoo odoo run --help Running a command requires it to be specified *before* any further command line options, which includes the `-c CONFIG_FILE`, try docker compose run --rm odoo odoo run i18n --help which until now failed to show the help for command `i18n`.
PreviousNext