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

chat.freenode.net #tryton log beginning Fri Jul 29 00:00:05 CEST 2011
-!- elbenfreund(~elbenfreu@g227130021.adsl.alicedsl.de) has joined #tryton00:18
-!- rhubner(~rhubner@189.58.53.98.dynamic.adsl.gvt.net.br) has left #tryton01:03
-!- saxa(~sasa@189.26.255.43) has joined #tryton01:34
-!- nicoe(~nicoe@2.90-247-81.adsl-dyn.isp.belgacom.be) has joined #tryton01:34
-!- plantian(~ian@173-167-122-145-sfba.hfc.comcastbusiness.net) has joined #tryton02:16
-!- alimon(~alimon@189.154.61.121) has joined #tryton02:39
-!- ikks_(~ikks@190.25.17.155) has joined #tryton02:47
-!- zodman(~zodman@foresight/developer/zodman) has joined #tryton03:38
-!- plantian(~ian@c-67-169-72-36.hsd1.ca.comcast.net) has joined #tryton04:45
-!- zodman(~zodman@foresight/developer/zodman) has joined #tryton04:57
-!- yangoon1(~mathiasb@p549F3C82.dip.t-dialin.net) has joined #tryton05:02
-!- alimon(~alimon@189.154.61.121) has joined #tryton05:36
-!- dfamorat_(~dfamorato@173-9-190-185-miami.txt.hfc.comcastbusiness.net) has joined #tryton06:13
-!- sharoon(~sharoon@173-9-190-185-miami.txt.hfc.comcastbusiness.net) has joined #tryton06:39
-!- sharoon_(~sharoon@204-232-205-248.static.cloud-ips.com) has joined #tryton06:40
-!- plantian(~ian@c-67-169-72-36.hsd1.ca.comcast.net) has joined #tryton07:12
-!- ecarreras(~under@unaffiliated/ecarreras) has joined #tryton08:17
-!- okko1(~okko@62.58.29.41) has joined #tryton08:36
-!- vladimirek(~vladimire@bband-dyn21.178-41-212.t-com.sk) has joined #tryton08:47
-!- helmor(~helmo@2.208.216.11) has joined #tryton08:56
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:26
-!- bechamel(~user@cismwks02-virtual1.cism.ucl.ac.be) has joined #tryton09:29
-!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton09:32
-!- plantian(~ian@c-67-169-72-36.hsd1.ca.comcast.net) has left #tryton09:43
-!- enlightx(~enlightx@dynamic-adsl-94-34-231-35.clienti.tiscali.it) has joined #tryton10:42
-!- nicoe(~nicoe@ced.homedns.org) has joined #tryton11:14
-!- elbenfreund(~elbenfreu@g227151058.adsl.alicedsl.de) has joined #tryton11:24
-!- enlightx(~enlightx@dynamic-adsl-94-34-231-35.clienti.tiscali.it) has joined #tryton12:35
-!- elbenfreund(~elbenfreu@p54B9457A.dip.t-dialin.net) has joined #tryton12:57
-!- nicoe(~nicoe@ced.homedns.org) has joined #tryton13:24
-!- saxa(~sasa@189.26.255.43) has joined #tryton14:21
-!- sharoon(~sharoon@173-9-190-185-miami.txt.hfc.comcastbusiness.net) has joined #tryton14:31
-!- sharoon_(~sharoon@204-232-205-248.static.cloud-ips.com) has joined #tryton14:31
-!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton14:35
-!- bechamel(~user@cismwks02-virtual1.cism.ucl.ac.be) has joined #tryton14:58
sharooncedk: ping15:10
sharoonced15:10
sharooncedk: i have pushed with the flag on party and a bulky test suite which checks that15:10
cedksharoon: ok I will check15:11
cedksharoon: did you test the LRU?15:11
sharooncedk: thanks15:11
sharooncedk: i am testing that today…15:11
sharooncedk: our list of countries and states is not uptodate, there is a new version of pycountry15:11
cedksharoon: patch?15:12
sharooncedk: i can propose one today15:12
cedksharoon: also did you see I activate translation of subdivision, it will be good to fix the script to translate also those names15:13
sharooncedk: which all languages ?15:14
cedksharoon: those defined in country15:19
sharooncedk: ok15:19
cedksharoon: there is a script somewhere to get translation from pycountry15:19
sharooncedk: it uses gettext15:20
sharooncedk: which means i have to create xml records for ir.translation - is that right ?15:20
cedksharoon: no in csv15:21
sharoonACTION reading code in country module15:21
cedksharoon: https://bugs.tryton.org/roundup/issue148215:22
sharooncedk: 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 ?15:26
cedksharoon: no the one in the issue15:27
sharooncedk: the script in code review directly adds to the database, while what we want is the CSV file to be generated right ?15:29
cedksharoon: yes but adding translation to the database is good because it will reuse the trytond method to generate the csv file after15:30
sharooncedk: why not generate the csv file directly because we use res_id anyway ?15:31
cedksharoon: because there is not only the countries to translate but also the fields, the views etc15:32
cedksharoon: but if you want we can do it later, first update with the last pycountry version15:36
sharooncedk: 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 first15:38
cedksharoon: 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 simple15:39
sharooncedk: 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 :)15:40
sharooncedk: do you have a prob if I update the scripts/countries.py to a full command line script ?15:46
sharooncedk: at the moment it just prints to the STDOUT15:47
cedksharoon: it is because the output must be placed inside a xml file15:47
sharooncedk: but we could write directly to the xml file rather than piping the o/p ? I mean with the headers and so on ?15:48
cedksharoon: it is not only the header but there is the views etc15:51
cedksharoon: or you should create a specific xml file for only this data15:51
sharooncedk: i think that will be better15:54
sharooncedk: a separate XML which has the view and is static (the current file)15:55
sharooncedk: and a second file which is generated with the command line script15:55
cedksharoon: ok15:56
-!- elbenfreund(~elbenfreu@p54B9457A.dip.t-dialin.net) has joined #tryton16:20
-!- lageekitude(~Senvara@24.106.58.138) has joined #tryton16:57
-!- version2beta(~rob@24.106.58.138) has joined #tryton17:39
-!- ccomb(~ccomb@95.10.173.41) has joined #tryton17:52
sharooncedk: ping18:32
cedksharoon: pong18:32
sharooncedk: 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 duplicates18:33
sharooncedk: http://en.wikipedia.org/wiki/ISO_3166-2:CV#Municipalities18:33
sharooncedk: and search for CV-SL18:33
sharooncedk: there are two CV-SL18:33
sharooncedk: so probably we should extend the constraint as unique(code, parent)18:34
cedksharoon: I don't see unique constraint on subdivision18:38
sharooncedk: ok yeah, blunder - its the problem with the xml_id18:44
sharoonsorry fs_id18:44
cedksharoon: but it is quite incredible that they create duplicate code18:47
cedksharoon: I suggest you add an exception for São Lourenço dos Órgãos to generate is xml id18:48
sharooncedk: ok18:50
-!- alimon(~alimon@189.154.98.28) has joined #tryton18:53
yangoon1sharoon seems there are other duplicates as well http://comments.gmane.org/gmane.linux.debian.devel.bugs.general/74716218:59
sharoonyangoon1: grr!19:00
yangoon1sharoon strange standard indeed19:00
sharoonyangoon1: absolutely19:00
cedksharoon: perhaps we should wait before update19:01
sharooncedk: yangoon1: this standard is so screwed up19:04
yangoon1sharoon it is indeed broken, but not by definition http://www.iso.org/iso/country_codes/background_on_iso_3166/iso_3166-2.htm19:07
yangoon1"Note that the characters after the separator are only unique within the subdivision list of one particular country."19:08
yangoon1so they should be unique19:08
yangoon1who is working there? http://www.iso.org/iso/country_codes/contact_iso_3166/contact_form_3166.htm :)19:10
cedkCV-SL for Sal seems to be removed according to http://www.commondatahub.com/live/geography/state_province_region/iso_3166_2_state_codes19:10
cedksharoon: I suspect that the pycountry module did not correctly apply ISO updates19:11
sharoonACTION why is this ISO database in Microsoft® Access 2003 format!19:11
sharooncedk: what do you think of using a CSV dump from the link you sent now to generate our data ?19:13
cedkbut following http://www.iso.org/iso/iso_3166-2_newsletter_ii-2_2010-06-30.pdf they are duplicated19:15
cedksharoon: I don't know who to trust19:15
cedksharoon: normally I will guess that iso.org will be the right but they don't follow their own rules19:15
sharooncedk: yep19:16
cedkone more reason to not have sql constraint for such data19:16
cedksharoon: so let's take the pycountry data and fix the script to work with the duplicates19:17
yangoon1did you ever earn 100CHF on printing a pdf to a file? http://www.iso.org/iso/publications_and_e-products/databases.htm#PUB10005019:17
sharoonyangoon1: and does it say year of publication as 2007 /19:19
sharooncedk: doing that19:19
yangoon1ACTION just looking at the changelog of http://www.commondatahub.com/changelog19:19
cedkit seems "Microsoft® Access 2003" can not check unique constraint :-)19:20
yangoon1sharoon the database they sell is indeed dead-old19:23
yangoon1according 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.pdf19:24
yangoon1introducing the duplicate19:24
sharoonyangoon1: wov! thats interesting - the agency responsible is irresponsible !19:24
yangoon1so http://www.commondatahub.com/ seems to be wrong if they don't liust it19:25
sharooncedk: so i am handling exceptions in the code19:25
sharooncedk: yangoon1: next one19:32
sharoon>>> s = pycountry.subdivisions.get(code='ES-IB')19:32
sharoon>>> s.code19:32
sharoonu'ES-IB'19:32
sharoon>>> s.parent_code19:32
sharoonu'ES-IB'19:32
sharoon>>>19:32
yangoon1sharoon LOL19:32
yangoon1but thats possible with their definition19:33
yangoon1I think http://www.commondatahub.com is broken19:33
yangoon1lets say: broken, too19:34
yangoon1they state:  -ISO 3166-2 Newsletter II-2 changes (800+). New level number and parent attributes added to State/Province/Region datasets. in july 201019:34
yangoon1but don't have the duplicates...19:35
sharoonyangoon1: really ? a subdivision can be a parent of itself ?19:36
yangoon1sharoon is the parent a subdivision or a division?19:36
sharoonyangoon1: s.type == s.parent.type == u'Province'19:37
yangoon1sharoon I think that's possible, they say unique per namespace IIUC19:38
yangoon1ah didn't read coorectly, no, htat's broken, you are right19:38
cedksharoon: look at the current data, es-ib is linked to "es ib"19:39
sharooncedk: sorry, i am confused - which is the current data ?19:39
cedksharoon: country.xml19:39
sharooncedk: was that done manually ?19:40
cedksharoon: but it seems that Balears have been renamed into ES-PM19:41
cedksharoon: 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 database19:42
cedkACTION bbl19:43
sharooncedk: same here19:43
yangoon1I think it shall go like this for CV-:19:45
yangoon1there are two geographical regions CV-B and CV-S19:46
yangoon1CV-SL Sal belongs to CV-B19:46
yangoon1CV-SL Sao Lorenzo belongs to CV-S19:47
yangoon1pycountry 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/changelog19:52
yangoon1don't know from where to get a more reliable source19:53
cedkwe must keep the current xml id for the same records20:17
meanmiciosharoon : you can find the GNU Health repository at sourceforge, in trunk of the SVN20:27
sharoonmeanmicio: thanks, found it20:28
meanmiciosharoon : We just have 2 modules left to port (labs and invoicing). Hopefully we'll finish all by Sunday20:28
meanmiciosharoon : great !20:29
sharoonmeanmicio: that is really great news!20:29
meanmiciosharoon : yes :-) Then I'll put it in the development branch, so we can all debug it and optimize it20:30
meanmiciosharoon : but the main functionality will be there.20:30
cedksharoon: or it is possible to update xml_id in ir.model.data20:31
sharoonmeanmicio: awesome, we could help in code review etc20:32
yangoon1meanmicio: just had a look some days ago20:32
sharooncedk: any suggestion on replacing ?20:33
cedksharoon: on replacing what?20:33
yangoon1meanmicio: when/where will it be best to add comments/questions?20:33
sharooncedk: update xml_id (not replace sorry)20:34
meanmiciosharoon, yangoon : yes. I will be moving the repositories to mercurial by December, when GNU Health 2.0 is out20:34
yangoon1meanmicio: as an example: you are defining drug dose units20:35
meanmicioyangoon1 : we have development mailing lists at SF, and then we also use Mantis BT for bugtracking20:35
yangoon1it could be done with existing UOM20:35
meanmicioyangoon1 : 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 be20:36
yangoon1meanmicio: 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 it20:36
meanmicioyangoon1 : Oh no, it makes sense. The migration process has been great to optimize GNUHealth20:37
meanmicioyangoon1 : so every sugestion is more than welcome at this point20:37
yangoon1meanmicio: ok20:37
meanmicioyangoon1 : thanks !20:38
meanmicioACTION leaving for a meeting. bbl20:38
cedksharoon: 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.data20:40
sharooncedk: i just checked isocodes debian repo20:40
sharooncedk: pycountry uses the file from that and that file has the same issue20:40
sharooncedk: and this code is just released 2 days ago - https://launchpad.net/ubuntu/+source/iso-codes/3.27-120:42
cedksharoon: we can change the xml id schema to be unique by appending the country/parent etc.20:43
sharooncedk: i think parent solves immediate problem20:43
sharooncedk: but backward compatibility ?20:43
sharooncedk: no existing databases will be able to upgrade - so this will be a 2.2 only update ?20:44
sharooncedk: that goes against policy right?20:45
sharooncedk: the best format is '<parent.code if it exists><subdivision.code>'20:45
cedksharoon: it is possible to upgrade if you update the fs_id of ir.model.data according to the new scheme20:50
cedksharoon: have a look at http://hg.tryton.org/modules/stock/file/ffd172646e67/shipment.py#l9320:51
sharooncedk: 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 ?20:58
sharooncedk: 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)21:00
-!- udono1(~udono@ip-95-222-129-145.unitymediagroup.de) has joined #tryton21:03
cedksharoon: ok if it is possible to manage special cases21:18
sharooncedk: looking at the options we have that seems best :)21:18
sharooncedk: when was the last time our list was updated ?21:35
-!- bechamel(~user@host-85-201-144-79.brutele.be) has joined #tryton21:40
cedksharoon: looks since the initial commit21:47
sharooncedk: whoever said the world is a smaller place must have been kidding ;-). so many new types of subdivisions!21:48
sharooncedk: I am unable to upload to code review because the file is too large21:53
-!- alimon(~alimon@201.158.247.118) has joined #tryton21:53
sharooncedk: https://bitbucket.org/sharoonthomas/trytond-country/changeset/edc0b8eb13d1/raw/trytond-country-edc0b8eb13d1.diff22:01
yangoon1sharoon 'administrative region', 'Administrative Region'),  seems to be a duplicate22:11
sharoonyangoon1: its the ISO data - ''Administrative Region'' and ''Administrative region'', R in caps and small - I will remove one :-)22:12
yangoon1yes22:12
-!- lageekitude(~Senvara@24.106.58.138) has joined #tryton22:26
-!- dba(~daniel@178.63.150.30) has joined #tryton22:31
yangoon1cedk:  sharoon is it possible for ids to contain spaces?22:32
yangoon1<record model="country.subdivision" id="cv b">22:32
sharoonyangoon1: yes22:32
yangoon1<record model="country.subdivision" id="cv s">22:32
yangoon1sharoon ok22:32
sharoonyangoon1: >>> pycountry.subdivisions.get(code='CV S').name22:33
sharoonu'Ilhas de Sotavento'22:33
yangoon1sharoon  I rather meant ids in tryton xml22:33
sharoonyangoon1: i don't think its a problem22:37
yangoon1sharoon seems so, because it already was before this way22:37
sharoonyangoon1: great! i was about to lookup the same22:38
yangoon1ACTION still wondering if the tryton model is correct22:38
yangoon1because country.subdivision can be duplicate according to specs, but geographical_region.subdivision wouldn't be22:40
yangoon1sharoon anyway, thx for your patch! cu22:43
sharoonyangoon1: cu22:43
-!- gremly(~gremly@200.106.218.64) has joined #tryton22:57
-!- alimon(~alimon@201.158.247.118) has joined #tryton23:30

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!