lp:~donkirkby/openobject-server/config-defaults

Created by Don Kirkby and last modified

As I proposed in the bug, here's what I did:
1. Define all 47 options that the user can set in the OptionParser and set
their default values from a dictionary.

2. Check if the configuration file was specified on the command line, through
an environment variable, or by being in an expected location.

3. If we're using a configuration file, parse it with ConfigParser and update
all the default values in the dictionary and set them on the OptionParser. Then
parse the command line again. That way the command line will always override a
configuration file. (That seems to be the convention, I checked fetchmail's
man page.)

4. Copy all the values from the OptionParser into the config.options dictionary.

I did not end up adding alternate option names to match those that appear in the configuration file.

Get this branch:
bzr branch lp:~donkirkby/openobject-server/config-defaults
Only Don Kirkby can upload to this branch. If you are Don Kirkby please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Don Kirkby
Project:
Odoo Server (MOVED TO GITHUB)
Status:
Mature

Recent revisions

1955. By Don Kirkby

[MERGE] release 5.0.15 from branch 5.0

1954. By Don Kirkby

merge 5.0.9 from 5.0 branch

1953. By Don <don@don-desktop-openerp>

Remove debug code that I added in revision 1949.

1952. By Don <don@don-desktop-openerp>

Remove default values of None. Add some options to the command line that were only available in config files. Convert some parameters to strings for backward compatibility. Save translate_modules as comma separated list without brackets or quotes.

1951. By Don <don@don-desktop-openerp>

copy all options from OptionParser to config.options

1950. By Don <don@don-desktop-openerp>

move all default values from the option definitions to a dictionary called defaults.

1949. By Don <don@don-desktop-openerp>

some debug code to dump the contents of tools.config.options (I'll remove it before making a merge proposal)

1948. By Jay Vora (Serpent Consulting Services)

[FIX] Custom fields should be removed from _columns too

1947. By Jay Vora (Serpent Consulting Services)

[MERGE/FIX] Merged Stephane's branch for disabling the cache for ir.rule

1946. By Jay Vora (Serpent Consulting Services)

[FIX] M2O : Unfair behavior of M2O for access denial records and normal ones(All records were hidden by access denied if one had failed to meet access rights).

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers