IRC logs of #tryton for Friday, 2011-07-29

chat.freenode.net #tryton log beginning Fri Jul 29 00:00:05 CEST 2011
2011-07-29 00:18 -!- elbenfreund(~elbenfreu@g227130021.adsl.alicedsl.de) has joined #tryton
2011-07-29 01:03 -!- rhubner(~rhubner@189.58.53.98.dynamic.adsl.gvt.net.br) has left #tryton
2011-07-29 01:34 -!- saxa(~sasa@189.26.255.43) has joined #tryton
2011-07-29 01:34 -!- nicoe(~nicoe@2.90-247-81.adsl-dyn.isp.belgacom.be) has joined #tryton
2011-07-29 02:16 -!- plantian(~ian@173-167-122-145-sfba.hfc.comcastbusiness.net) has joined #tryton
2011-07-29 02:39 -!- alimon(~alimon@189.154.61.121) has joined #tryton
2011-07-29 02:47 -!- ikks_(~ikks@190.25.17.155) has joined #tryton
2011-07-29 03:38 -!- zodman(~zodman@foresight/developer/zodman) has joined #tryton
2011-07-29 04:45 -!- plantian(~ian@c-67-169-72-36.hsd1.ca.comcast.net) has joined #tryton
2011-07-29 04:57 -!- zodman(~zodman@foresight/developer/zodman) has joined #tryton
2011-07-29 05:02 -!- yangoon1(~mathiasb@p549F3C82.dip.t-dialin.net) has joined #tryton
2011-07-29 05:36 -!- alimon(~alimon@189.154.61.121) has joined #tryton
2011-07-29 06:13 -!- dfamorat_(~dfamorato@173-9-190-185-miami.txt.hfc.comcastbusiness.net) has joined #tryton
2011-07-29 06:39 -!- sharoon(~sharoon@173-9-190-185-miami.txt.hfc.comcastbusiness.net) has joined #tryton
2011-07-29 06:40 -!- sharoon_(~sharoon@204-232-205-248.static.cloud-ips.com) has joined #tryton
2011-07-29 07:12 -!- plantian(~ian@c-67-169-72-36.hsd1.ca.comcast.net) has joined #tryton
2011-07-29 08:17 -!- ecarreras(~under@unaffiliated/ecarreras) has joined #tryton
2011-07-29 08:36 -!- okko1(~okko@62.58.29.41) has joined #tryton
2011-07-29 08:47 -!- vladimirek(~vladimire@bband-dyn21.178-41-212.t-com.sk) has joined #tryton
2011-07-29 08:56 -!- helmor(~helmo@2.208.216.11) has joined #tryton
2011-07-29 09:26 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2011-07-29 09:29 -!- bechamel(~user@cismwks02-virtual1.cism.ucl.ac.be) has joined #tryton
2011-07-29 09:32 -!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton
2011-07-29 09:43 -!- plantian(~ian@c-67-169-72-36.hsd1.ca.comcast.net) has left #tryton
2011-07-29 10:42 -!- enlightx(~enlightx@dynamic-adsl-94-34-231-35.clienti.tiscali.it) has joined #tryton
2011-07-29 11:14 -!- nicoe(~nicoe@ced.homedns.org) has joined #tryton
2011-07-29 11:24 -!- elbenfreund(~elbenfreu@g227151058.adsl.alicedsl.de) has joined #tryton
2011-07-29 12:35 -!- enlightx(~enlightx@dynamic-adsl-94-34-231-35.clienti.tiscali.it) has joined #tryton
2011-07-29 12:57 -!- elbenfreund(~elbenfreu@p54B9457A.dip.t-dialin.net) has joined #tryton
2011-07-29 13:24 -!- nicoe(~nicoe@ced.homedns.org) has joined #tryton
2011-07-29 14:21 -!- saxa(~sasa@189.26.255.43) has joined #tryton
2011-07-29 14:31 -!- sharoon(~sharoon@173-9-190-185-miami.txt.hfc.comcastbusiness.net) has joined #tryton
2011-07-29 14:31 -!- sharoon_(~sharoon@204-232-205-248.static.cloud-ips.com) has joined #tryton
2011-07-29 14:35 -!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton
2011-07-29 14:58 -!- bechamel(~user@cismwks02-virtual1.cism.ucl.ac.be) has joined #tryton
2011-07-29 15:10 <sharoon> cedk: ping
2011-07-29 15:10 <sharoon> ced
2011-07-29 15:10 <sharoon> cedk: i have pushed with the flag on party and a bulky test suite which checks that
2011-07-29 15:11 <cedk> sharoon: ok I will check
2011-07-29 15:11 <cedk> sharoon: did you test the LRU?
2011-07-29 15:11 <sharoon> cedk: thanks
2011-07-29 15:11 <sharoon> cedk: i am testing that today…
2011-07-29 15:11 <sharoon> cedk: our list of countries and states is not uptodate, there is a new version of pycountry
2011-07-29 15:12 <cedk> sharoon: patch?
2011-07-29 15:12 <sharoon> cedk: i can propose one today
2011-07-29 15:13 <cedk> sharoon: also did you see I activate translation of subdivision, it will be good to fix the script to translate also those names
2011-07-29 15:14 <sharoon> cedk: which all languages ?
2011-07-29 15:19 <cedk> sharoon: those defined in country
2011-07-29 15:19 <sharoon> cedk: ok
2011-07-29 15:19 <cedk> sharoon: there is a script somewhere to get translation from pycountry
2011-07-29 15:20 <sharoon> cedk: it uses gettext
2011-07-29 15:20 <sharoon> cedk: which means i have to create xml records for ir.translation - is that right ?
2011-07-29 15:21 <cedk> sharoon: no in csv
2011-07-29 15:21 <sharoon> ACTION reading code in country module
2011-07-29 15:22 <cedk> sharoon: https://bugs.tryton.org/roundup/issue1482
2011-07-29 15:26 <sharoon> cedk: the script in the scripts folder of the module does not seem to be capable of making the csv files, so you mean i should update that script ?
2011-07-29 15:27 <cedk> sharoon: no the one in the issue
2011-07-29 15:29 <sharoon> cedk: the script in code review directly adds to the database, while what we want is the CSV file to be generated right ?
2011-07-29 15:30 <cedk> sharoon: yes but adding translation to the database is good because it will reuse the trytond method to generate the csv file after
2011-07-29 15:31 <sharoon> cedk: why not generate the csv file directly because we use res_id anyway ?
2011-07-29 15:32 <cedk> sharoon: because there is not only the countries to translate but also the fields, the views etc
2011-07-29 15:36 <cedk> sharoon: but if you want we can do it later, first update with the last pycountry version
2011-07-29 15:38 <sharoon> cedk: sure, but i think updating the csv files from the scripts would be better and its just a matter of few fields and names, anyway first patch first
2011-07-29 15:39 <cedk> sharoon: but the idea with csv is to generate it always the same way, like that all the lines are in the same order etc. and the patch is simple
2011-07-29 15:40 <sharoon> cedk: sending you updated with XML first and then we could talk about the translation, i never worked with translations before, so this is a good opportunity :)
2011-07-29 15:46 <sharoon> cedk: do you have a prob if I update the scripts/countries.py to a full command line script ?
2011-07-29 15:47 <sharoon> cedk: at the moment it just prints to the STDOUT
2011-07-29 15:47 <cedk> sharoon: it is because the output must be placed inside a xml file
2011-07-29 15:48 <sharoon> cedk: but we could write directly to the xml file rather than piping the o/p ? I mean with the headers and so on ?
2011-07-29 15:51 <cedk> sharoon: it is not only the header but there is the views etc
2011-07-29 15:51 <cedk> sharoon: or you should create a specific xml file for only this data
2011-07-29 15:54 <sharoon> cedk: i think that will be better
2011-07-29 15:55 <sharoon> cedk: a separate XML which has the view and is static (the current file)
2011-07-29 15:55 <sharoon> cedk: and a second file which is generated with the command line script
2011-07-29 15:56 <cedk> sharoon: ok
2011-07-29 16:20 -!- elbenfreund(~elbenfreu@p54B9457A.dip.t-dialin.net) has joined #tryton
2011-07-29 16:57 -!- lageekitude(~Senvara@24.106.58.138) has joined #tryton
2011-07-29 17:39 -!- version2beta(~rob@24.106.58.138) has joined #tryton
2011-07-29 17:52 -!- ccomb(~ccomb@95.10.173.41) has joined #tryton
2011-07-29 18:32 <sharoon> cedk: ping
2011-07-29 18:32 <cedk> sharoon: pong
2011-07-29 18:33 <sharoon> cedk: looks like we have a duplicate constraint issue on subdivision and i cross checked and looks like the ISO standard is either screwed up (if it allows duplicates) or we are wrong in thinking there should be no duplicates
2011-07-29 18:33 <sharoon> cedk: http://en.wikipedia.org/wiki/ISO_3166-2:CV#Municipalities
2011-07-29 18:33 <sharoon> cedk: and search for CV-SL
2011-07-29 18:33 <sharoon> cedk: there are two CV-SL
2011-07-29 18:34 <sharoon> cedk: so probably we should extend the constraint as unique(code, parent)
2011-07-29 18:38 <cedk> sharoon: I don't see unique constraint on subdivision
2011-07-29 18:44 <sharoon> cedk: ok yeah, blunder - its the problem with the xml_id
2011-07-29 18:44 <sharoon> sorry fs_id
2011-07-29 18:47 <cedk> sharoon: but it is quite incredible that they create duplicate code
2011-07-29 18:48 <cedk> sharoon: I suggest you add an exception for São Lourenço dos Órgãos to generate is xml id
2011-07-29 18:50 <sharoon> cedk: ok
2011-07-29 18:53 -!- alimon(~alimon@189.154.98.28) has joined #tryton
2011-07-29 18:59 <yangoon1> sharoon seems there are other duplicates as well http://comments.gmane.org/gmane.linux.debian.devel.bugs.general/747162
2011-07-29 19:00 <sharoon> yangoon1: grr!
2011-07-29 19:00 <yangoon1> sharoon strange standard indeed
2011-07-29 19:00 <sharoon> yangoon1: absolutely
2011-07-29 19:01 <cedk> sharoon: perhaps we should wait before update
2011-07-29 19:04 <sharoon> cedk: yangoon1: this standard is so screwed up
2011-07-29 19:07 <yangoon1> sharoon it is indeed broken, but not by definition http://www.iso.org/iso/country_codes/background_on_iso_3166/iso_3166-2.htm
2011-07-29 19:08 <yangoon1> "Note that the characters after the separator are only unique within the subdivision list of one particular country."
2011-07-29 19:08 <yangoon1> so they should be unique
2011-07-29 19:10 <yangoon1> who is working there? http://www.iso.org/iso/country_codes/contact_iso_3166/contact_form_3166.htm :)
2011-07-29 19:10 <cedk> CV-SL for Sal seems to be removed according to http://www.commondatahub.com/live/geography/state_province_region/iso_3166_2_state_codes
2011-07-29 19:11 <cedk> sharoon: I suspect that the pycountry module did not correctly apply ISO updates
2011-07-29 19:11 <sharoon> ACTION why is this ISO database in Microsoft® Access 2003 format!
2011-07-29 19:13 <sharoon> cedk: what do you think of using a CSV dump from the link you sent now to generate our data ?
2011-07-29 19:15 <cedk> but following http://www.iso.org/iso/iso_3166-2_newsletter_ii-2_2010-06-30.pdf they are duplicated
2011-07-29 19:15 <cedk> sharoon: I don't know who to trust
2011-07-29 19:15 <cedk> sharoon: normally I will guess that iso.org will be the right but they don't follow their own rules
2011-07-29 19:16 <sharoon> cedk: yep
2011-07-29 19:16 <cedk> one more reason to not have sql constraint for such data
2011-07-29 19:17 <cedk> sharoon: so let's take the pycountry data and fix the script to work with the duplicates
2011-07-29 19:17 <yangoon1> did you ever earn 100CHF on printing a pdf to a file? http://www.iso.org/iso/publications_and_e-products/databases.htm#PUB100050
2011-07-29 19:19 <sharoon> yangoon1: and does it say year of publication as 2007 /
2011-07-29 19:19 <sharoon> cedk: doing that
2011-07-29 19:19 <yangoon1> ACTION just looking at the changelog of http://www.commondatahub.com/changelog
2011-07-29 19:20 <cedk> it seems "Microsoft® Access 2003" can not check unique constraint :-)
2011-07-29 19:23 <yangoon1> sharoon the database they sell is indeed dead-old
2011-07-29 19:24 <yangoon1> according to http://www.iso.org/iso/country_codes/updates_on_iso_3166.htm#updates-iso-3166-2 the last update was indeed http://www.iso.org/iso/iso_3166-2_newsletter_ii-2_2010-06-30.pdf
2011-07-29 19:24 <yangoon1> introducing the duplicate
2011-07-29 19:24 <sharoon> yangoon1: wov! thats interesting - the agency responsible is irresponsible !
2011-07-29 19:25 <yangoon1> so http://www.commondatahub.com/ seems to be wrong if they don't liust it
2011-07-29 19:25 <sharoon> cedk: so i am handling exceptions in the code
2011-07-29 19:32 <sharoon> cedk: yangoon1: next one
2011-07-29 19:32 <sharoon> >>> s = pycountry.subdivisions.get(code='ES-IB')
2011-07-29 19:32 <sharoon> >>> s.code
2011-07-29 19:32 <sharoon> u'ES-IB'
2011-07-29 19:32 <sharoon> >>> s.parent_code
2011-07-29 19:32 <sharoon> u'ES-IB'
2011-07-29 19:32 <sharoon> >>>
2011-07-29 19:32 <yangoon1> sharoon LOL
2011-07-29 19:33 <yangoon1> but thats possible with their definition
2011-07-29 19:33 <yangoon1> I think http://www.commondatahub.com is broken
2011-07-29 19:34 <yangoon1> lets say: broken, too
2011-07-29 19:34 <yangoon1> they state:  -ISO 3166-2 Newsletter II-2 changes (800+). New level number and parent attributes added to State/Province/Region datasets. in july 2010
2011-07-29 19:35 <yangoon1> but don't have the duplicates...
2011-07-29 19:36 <sharoon> yangoon1: really ? a subdivision can be a parent of itself ?
2011-07-29 19:36 <yangoon1> sharoon is the parent a subdivision or a division?
2011-07-29 19:37 <sharoon> yangoon1: s.type == s.parent.type == u'Province'
2011-07-29 19:38 <yangoon1> sharoon I think that's possible, they say unique per namespace IIUC
2011-07-29 19:38 <yangoon1> ah didn't read coorectly, no, htat's broken, you are right
2011-07-29 19:39 <cedk> sharoon: look at the current data, es-ib is linked to "es ib"
2011-07-29 19:39 <sharoon> cedk: sorry, i am confused - which is the current data ?
2011-07-29 19:39 <cedk> sharoon: country.xml
2011-07-29 19:40 <sharoon> cedk: was that done manually ?
2011-07-29 19:41 <cedk> sharoon: but it seems that Balears have been renamed into ES-PM
2011-07-29 19:42 <cedk> sharoon: I'm starting to think if it could not be better to just use pycountry at run time and no more store it in the database
2011-07-29 19:43 <cedk> ACTION bbl
2011-07-29 19:43 <sharoon> cedk: same here
2011-07-29 19:45 <yangoon1> I think it shall go like this for CV-:
2011-07-29 19:46 <yangoon1> there are two geographical regions CV-B and CV-S
2011-07-29 19:46 <yangoon1> CV-SL Sal belongs to CV-B
2011-07-29 19:47 <yangoon1> CV-SL Sao Lorenzo belongs to CV-S
2011-07-29 19:52 <yangoon1> pycountry pulls from iso-codes from Debian, which is fairly well maintained http://packages.debian.org/changelogs/pool/main/i/iso-codes/iso-codes_3.27-1/changelog
2011-07-29 19:53 <yangoon1> don't know from where to get a more reliable source
2011-07-29 20:17 <cedk> we must keep the current xml id for the same records
2011-07-29 20:27 <meanmicio> sharoon : you can find the GNU Health repository at sourceforge, in trunk of the SVN
2011-07-29 20:28 <sharoon> meanmicio: thanks, found it
2011-07-29 20:28 <meanmicio> sharoon : We just have 2 modules left to port (labs and invoicing). Hopefully we'll finish all by Sunday
2011-07-29 20:29 <meanmicio> sharoon : great !
2011-07-29 20:29 <sharoon> meanmicio: that is really great news!
2011-07-29 20:30 <meanmicio> sharoon : yes :-) Then I'll put it in the development branch, so we can all debug it and optimize it
2011-07-29 20:30 <meanmicio> sharoon : but the main functionality will be there.
2011-07-29 20:31 <cedk> sharoon: or it is possible to update xml_id in ir.model.data
2011-07-29 20:32 <sharoon> meanmicio: awesome, we could help in code review etc
2011-07-29 20:32 <yangoon1> meanmicio: just had a look some days ago
2011-07-29 20:33 <sharoon> cedk: any suggestion on replacing ?
2011-07-29 20:33 <cedk> sharoon: on replacing what?
2011-07-29 20:33 <yangoon1> meanmicio: when/where will it be best to add comments/questions?
2011-07-29 20:34 <sharoon> cedk: update xml_id (not replace sorry)
2011-07-29 20:34 <meanmicio> sharoon, yangoon : yes. I will be moving the repositories to mercurial by December, when GNU Health 2.0 is out
2011-07-29 20:35 <yangoon1> meanmicio: as an example: you are defining drug dose units
2011-07-29 20:35 <meanmicio> yangoon1 : we have development mailing lists at SF, and then we also use Mantis BT for bugtracking
2011-07-29 20:35 <yangoon1> it could be done with existing UOM
2011-07-29 20:36 <meanmicio> yangoon1 : I thought about it... the thing is they are quite specific for administration, and I don't know whether they fit in the product UOM... but it might be
2011-07-29 20:36 <yangoon1> meanmicio: I know, but perhaps you are still just in migration process an d it doesn't make yet sense to disucss those questions, because you will change it
2011-07-29 20:37 <meanmicio> yangoon1 : Oh no, it makes sense. The migration process has been great to optimize GNUHealth
2011-07-29 20:37 <meanmicio> yangoon1 : so every sugestion is more than welcome at this point
2011-07-29 20:37 <yangoon1> meanmicio: ok
2011-07-29 20:38 <meanmicio> yangoon1 : thanks !
2011-07-29 20:38 <meanmicio> ACTION leaving for a meeting. bbl
2011-07-29 20:40 <cedk> sharoon: I mean if pycountry changed his schema of code, then perhaps we could follow it if possible, this will require to write a migration in init to update ir.model.data
2011-07-29 20:40 <sharoon> cedk: i just checked isocodes debian repo
2011-07-29 20:40 <sharoon> cedk: pycountry uses the file from that and that file has the same issue
2011-07-29 20:42 <sharoon> cedk: and this code is just released 2 days ago - https://launchpad.net/ubuntu/+source/iso-codes/3.27-1
2011-07-29 20:43 <cedk> sharoon: we can change the xml id schema to be unique by appending the country/parent etc.
2011-07-29 20:43 <sharoon> cedk: i think parent solves immediate problem
2011-07-29 20:43 <sharoon> cedk: but backward compatibility ?
2011-07-29 20:44 <sharoon> cedk: no existing databases will be able to upgrade - so this will be a 2.2 only update ?
2011-07-29 20:45 <sharoon> cedk: that goes against policy right?
2011-07-29 20:45 <sharoon> cedk: the best format is '<parent.code if it exists><subdivision.code>'
2011-07-29 20:50 <cedk> sharoon: it is possible to upgrade if you update the fs_id of ir.model.data according to the new scheme
2011-07-29 20:51 <cedk> sharoon: have a look at http://hg.tryton.org/modules/stock/file/ffd172646e67/shipment.py#l93
2011-07-29 20:58 <sharoon> cedk: i am not sure how we will be able to do this in the case of country. it will be a large upgrade where its not a standard 'replace x with y' but a patch where append y where y is different for each row ?
2011-07-29 21:00 <sharoon> cedk: BTW, by definition our current xml_id format is correct because there should be no duplicates because its the full code (i think we should just handle the special cases as such)
2011-07-29 21:03 -!- udono1(~udono@ip-95-222-129-145.unitymediagroup.de) has joined #tryton
2011-07-29 21:18 <cedk> sharoon: ok if it is possible to manage special cases
2011-07-29 21:18 <sharoon> cedk: looking at the options we have that seems best :)
2011-07-29 21:35 <sharoon> cedk: when was the last time our list was updated ?
2011-07-29 21:40 -!- bechamel(~user@host-85-201-144-79.brutele.be) has joined #tryton
2011-07-29 21:47 <cedk> sharoon: looks since the initial commit
2011-07-29 21:48 <sharoon> cedk: whoever said the world is a smaller place must have been kidding ;-). so many new types of subdivisions!
2011-07-29 21:53 <sharoon> cedk: I am unable to upload to code review because the file is too large
2011-07-29 21:53 -!- alimon(~alimon@201.158.247.118) has joined #tryton
2011-07-29 22:01 <sharoon> cedk: https://bitbucket.org/sharoonthomas/trytond-country/changeset/edc0b8eb13d1/raw/trytond-country-edc0b8eb13d1.diff
2011-07-29 22:11 <yangoon1> sharoon 'administrative region', 'Administrative Region'), seems to be a duplicate
2011-07-29 22:12 <sharoon> yangoon1: its the ISO data - ''Administrative Region'' and ''Administrative region'', R in caps and small - I will remove one :-)
2011-07-29 22:12 <yangoon1> yes
2011-07-29 22:26 -!- lageekitude(~Senvara@24.106.58.138) has joined #tryton
2011-07-29 22:31 -!- dba(~daniel@178.63.150.30) has joined #tryton
2011-07-29 22:32 <yangoon1> cedk: sharoon is it possible for ids to contain spaces?
2011-07-29 22:32 <yangoon1> <record model="country.subdivision" id="cv b">
2011-07-29 22:32 <sharoon> yangoon1: yes
2011-07-29 22:32 <yangoon1> <record model="country.subdivision" id="cv s">
2011-07-29 22:32 <yangoon1> sharoon ok
2011-07-29 22:33 <sharoon> yangoon1: >>> pycountry.subdivisions.get(code='CV S').name
2011-07-29 22:33 <sharoon> u'Ilhas de Sotavento'
2011-07-29 22:33 <yangoon1> sharoon I rather meant ids in tryton xml
2011-07-29 22:37 <sharoon> yangoon1: i don't think its a problem
2011-07-29 22:37 <yangoon1> sharoon seems so, because it already was before this way
2011-07-29 22:38 <sharoon> yangoon1: great! i was about to lookup the same
2011-07-29 22:38 <yangoon1> ACTION still wondering if the tryton model is correct
2011-07-29 22:40 <yangoon1> because country.subdivision can be duplicate according to specs, but geographical_region.subdivision wouldn't be
2011-07-29 22:43 <yangoon1> sharoon anyway, thx for your patch! cu
2011-07-29 22:43 <sharoon> yangoon1: cu
2011-07-29 22:57 -!- gremly(~gremly@200.106.218.64) has joined #tryton
2011-07-29 23:30 -!- alimon(~alimon@201.158.247.118) has joined #tryton

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!