← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 836112] Re: Translations synchronization problem with some addons paths

 

Hello Sylvain Calador,

The example path that you provided here a set of path included with
root_path again. I tried the following cases on trunk as well as stable
server but fortunately  it seems to work.

Trunk: (Note: The root_path will be detected  by the server itself in
this case the root_path was detected as
:/home/nch/workspace/OpenERP2011/Trunk/server/openerp)

case 1:
 nch@Naresh:~/workspace/OpenERP2011/Trunk/server$ ./openerp-server --addons-path=../openobject-addons/,../../Openerp/openobject-addons/,../../../../Desktop/addons-parameter/,openerp/addons/

case2:
nch@Naresh:~/workspace/OpenERP2011/Trunk/server$  ./openerp-server -addons-path=/home/nch/workspace/OpenERP2011/Trunk/openobject-addons/,/home/nch/workspace/OpenERP2011/Openerp/openobject-addons/,/home/nch/Desktop/addons-parameter/,/home/nch/workspace/OpenERP2011/Trunk/server/openerp/addons/

Stable (Note:setting multiple addons_path is not supported in v6 thru terminal but can be set directly in .openerp_serverrc)
case :

nch@Naresh:~/workspace/OpenERP2011/stable6.0/server/bin$ ./openerp-
server.py

values in .openerp_serverrc

root_path=/home/nch/workspace/OpenERP2011/stable6.0/server/bin/
addons_path = /home/nch/workspace/OpenERP2011/stable6.0/server/bin/addons,/home/nch/workspace/OpenERP2011/stable6.0/openobject-addons/,/home/nch/Desktop/addons-stable_new/


These cases ran perfectly .. can try out the same if you still face problem try the workaround by removing the first path from your list of addons_path as it is the same as root_path (as per your details on the bug)
addons_path = /home/openerp/openerp/server/bin/addons,/home/openerp/openerp/addons,/home/openerp/openerp/addons-parametrization

I would close this bug. but if you still face problem dont hesitate to
reopen it with additional details.

Thanks

** Changed in: openobject-server
       Status: Confirmed => Invalid

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/836112

Title:
  Translations synchronization problem with some addons paths

Status in OpenERP Server:
  Invalid

Bug description:
  Hello,

  While trying to synchronize translations for a parametrization module 
  (by using gtk client "Administration/Translations/Application Terms/Synchronize Translations" menu)
  i found sevral potential bugs in the get_module_from_path() function (in bin/tools/translate.py on 6.x branch)

  For example, if you have the following paths (maybe not conventional)
  in the server's config file:

  root_path = /home/openerp/openerp/server/bin
  addons_path = /home/openerp/openerp/server/bin/addons,/home/openerp/openerp/addons,/home/openerp/openerp/addons-parametrization

  1. With these paths, you'll get an empty string in mod_path
     because the length of adp may be inferior or equal to the length of def_path
     and the function may return 'home' as module which is incorrect.

  2. There is a "off-by-one" error if the path is /home/openerp/openerp/addons-parametrization/my_module/my_file.py
     and you have /home/openerp/openerp/addons in the first mod_paths entry
     the function returns 'parametrization' as module instead of 'my_module'.
     
  3. I have added a check to avoid duplicated entry in mod_path.

  Find attached a patch for the 6.x branch.

  Thanks.

  OpenERP Server 6.0.1 (bzr revno 3344)
  Ubuntu Server 10.04 LTS

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/836112/+subscriptions


References