~therp-nl/anybox.recipe.openerp/jbaudoux-relative_paths_resolve_conflict

« back to all changes in this revision

Viewing changes to anybox/recipe/openerp/upgrade.py.tmpl

[MRG] Update with target branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- python -*-
 
2
"""This is a template upgrade script.
 
3
 
 
4
The purpose is both to cover the most common use-case (updating all modules)
 
5
and to provide an example of how this works.
 
6
"""
 
7
 
 
8
 
 
9
def run(session, logger):
 
10
    """Update all modules."""
 
11
    if session.is_initialization:
 
12
        logger.warn("Usage of upgrade script for initialization detected. "
 
13
                    "You should consider customizing the present upgrade "
 
14
                    "script to add modules install commands. The present "
 
15
                    "script is at : %s (byte-compiled form)",
 
16
                    __file__)
 
17
        return
 
18
    logger.info("Default upgrade procedure : updating all modules.")
 
19
    session.update_modules(['all'])