server_wide_modules var of openerp.conf file isn't used

Bug #938513 reported by Yolanda Robla
44
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Low
OpenERP's Framework R&D

Bug Description

In openerp.conf file there is a var called server_wide_modules. It allows to load web and custom modules, the same way as the --load flag.
But we noticed that this var isn't used. Doing a simple change in server/openerp/tools/config.py file makes that var to be used, and have less priority than the --load flag.

Revision history for this message
Yolanda Robla (yolanda.robla) wrote :
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Yolanda,

I have complicity checked your issue as well as you patch. But we doesn't passed a 'server_wide_modules' as a key in config.py file.

So we can 't use a this parameter in .conf, Indeed your patch is not correct.

Btw it's good if we have to add this parameter in .conf file and add 'server_wide_modules' key in config.py.

That's why I am considering this as a feature(improvement) rather than bug and setting this as a "Wishlist".

Thank you very much!

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Yolanda Robla (yolanda.robla) wrote : Re: [Bug 938513] Re: server_wide_modules var of openerp.conf file isn't used

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi
I checked my patch, and this code is to read correctly the
server_wide_modules that is on openerp.conf file
At the moment i have something like that:

server_wide_modules = web,auth_openid_canonical,theme_canonical

With my patch, this var is being read. If i remove the patch, i have
to do the same, but using the --load flag, something like that:

./server/openerp-server --without-demo=WITHOUT_DEMO --config
./openerp.conf -d openerpnew
- --load=web,auth_openid_canonical,theme_canonical

I've checked and my code is working. It's also a possibility to use
the --load flag, but as the server_wide_modules var in openerp.conf is
present, i think that is better if we can use it.

Please can you check if what i explained makes the bug more clear?

Best
Yolanda

El 23/02/12 06:33, Amit Parik (OpenERP) escribió:
> Hello Yolanda,
>
> I have complicity checked your issue as well as you patch. But we
> doesn't passed a 'server_wide_modules' as a key in config.py file.
>
> So we can 't use a this parameter in .conf, Indeed your patch is
> not correct.
>
> Btw it's good if we have to add this parameter in .conf file and
> add 'server_wide_modules' key in config.py.
>
> That's why I am considering this as a feature(improvement) rather
> than bug and setting this as a "Wishlist".
>
> Thank you very much!
>
> ** Changed in: openobject-server Importance: Undecided => Wishlist
>
> ** Changed in: openobject-server Status: New => Confirmed
>
> ** Changed in: openobject-server Assignee: (unassigned) =>
> OpenERP's Framework R&D (openerp-dev-framework)
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPReCkAAoJEHui+4jWFHJLgFcIAMks087PnSQTpB7C+uG2KnAB
uinByPvKFL3BKVxVoB9NueX87DomKb0iAlqdki5188AXotEIbIm4gHSbJbpJAlKF
pQgnkfmZIeeNLgNpUWW8ThXa4XE2n8lThuyUOl/oqHFP2ecvWbNAmy2Smv2Q/hAU
45LLsVqzzoPn/OR9HGUXM4hG996obmIZM5vrlZSXZWotDEUX0sGNqCdTcIHdu6gO
BNSkIw3ZayAI93uMDT2yQovtX9XkJwS0fHhN7FM2jjvUyIODRzHLrVCbS6M7HVHY
1CtzumqX1C5pScWvxwi7HW1/kQcDQ9WO4+AV4xV7uSEToxylvki+dHO92fMDvHM=
=jmN7
-----END PGP SIGNATURE-----

Revision history for this message
Antony Lesuisse (OpenERP) (al-openerp) wrote :

Not considered as bug according to our guidelines http://doc.openerp.com/v6.0/contribute/11_bug_tracker.html

But if a proper merge prop is made it can be merged.

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Sorry, this *is* a bug, please disregard the previous comments.

However the patch can indeed be improved: the "server_wide_module" parameter coming from the config file is not copied into the config.options dictionary because it is missing from the list of "keys" to copy.
It should therefore simply be appended to that list, around line 524 (instead of introducing a separate special case):

  http://bazaar.launchpad.net/~openerp/openobject-server/6.1/view/head:/openerp/tools/config.py#L524

Thanks for reporting and providing a patch!

Changed in openobject-server:
importance: Wishlist → Low
Revision history for this message
Jean-Sébastien SUZANNE (jssuzanne) wrote :

Hi Olivier,

I raise this bug or wishlist because it is not applied in v7.

Revision history for this message
Martin Collins (mkc-steadfast) wrote :

I tried Olivier's fix, it didn't work for me. Here is a slightly different patch against 6.1-ocb.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.