c2c_currency_rate_update outdated XML lib and a crash
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I am currently testing the module "c2c_currency_
The great news is that I managed to update several currencies with the service "Yahoo Finance" !
But it seems I found 2 issues with the module. I am a beginner in Python, so I may be wrong or say stupid things, please take it into account when reading this.
1) First issue : deprecated pyxml lib makes ECB and Admin.ch service unusable ?
In the file currency_
from xml import xpath
(line 365 for Admin.ch and 417 for ECB)
For what I understand, this lib is part of the pyXML lib, available from this project : http://
Under Ubuntu, the lib was provided by the package python-xml. Since Karmic, this lib is no longer provided, see http://
Probably, the reason for that is written on http://
PyXML is no longer maintained.
So, shouldn't we use another XML lib ? If yes, which one do you suggest ?
2) if I start the server with --log-level=debug, when I do anything in the "Currency autoupdate configuration" (under Administration > Users > Companies) and save it, or when I click on Refresh currencies, or when the scheduled action to refresh currencies is executed, I get the following crash in the logs :
[2010-09-22 16:12:38,
[2010-09-22 16:12:38,
[2010-09-22 16:12:38,
[2010-09-22 16:12:38,
[2010-09-22 16:12:38,
[2010-09-22 16:12:38,
[2010-09-22 16:12:38,
[2010-09-22 16:12:38,
I confirm there is no company_id field on the res_currency object !
Do you confirm these two issues ? If yes, I am willing to spend time to try to fix them, but :
- for point n°1, I need some advice on which python XML lib we should use now
- for point n°2, I will probably need some help, because I don't see what triggers this bad SQL query...
Related branches
- OpenERP Core Team: Pending requested
-
Diff: 558 lines (+207/-137)4 files modifiedc2c_currency_rate_update/__terp__.py (+18/-21)
c2c_currency_rate_update/company.py (+7/-12)
c2c_currency_rate_update/currency_rate_update.py (+179/-102)
c2c_currency_rate_update/currency_rate_update.xml (+3/-2)
Changed in openobject-addons: | |
status: | New → In Progress |
Changed in openobject-addons: | |
assignee: | nobody → Camptocamp (c2c) |
Changed in openobject-addons: | |
importance: | Undecided → Medium |
assignee: | Camptocamp (c2c) → Nicolas Bessi - Camptocamp (nbessi-c2c) |
Changed in openobject-addons: | |
status: | Won't Fix → In Progress |
importance: | Undecided → Medium |
Changed in openobject-addons: | |
status: | In Progress → Fix Committed |
Changed in openobject-addons: | |
status: | Fix Committed → Fix Released |
Here is a discussion about the removal of the package python-xml from Ubuntu and Debian :
https:/ /bugs.launchpad .net/ubuntu/ +source/ python- xml/+bug/ 343242
The same issue happened in openerp-server and addons, as detailed in this bug report :
https:/ /bugs.launchpad .net/openobject -server/ +bug/429519
They say that they replaced pyXML with "lxml + etree standard Python XML libs". We should probably do the same, no ?