Thread Previous • Date Previous • Date Next • Thread Next |
On 17/06/13 18:02, Stefan Rijnhart wrote: > Hi Ondrej, > > thanks in advance for sharing your work, albeit unfinished. I am sure it > will be of great help to other developers! > >> To make it available from other modules, given that this is v7 specific, >> where should it go and how will they be able to access it? > > For version specific API, maybe have a specific module such as > openerp/openupgrade/openupgrade70.py (just an example, I am sure someone > can come up with a better naming convention). How does that sound to you? Did not come up with a better name, so created openupgrade70. >> 2. There were a couple of many2one fields that have changed to >> many2many. I could not find any code in openerp.openupgrade.openupgrade >> to do this so we came up with this: >> >> Do you think it should go alongside the other tools in that module? > > Yes, that would be a very good addition! I published the code for both server and addons now, the respective branches are at lp:~credativ/openupgrade-server/7.0 and lp:~credativ/openupgrade-addons/7.0. If anyone wants to continue the work, I attach the dependency data I used to guide the migration and a script implementing the install-upgrade-fix cycle for a list of modules*. This setup has treated me well, upgrade testing and development does not get in the way and is flexible enough to let you resolve problems and then resume where you left off. There is some tmux integration in the update_title function that might mess with your terminal title, though. Not having much OpenERP experience, I am not sure I resolved all of the problems I encountered the way they should be. Therefore the migration code might need some tweaks, especially when view conflicts had to be resolved. Unresolved things: - module analytic now provides the account.analytic.account sequence, instead of module account and openupgrade tries adding it even though being noupdate=1 * You'll need to patch OpenERP to exit with an error status when something goes wrong so that a script can detect it. Cheers, Ondrej
Attachment:
migration.dot
Description: application/msword-template
--- openerp/cli/server.py 2013-03-07 12:16:37 +0000 +++ openerp/cli/server.py 2013-06-18 16:28:45 +0000 @@ -98,6 +98,7 @@ db, registry = openerp.pooler.get_db_and_pool(dbname,update_module=update_module) except Exception: _logger.exception('Failed to initialize database `%s`.', dbname) + sys.exit(1) def run_test_file(dbname, test_file): """ Preload a registry, possibly run a test file, and start the cron."""
Attachment:
upgrade_loop.sh
Description: application/shellscript
Attachment:
signature.asc
Description: OpenPGP digital signature
Thread Previous • Date Previous • Date Next • Thread Next |