IRC logs of #tryton for Friday, 2011-07-29 #tryton log beginning Fri Jul 29 00:00:05 CEST 2011
-!- elbenfreund( has joined #tryton00:18
-!- rhubner( has left #tryton01:03
-!- saxa(~sasa@ has joined #tryton01:34
-!- nicoe( has joined #tryton01:34
-!- plantian( has joined #tryton02:16
-!- alimon(~alimon@ has joined #tryton02:39
-!- ikks_(~ikks@ has joined #tryton02:47
-!- zodman(~zodman@foresight/developer/zodman) has joined #tryton03:38
-!- plantian( has joined #tryton04:45
-!- zodman(~zodman@foresight/developer/zodman) has joined #tryton04:57
-!- yangoon1( has joined #tryton05:02
-!- alimon(~alimon@ has joined #tryton05:36
-!- dfamorat_( has joined #tryton06:13
-!- sharoon( has joined #tryton06:39
-!- sharoon_( has joined #tryton06:40
-!- plantian( has joined #tryton07:12
-!- ecarreras(~under@unaffiliated/ecarreras) has joined #tryton08:17
-!- okko1(~okko@ has joined #tryton08:36
-!- vladimirek( has joined #tryton08:47
-!- helmor(~helmo@ has joined #tryton08:56
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:26
-!- bechamel( has joined #tryton09:29
-!- enlightx( has joined #tryton09:32
-!- plantian( has left #tryton09:43
-!- enlightx( has joined #tryton10:42
-!- nicoe( has joined #tryton11:14
-!- elbenfreund( has joined #tryton11:24
-!- enlightx( has joined #tryton12:35
-!- elbenfreund( has joined #tryton12:57
-!- nicoe( has joined #tryton13:24
-!- saxa(~sasa@ has joined #tryton14:21
-!- sharoon( has joined #tryton14:31
-!- sharoon_( has joined #tryton14:31
-!- enlightx( has joined #tryton14:35
-!- bechamel( has joined #tryton14:58
sharooncedk: ping15: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
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/ 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( has joined #tryton16:20
-!- lageekitude(~Senvara@ has joined #tryton16:57
-!- version2beta(~rob@ has joined #tryton17:39
-!- ccomb(~ccomb@ 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: 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@ has joined #tryton18:53
yangoon1sharoon seems there are other duplicates as well
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
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? :)19:10
cedkCV-SL for Sal seems to be removed according to
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 they are duplicated19:15
cedksharoon: I don't know who to trust19:15
cedksharoon: normally I will guess that 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?
sharoonyangoon1: and does it say year of publication as 2007 /19:19
sharooncedk: doing that19:19
yangoon1ACTION just looking at the changelog of
cedkit seems "Microsoft® Access 2003" can not check unique constraint :-)19:20
yangoon1sharoon the database they sell is indeed dead-old19:23
yangoon1according to the last update was indeed
yangoon1introducing the duplicate19:24
sharoonyangoon1: wov! thats interesting - the agency responsible is irresponsible !19:24
yangoon1so 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
sharoon>>> s.parent_code19:32
yangoon1sharoon LOL19:32
yangoon1but thats possible with their definition19:33
yangoon1I think 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
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 -
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 according to the new scheme20:50
cedksharoon: have a look at
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( 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( 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@ has joined #tryton21:53
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
-!- lageekitude(~Senvara@ has joined #tryton22:26
-!- dba(~daniel@ 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@ has joined #tryton22:57
-!- alimon(~alimon@ has joined #tryton23:30

Generated by 2.11.0 by Marius Gedminas - find it at!