openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #20170
[Bug 940439] Re: Once we save dbfilter in configuration file, It is ignored
Again, concerning the missing dbfilter-option from the config file. It
is not the matter of default or my_default. I figured out, the problem
is the order of setting default value, reading config files, parsing
command line and setting default or other values again in parse_config()
(and __init__()).
Attached you'll find a patch on v7.0 alpha r8417 wich fixes this.
Short:
- apply hard-coded defaults to the configparser
- read config file and replace default values with the values from the config file
- parse the command line
- check validity
Furthermore, the parts of the comma separated list "addons_path" now may
_begin_ with ~ROOT_PATH/ wich is replaced by the directory of the
"openerp" package (usually the directory of the "openerp-server" file).
(This is also done for the "addons" directory if the option is not
given).
For more information see the code comments.
** Patch added: "config.py-r8417.get_options.patch"
https://bugs.launchpad.net/openobject-server/+bug/940439/+attachment/3464755/+files/config.py-r8417.get_options.patch
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/940439
Title:
Once we save dbfilter in configuration file, It is ignored
Status in OpenERP Server:
Confirmed
Bug description:
Version: 6.1-1-1 as packaged for ubuntu
Platform: Ubuntu Oneiric Ocelot 11.10
erp61 GA was announced yesterday. So, I eagerly installed it today,
and I was delighted about the new dbfilter (using a regular
expression). However, every pattern I put into the configuration file
was ignored.
Thankfully, openerp is open source, so I was able to debug what was
happening to my value. It was being clobbered by the default value
during the check whether it had been assigned at the command line.
/usr/share/pyshared/openerp/tools/config.py line 387
"self.options[arg] = getattr(opt, arg)
The problem is in line 154. The default value is specified using
"default='.*'" instead of the proper "my_default='.*'".
Cheers,
Sebastian
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/940439/+subscriptions
References