[6.0][6.1][7.0][trunk] Wrong module name on searching the 'code' translation

Bug #906821 reported by Jean-Sebastien SUZANNE - http://www.Syleam.fr
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Undecided
Unassigned

Bug Description

The code translation is not exported if you use a module path start with another module path
for exemple:
in conf file: addons_path = /home/syleam/openerp/addons,/home/syleam/openerp/addons-syleam
the module foo is in addons-syleam module path
When we export the translation, we search the name of the module in the function trans_generate/export_code_terms_from_file.
Whereas the name returned by the method get_module_from_path is 'syleam'. However 'syleam' is not one of the installed modules.
The get_module_from_path method uses the first module path found but this path isn't the correct path. The correct path is the second and the correct module name is foo.
The tests were performed on linux with the latest server revno for v 6.0. I looked in v 6.1 and the code is the same.

Revision history for this message
Jean-Sebastien SUZANNE - http://www.Syleam.fr (alnjssuza) wrote :
Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :
Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :

Hello Jean ,

I have checked this issue with latest trunk but I did not face any problem
as you said so would you please provide more information regarding this issue and
Correct me if I am wrong.

I have attached a video for your reference.

Thanks and waiting for replay!

Changed in openobject-server:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenERP Server because there has been no activity for 60 days.]

Changed in openobject-server:
status: Incomplete → Expired
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

Would you please try with the latest updated code.

If you still face the problem then you can reopen this with more information.

Thanks.

Changed in openobject-server:
status: Expired → Invalid
Revision history for this message
Yann Papouin (yann-papouin) wrote :

Thank you for your fix, I add to path the 6.1 stable version with it.
You are entirely right, if the addons_path is absolute, this part of code is totally broken for other addons path

Changed in openobject-server:
status: Invalid → Confirmed
summary: - [6.0][6.1] Wrong module name on searching the 'code' translation
+ [6.0][6.1][7.0][trunk] Wrong module name on searching the 'code'
+ translation
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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