[REVERT] r3591: causing problem to install some modules
[odoo/odoo.git] / bin / tools / config.py
index 144ce3e..6ff7935 100644 (file)
@@ -59,6 +59,7 @@ class configmanager(object):
             'translate_in': None,
             'translate_out': None,
             'overwrite_existing_translations': False,
+            'load_language': None,
             'language': None,
             'pg_path': None,
             'admin_passwd': 'admin',
@@ -93,9 +94,11 @@ class configmanager(object):
             'secure_cert_file': 'server.cert',
             'secure_pkey_file': 'server.pkey',
             'publisher_warranty_url': 'http://services.openerp.com/publisher-warranty/',
+            'osv_memory_count_limit': None, # number of records in each osv_memory virtual table
+            'osv_memory_age_limit': 1, # hours
         }
         
-        self.blacklist_for_save = set(["publisher_warranty_url"])
+        self.blacklist_for_save = set(["publisher_warranty_url", "load_language"])
 
         self.misc = {}
         self.config_file = fname
@@ -210,6 +213,8 @@ class configmanager(object):
             "Option '-l' is mandatory in case of importation"
             )
 
+        group.add_option('--load-language', dest="load_language",
+                         help="specifies the languages for the translations you want to be loaded")
         group.add_option('-l', "--language", dest="language",
                          help="specify the language of the translation file. Use it with --i18n-export or --i18n-import")
         group.add_option("--i18n-export", dest="translate_out",
@@ -223,6 +228,15 @@ class configmanager(object):
         group.add_option("--addons-path", dest="addons_path",
                          help="specify an alternative addons path.",
                          action="callback", callback=self._check_addons_path, nargs=1, type="string")
+        group.add_option("--osv-memory-count-limit", dest="osv_memory_count_limit", default=False,
+                         help="Force a limit on the maximum number of records kept in the virtual "
+                              "osv_memory tables. The default is False, which means no count-based limit.",
+                         type="int")
+        group.add_option("--osv-memory-age-limit", dest="osv_memory_age_limit", default=1.0,
+                         help="Force a limit on the maximum age of records kept in the virtual "
+                              "osv_memory tables. This is a decimal value expressed in hours, "
+                              "and the default is 1 hour.",
+                         type="float")
         parser.add_option_group(group)
 
         security = optparse.OptionGroup(parser, 'Security-related options')
@@ -291,10 +305,12 @@ class configmanager(object):
                 self.options[arg] = getattr(opt, arg)
 
         keys = [
-            'language', 'translate_out', 'translate_in', 'overwrite_existing_translations', 'debug_mode', 'smtp_ssl',
+            'language', 'translate_out', 'translate_in', 'overwrite_existing_translations',
+            'debug_mode', 'smtp_ssl', 'load_language',
             'stop_after_init', 'logrotate', 'without_demo', 'netrpc', 'xmlrpc', 'syslog',
             'list_db', 'xmlrpcs',
-            'test_file', 'test_disable', 'test_commit', 'test_report_directory'
+            'test_file', 'test_disable', 'test_commit', 'test_report_directory',
+            'osv_memory_count_limit', 'osv_memory_age_limit',
         ]
 
         for arg in keys: