← Back to team overview

openupgrade-drivers team mailing list archive

update_module_names questions on usage

 

Hello everyone,

I have some questions about openupgrade.update_module_names.

I can see it used in the 'base' migration scripts for wiki->document_page and others.
For the most part, it works.
When upgrading wiki, it doesn't show up after the upgrade from 6.1 to 7.0 when document_page is installed.

However, when I use update_module_names myself, I can't seem to make it work.

Example (from https://code.launchpad.net/~openerp-mgmtsystem-core-editors/openerp-mgmtsystem/7.0):
    I want to upgrade wiki_environment_manual -> document_page_environment_manual.
    It's a very simple module: all it does is insert a document.page content and category

    In the pre-migration (in openupgrade/mgmtsystem/document_page_environment_manual/migrations/7.0.1.0),
    I have a call to this function in the migrate function.
        openupgrade.update_module_names(cr, [('wiki_environment_manual', 'document_page_environment_manual')])

    The data is migrated perfectly thanks to the wiki.wiki->document.page migration scripts, but when I look at
    the installed modules, document_page_environment_manual is not marked as installed and wiki_environment_manual
    while not installed, is listed as installable.


If I put  the function inside a dependency migration script, I get another error. This one says that
document_page_environment_manual already exists.

Can you help me out with this?

Thank you very much.
--
Sandy Carter
Consultant en logiciel libre
Développeur OpenERP
Savoir-faire Linux Inc.
514-276-5468 poste 142
http://www.savoirfairelinux.com
sandy.carter@xxxxxxxxxxxxxxxxxxxx


Follow ups