Tryton - Issues



Title Load and update pycountry data from script
Priority feature Status testing
Superseder Nosy List ced, pokoli, resteve, reviewbot
Type performance Components country, currency, party
Assigned To ced Keywords review
Reviews 285501002
View: 285501002

Created on 2019-05-10.19:24:14 by ced, last changed by reviewbot.

review285501002 updated at
msg50530 (view) Author: [hidden] (resteve) Date: 2019-07-07.21:17:47
Mistake in msg50529. Replace country is in party.address.format, not in party.address. Sorry.
msg50529 (view) Author: [hidden] (resteve) Date: 2019-07-07.21:14:12
IMHO relate country in party address is correct option because in reports you could browse data from the country (code, name...) and review285501002 you can't

Depends the country module is valid option.
review285501002 updated at
msg50527 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-07-07.19:54:49
Here is review285501002
For the symbol of currency as it is not provided by pycountry, I use forex-python. I think it is a good option as it may be the base for an automatic rate update.
msg50069 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-06-05.16:28:45
The party module depends on the country data for the format. So if we do not load the countries, it fails to create those records. I propose to replace the Many2One country on party.address.format by a char field with the country code. This way, it does not depend on the country records.
msg49709 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-05-13.11:04:28
It will be an intensive load and probably long process. I do not think it should be managed by a user request.
Also there is no point to run it again if the pycountry version did not change.
msg49707 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-05-13.08:51:24
I'm wondering if it won't be better to use a wizard on the server instead of a script so the users can update their own data without requiring the intervention of the system administrator.
msg49702 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-05-10.19:24:14
Managing those data inside the XML is quiet painful.
Instead I think we should use a script a little bit like the trytond_import_zip but using pycountry.

The script could manage the update using the ISO code as ID.

As it can be slow and not everybody needs every countries or currencies. I think the scripts could take as argument a list of ISO code to create/update.
Date User Action Args
2019-07-12 21:06:21reviewbotsetmessages: + msg50638
2019-07-07 21:17:48restevesetmessages: + msg50530
2019-07-07 21:14:13restevesetmessages: + msg50529
2019-07-07 20:08:51reviewbotsetnosy: + reviewbot
messages: + msg50528
2019-07-07 19:54:50cedsetstatus: in-progress -> testing
reviews: 285501002
messages: + msg50527
keyword: + review
2019-06-05 16:28:45cedsetcomponent: + party
messages: + msg50069
2019-06-05 10:17:55cedsetstatus: chatting -> in-progress
assignedto: ced
2019-05-13 12:09:21restevesetnosy: + resteve
2019-05-13 11:04:28cedsetmessages: + msg49709
2019-05-13 08:51:25pokolisetstatus: unread -> chatting
nosy: + pokoli
messages: + msg49707

Showing 10 items. Show all history (warning: this could be VERY long)