IRC logs of #tryton for Friday, 2008-08-08 #tryton log beginning Fri Aug 8 00:00:01 CEST 2008
-!- Timitos(n=Timitos@ has joined #tryton07:30
-!- nicoe( has joined #tryton08:48
nicoeudono: I think I found a solution to the problem of the debugging with relatorio08:51
udononicoe: Godd morn'08:52
udononicoe: great to read08:52
nicoeudono: Good morning.08:52
udononicoe: Iam evaluating now, you get the massage in some minutes08:52
nicoeudono: In fact it is really simple: just use the genshi interpolation stuff08:52
nicoeudono: ${} in the reports works too08:53
nicoeudono: thanks to genshi08:53
udononicoe: hmm, never heard about this stuff08:53
nicoeIt's a feature of genshi08:53
nicoeFor simple thing you do not have to use <py:replace> tag08:54
udononicoe: where is the problem in debugging with relatorio? havn't recognized this08:54
-!- gadaga( has joined #tryton08:54
nicoeJust a simple ${variable} will be replace by a <py:replace>08:54
gadaganicoe: hi08:54
nicoeIt will ease the debuggin I think, we could keep the text:a stuff for very specific things (for/choose/... and for value in the oocalc)08:56
udonohi gadaga08:58
udononicoe: I thing I have to read the genshi documentation...08:58
udononicoe: you have mail08:59
gadagaudono: hi08:59
nicoeudono: I'll take a look.08:59
gadagaeveryone can create a new database with the next rev of trytond?09:00
gadagamy create crash every time :(09:00
udonogadaga: where it crash?09:03
gadagaudono: on createdb09:04
udonogadaga: hmm, could be my fault09:04
udonogadaga: what happens?09:04
gadagaudono: error : relation "ir_model" already exist09:04
udonogadaga: this error depends on other things, than my modifications09:05
udonoACTION duck09:05
gadagaudono: :(09:05
Timitosgadaga: udono: for me database creation works with the actual changeset09:06
udonogadaga: Rule 1: Fault are the others09:06
gadagaudono: could you send me a dump of a new database?09:06
udonogadaga: No, just joking09:06
udonogadaga: database creation works fine on my machines...09:06
gadagai'll try to reinstall trytond09:06
udonogadaga: This could solve problems, but when it is on database side...09:07
udonogadaga: but its worth to try...09:07
udonogadaga can you open an existing database?09:08
gadagaudono: with a new trytond, 've got the same problem09:08
gadagaudono: yes i can open an existing database09:08
udonogadaga: but you can not update an existing database?09:09
gadagaudono: i don't know, i borke my relationship_party records with a test :p09:10
gadagaudono: you are in postgresql 8.2 or 8.3?09:10
udonogadaga: Iam in 8.209:11
udonogadaga: which OS you use?09:11
gadagaudono: ubuntu 7.10 and postgres 8.209:12
-!- bch( has joined #tryton09:12
udonogadaga: the sam I had on my old installation... without problems09:13
udonogadaga: Iam now on Ubuntu 8.04, but there has been are some flaws in the upgrade...09:14
udonogadaga: but now its working...09:15
udonogadaga: maybe I have an good idea...09:16
gadagaudono: with a dump i have no pb09:16
udonogadaga: can you examine databasetables via psql or another tool?09:16
gadagaudono: of course09:16
udonogadaga: open the template1 database and show if there is tryton stuff inside...09:17
udonogadaga: the same with template009:17
udonogadaga: because if someone creates a database, there will created a copy of template1...09:18
udonogadaga: and if there is already trytonstuff inside, tryton fails in creating the same structure...09:18
udonogadaga: I had this problem seen in my last projects...09:19
gadaga\c template109:20
gadagaoups :p09:20
udonogot it?09:20
udonogadaga: ?09:21
gadagaudono: i don't found trytonstuff09:21
udonogadaga: no table ir_model in both databases?09:23
gadagaudono: yes i found the table09:25
udonogadaga: in template1 or 0 or both?09:26
gadagaudono: i can't connect to template009:27
nicoebch: I think I found a way to avoid bugs in relatorio with URL09:28
udonogadaga: can you CREATE DATABASE template3 TEMPLATE template0;09:28
udonogadaga: user postgres...09:29
Timitosbch: hi09:29
bchhi all09:29
nicoesalut tout seul09:29
udonobch: Timitos: hi09:29
Timitosbch: do you know for what the field kind in account.account is used?09:30
Timitosbch: only for computing payable and receivable on
udonogadaga: ?09:31
gadagaudono: ok09:31
bchTimitos: it's the result of your last discussion with ced about it, i think kind was on the account.type before.09:31
gadagaudono: i did it09:31
udonogadaga: you can create template3 as template from template0?09:32
gadagaudono: yep09:32
Timitosbch: yes. thats ok. but i need to know where this value is used.09:32
udonogadaga: \c template309:32
udonogadaga: and show for  ir_model inside09:33
Timitosbch: i am working on german account chart and can not parse these values completely. so i want to set them to "Other" in most cases. but i don´t know which effect this will have.09:33
gadagaudono: template3 is empty09:34
udonogadaga: juat the standard pg_* tables?09:34
gadagaudono: with \dt : no relation found09:34
bchTimitos: essentially kind is used to filter on kind 'receivable' and 'payable' when such an account is needed09:35
udonogadaga: try select * from pg_<TAB-Key> then should some pg_ tables shown09:35
gadagaudono: ok i see pg_ tables09:36
bchTimitos: and also iirc the kind is used to filter accoutns on reporting09:36
udonogadaga: I think we can drop the template1 table and recreate it with template0, but dont bite me if your computer begin to burn ;-)09:36
udonogadaga: \c template309:37
Timitosbch: is there also some filtering on the values 'expense' and 'revenue'? these values are my problems.09:37
udonogadaga: drop database template1;09:37
gadagaudono: i already use openerp to....09:37
Timitosbch: i can parse everything but not divide my accounts by 'expense' and 'revenue' :-(09:37
bchTimitos: all the filter i see about expense and revenue are made on the type of the journal09:38
udonogadaga than make a dump of template109:38
udonogadaga: is template1 your production database?09:39
gadagaudono: yes :(09:40
Timitosbch: but this is not connected to the field kind i think?09:40
Timitosbch: not correct! there is only a "kind!="view""09:41
Timitosbch: this should not be a problem for me. so i hope that i can do i my way. i worst case i need to fill these values by hand :-(09:42
udonogadaga: no problem09:43
udonogadaga: did you drop the database? If not DOT DO IT09:43
udonogadaga: template1 I mean with database09:44
udonogadaga: ...but you told you have a dump?09:44
gadagaudono: are you sure i can drop template1 without pb if i use openerp and tryton?09:44
udonogadaga: wait09:44
gadagaudono: i have a dump of a tryton database09:45
udonogadaga: Your template1 is tainted by non templating data09:45
bchTimitos: maybe you can have a look in account_be09:45
udonogadaga: This is, sorry, a user mistake from a previous installation. Tryton needs to avoid updating template* databases, I'll create a bugentry09:46
Timitosbch: great idea!!! :-D seems that there are also no values "expense" and "revenue" in there.09:47
udonogadaga: you need a backup or rename of the template1 database to somthing tryton/open-erp, after this you need to recreate the template1 database from template009:47
gadagaudono: ok thanks09:49
bchnicoe: you told me that you find a way to avoid bug wit urls ?09:54
nicoebch: yes, just use genshi interpolation mechanism09:54
nicoebch: In fact Ged told me that it would be nice to have this mechanism and will reading genshi code I notice we already had it.09:55
nicoeso instead of having <text:placeholder>toto</text:placeholder> or <text:a href="relatorio://toto">toto</text:a> you can use ${toto} in your template09:56
CIA-54tryton: uspallek roundup * #238/Avoid updating postgres template Databases: [new] gadaga has the problem that he installs Tryton or OpenERP into the template1 database of postgres. But postgres uses the template1 database ...09:57
udonogadaga: I place an issue and put you on the nosy list...09:57
bchnicoe: .. and forget about the tags ?09:58
nicoethe text:a stuff can be reserved only for "complicated" stuffs: for/choose/or inclusion in calc documents09:58
udonogadaga: is the template1 database from tryton or openERP?09:58
nicoebch: yes09:58
nicoebch; It comes bundled in genshi so I did not even think about it ...09:58
nicoeBut it is the easiest way to do it.09:59
bchnicoe: yes, by far09:59
nicoeI'm quite happy with this solution09:59
bchnicoe: maybe you were influenced by the way we where doing it in tryton before09:59
CIA-54tryton: uspallek roundup * #238/Avoid updating postgres template Databases: [chatting] Maybe its possible to solve this issue in case of failures with openERP or something else: Try to create a new Tryton database with tem ...10:01
nicoebch: I doubt so because I did not look at tryton when working on relatorio v0.110:02
CIA-54tryton: uspallek roundup * #238/Avoid updating postgres template Databases: See also chatlog from 2008-08-08 09:00 chat betwee gadaga and udono10:02
nicoebch: when it was still included in ohxpd10:02
bchnicoe: yes ok10:03
bchudono: about the template db, i think that it would be good to check in tryton that the user don't try to alter system db. But providing a way to resolve the problem inside tryton is a bit too much. It's a erp not a db tools (but if you want you can create a db_tools module in tryton :), it's mean to be a framework anyway )10:06
CIA-54tryton: gadaga roundup * #239/UnboundLocalError: local variable 'ids' referenced before assignment: [new] Traceback (most recent call last): File "/trytond/", line 335, in run res = method(*msg[2:]) File "/trytond/web_service/wiz ...10:08
udononicoe: great solution. Not this clean to mix controll and content, but unbeatable easy. And ${...} isn't use in any business documents.10:08
-!- gael_( has joined #tryton10:09
bchnicoe: and of course the best thing would be to provide a way to choose10:09
nicoeudono: ${...} is only used for content, for control you still have to use text:a ...10:09
gael_ udono: i rename template 1, and i create a new tempalte1 from template0. I can createdb from openerp and tryton but in create_db on tryton I have notice that he say "relation ir_cron doesn't exist"10:09
udononicoe: yes, just avoiding that a tainted template is used and avoiding that the database name = template*10:09
nicoebch: choose between what ?10:09
bchnicoe: ${} vs link vs placeholder :)10:10
nicoebch: link vs placeholder it should be feasible ... but if link can do what ${...} does the reverse is not true.10:11
bchnicoe: the reverse is not true ... in ods i presume10:13
udononicoe: don't understand the difference between ${...} and link?10:13
nicoebch, udono : the reverse is not true everywhere10:14
udononicoe: of course, the reverse of true is false...10:14
udonogael_: hi10:14
gael_udono: it's me gadaga :p10:14
udonogael_: :-)10:15
udonogael_: "relation ir_cron doesn't exist", I have no ideas...10:16
udonogael_: I created a new database, and there was not such an error...10:16
gadagaudono: i cant' install relationship module but i can install product10:16
udonogael_: you have a broken relationship module?10:17
nicoeudono, bch: I'll thake an example: ${for each="toto in foo"} does not work10:17
gadagaudono: i pull the lastest version of hg represitory10:17
bchnicoe: and  ${for toto in foo} ?10:18
nicoebch: does not work10:19
bchnicoe: damn10:19
nicoebut ${len(function(foo))} works10:20
nicoeI do not see it as a problem since it forces you to seperate structure with variable10:22
nicoemoreover I added a check so that you are warned when the content of a text:a is different from the url in the text:a10:22
-!- Gedd( has joined #tryton10:24
CIA-54tryton: Bertrand Chenal <> default * 811:e08e383d5ae0 trytond/trytond/ir/ FIX: init ids to empty list10:25
CIA-54tryton: bch roundup * #239/UnboundLocalError: local variable 'ids' referenced before assignment: [testing] Should be fixed with changeset e08e383d5ae010:26
udonogadaga: I did the same, no error:
bchgadaga: about the french translation, ced told me that made all the traductions (he had nothing else to do), i will push them when i will have a connection10:27
udononicoe: the last test I dont like...10:28
nicoeudono, which test ?10:28
udononicoe:  a check so that you are warned when the content of a text:a is different from the url in the text:a10:28
gadagabch: thanks relationship module works now10:28
nicoeudono: Why don't you like it, it is created so that you have to know what you are doing when you customize the content of the text:a10:29
gadagaudono: i retry to create a database and i have no error :) thx10:31
udononicoe: Just to many possibilitys, but maybe you are right10:31
udonogadaga: what a luck, I can help you!10:31
udononicoe: I am a fan of easy one way api, if you make things wrong -> fatal error10:32
CIA-54tryton: gadaga roundup * #239/UnboundLocalError: local variable 'ids' referenced before assignment: Fixed with changset e08e383d5ae010:33
udononicoe: the distiction between ${Tryton-variable} and link:genshi is ok for me. Because than we have to document only the tryton-variables. The genshi stuff is documented by gensh self...10:47
udononicoe: but then could the privat protocol better genshi:// than relatorio... because you will earn the genshi requests from the users...10:48
nicoeudono: you're right10:54
udononicoe: but its an openhex decision10:56
-!- markusleist(n=markus@ has joined #tryton10:58
-!- b52laptop(n=b52lapto@ has joined #tryton11:00
Timitosb52laptop: hi11:08
udonob52laptop: hi11:09
bchnicoe: about the ${} stuff, it has a drawback: nothing prevent OOo to put tags inside ${}, it's a big  problem in tiny because sometimes it's impossoble to fix inside OOo (the only solution is to erase  and re-type)12:56
nicoebch; Indeed. Using a specific tag avoids this but unfortunately placeholders works only in odt.13:00
nicoeOn the other hand, I don't see how you can do variable interpolation without having this kind of problem.13:01
bchnicoe: yes, so we are back to the link vs placeholder discussion :)13:02
nicoebch: If someone has a better idea than text:a I'm more then ready to adopt it.13:03
bchnicoe: for odt the best tag is placeholder :)13:04
nicoeBut I'm afraid there is no better idea (that's what the guy from SUN told udono AFAIK)13:04
nicoeBut relatorio is not only about odt13:04
nicoeUsing an option to toggle between placholders and text:a is an option13:05
nicoeafter all this is just a matter of selecting nodes13:06
nicoeBut it would break the coherence ...13:06
bchnicoe: the cohence between different usages or in the code ?13:07
nicoeMoreover, the variable interpolation is present in genshi and it won't disappear so whatever the choice we do, the problem you talked about will appear13:07
nicoecoherence between different usages13:08
udononicoe: yes there is no no other tag we can use in all openOffice applications he knows about, so he told me...13:22
udononicoe: he= Sun guy13:23
udononicoe, bch: but if you like to talk to him, he is on and called erAck13:24
-!- gadaga( has joined #tryton13:36
-!- kultviech( has joined #tryton13:56
-!- ruijuan( has joined #tryton14:37
gadagaruijuan: hi ;)14:37
-!- bch`( has joined #tryton14:44
-!- gadaga( has joined #tryton14:44
CIA-54tryton: Timitos roundup * #240/cannot remove parent from accounttype: [new] don´t know if this is a feature. if i try to remove a parent from an account.type i get a message "write_xml_record" "xml_record_desc" ther ...14:45
gadagabch: in currency, code and name has benn defined by an iso specification?14:46
-!- rli( has joined #tryton14:46
bch`gadaga: no there is no constraint on the code field14:48
bch`gadaga: except for the size14:48
bch`gadaga: you where not talking about constraint but about the xml data ...14:49
gadagabch: why for Dollar you choose $ and for Eur not € ? it's not logical14:49
bch`gadaga: i see $ and € here14:50
Timitosgadaga: i see € too :-)14:50
gadagabch, Timitos  : in symbol yes14:51
rli¥ also14:52
gadagarli: you can put it in configuration of currency14:52
rliyep but i need a tutorial ;)14:54
gadagarli: have you look the wiki?14:55
bch`rli: take a look in currency/currency.xml the two last block14:55
gadagabch: ok you use iso 4217 for the code currency15:00
gadagabch`: why we don't use a selection for iso4217 codes?15:00
bch`gadaga: i don't know, where did you found that the code are iso4217 ?15:05
gadagabch`: and here :
gadagabch`: we have the relation on name,code is this table15:07
bch`gadaga: one can imagine to define all the currencies in the xml15:08
gadagabch`: yes it's a good idea no?15:09
gadagabch`: field name in currency.currency is translatable?15:09
bch`gadaga: yes there is a little flag15:10
gadagabch`: nice15:10
gadagabch`: rli can make the xml if you want15:11
bch`gadaga: i was wondering about the symbols, but rli was  able to type ¥ (that i just past) :)15:13
bch`gadaga: joke aside, it's not critical15:14
gadagabch`: :p15:14
gadagabch`: we can enter the symbol as an unicode?15:15
bch`gadaga: whe use unicode everywhere now, if it doesn't work we have to fix it15:17
gadagabch`: ok rli try to make the xml15:20
udonogadaga: bch`: pycountry15:20
udonosee issue23515:21
gadagaudono: good idea but pycountry don't give symbol15:23
gadagaudono: when will you implement it?15:25
udonogadaga: I think for this I am to newbee in python... so I do it next Year ...15:26
udonogadaga: but maybe its a nice addon module and dont need to be taken into the trytond...15:27
udonogadaga: I think the implementation needs some discussion...15:28
gadagabch`: we can make the xml in first time and after implement pycountry?15:28
gadagaudono: i think too, but pycountry is a nice addons for trytond15:28
bch`the advantage of pycountry is on the long run, if the package is well updated it's a plus, if not an xml is enough. It's difficult to judge, pycountry seems very new.15:31
udonobch`: yes, its from beginning 2008, but for a first import it could be smart to use the debian knowledge.15:32
udonobch`: even I have some databases around for zip codes of germany and austria15:32
bch`udono: yes of course it's the easiest tool to generate the xml15:34
udonodid you have official zipcodes for belgique15:35
gadagabch`: we make the xml or standby?15:35
bch`udono: no, but maybe they are in openerp15:36
udonobch`: with what quality?15:37
udonobch`: maybe there is some official list provided by the government. Its more easy to maintain data from the same source...15:37
bch`gadaga: i was thinking about the country table in relationship15:38
bch`gadaga: but i don't think that we need a relation between the two table15:40
udonogadaga: I would like to provide via xml, because the data could be wrong or there are missing entrys. So I like to see that we can edit them like the way we do now.15:40
bch`udono: yes sure, iirc the one use by tiny comes from a friend of a friend and is not perfectly up-to-date15:40
gadagabch`: i don't think that the relation between the two table is needed15:44
udonobch`: I have a xslt which process from a table like: Zip; City a tinyerp XML.15:45
nicoeudono: I believe you there is no problem15:45
gadagabch`, udono : pycountry doesn't reconized code 'AFN' :( pycountry isn't completly compatible with iso 421716:15
udonogadaga: what is AFN?16:17
gadagabch`: yep16:22
gadagaudono: in iso 4217 we have 239 codes16:23
gadagaudono: in pycountry we have only 183 codes16:23
udonogadaga: so we use iso4217 for the countrys, pycountry fot the states16:24
udonogadaga: and everything missing is a user problem16:24
gadagaudono: iso 4217 is only for currencies16:27
udonogadaga: ok, than we use currencies from iso16:28
gadagabch`: I found currency symbol in unicode for iso 4217 codes ;)16:31
bch`﷼ ₦ ₮ ден :)16:33
gadagaPhp <- great symbol for pesos ;)16:37
nicoebch, udono I just commited support for text:placeholder and an example of a ConTeXt template18:08
udononicoe: we can parse latex?18:15
nicoenot LaTeX, ConTeXt ...18:15
udononicoe: ok, I thought it is similar18:16
nicoeBertrand told me it was a better replacement if all you want is generating pdfs18:16
nicoeIt has been ages since I have done any LaTeX so, I could not really tell what are the differences (although creating tables was way more easy in LaTeX I think)18:17
udono nicoe: I am quite experienced in latex, but latex lacks of page control and summarizing in tables. Nearly impossible to make subtotals on page end and sum carried forward to the next page. But for ODT I have a solution for this...18:35
nicoeudono: This plugin is there so that people can do other stuff with relatorio than our needs.18:38
nicoeudono: The next plugin I would like to create is one outputting a graph from a set of data.18:38
udononicoe: Is it possible to parse simple text files with this plugin?18:38
nicoeudono: Not with this plugin but with genshi's TextTemplate it is18:39
nicoeI should add simple example of those too.18:40
udononicoe: because I have simple POS printer in the eye, they just understand text files 40 colums...18:40
udononicoe: what about the graph, is it openoffice based?18:41
nicoeI'll create an example for you of a textemplate18:41
nicoeudono: don't know yet18:41
nicoeudono: I was thinking about gnuplot18:41
udononicoe: ah ok, sounds interesting18:42
nicoeOr maybe another python library outputting svg (yet to be found)18:42
udononicoe: did relatorio even connect to the other software and takes controll over the generation process, too?18:43
udononicoe: or just generating the documents for other software?18:44
nicoeudono: for context I use the subprocess module to launch the required command and the I read the resulting file18:47
udononicoe: ok, it seems better to divide the parsing and the handling into parts18:57
nicoeThis is genshi principles: A template generates a stream of events that are then serialized by another object.18:58
nicoefor ConTeXt, the template is just a simple TextTemplate but the serializer do the call to the command18:59
-!- kultviech( has left #tryton20:22
-!- FWiesing(n=Wiesinge@ has left #tryton20:55
-!- udono( has joined #tryton21:28
-!- Timitos(n=Timitos@ has joined #tryton21:37
-!- udono( has left #tryton22:18
CIA-54tryton: htgoebel roundup * #232/Improvement of condition syntax: Why not use normal python expressions here? The example in msg893 is not readable anymore. Python already includes a parser, implementing a walke ...22:51
-!- kultviech( has joined #tryton23:30
-!- kultviech( has left #tryton23:33

Generated by 2.11.0 by Marius Gedminas - find it at!