IRC logs of #tryton for Wednesday, 2008-07-16 #tryton log beginning Wed Jul 16 00:00:02 CEST 2008
-!- bechamel( has joined #tryton00:26
-!- yangoon1( has joined #tryton05:19
-!- markusleist( has joined #tryton07:59
-!- Gedd(n=ged@ has joined #tryton08:12
-!- FWiesing(n=FWiesing@ has left #tryton09:42
-!- cedk(n=ced@gentoo/developer/cedk) has joined #tryton09:42
-!- FWiesing(n=FWiesing@ has joined #tryton10:07
-!- bechamel( has joined #tryton10:34
-!- markusleist(n=markus@ has joined #tryton10:35
udonocedk: I like to create a patch for the login dialog, but I cant get it complete. Its a patch upon my last submitted one in roundup... Is it enough for you?10:50
cedkudono: what is the problem10:52
udonocedk: I examiated the new patch, but there is missing the removement of the glade things Ive already done before my first commit.10:53
udonocedk: I thing its a lag in understanding hg?!10:53
cedkudono: you must create a bundle
udonocedk: ok, I take a look10:54
cedkguys don't forget to update your mercurial:
udonocedk: ok, I got it done with bundle, but now i have some changes I didnt done myself... but Ive done a pull and update before... strange11:09
cedkudono: I don't think it will be a problems11:10
udonocedk: ok11:10
cedkudono: you run wich command ?11:11
udonohg bundle glade2gtk-0.2.patch
cedkudono: it must be ok, but it is more common to use the .hg extension11:13
udonook, I do11:13
-!- nicoe(n=nicoe@ has joined #tryton11:18
udononicoe: hello11:26
cedkbechamel: to use relatorio, we need to work with unicode string instead of str11:35
cedkbechamel: what do you think about that ?11:35
bechamelcedk: it's a big modification ?11:35
cedkbechamel: not really but it can generate many little errors with the client11:37
cedkbechamel: as we must be sure that the client will send unicode string11:37
nicoecedk: you could also include an 'Encoding' header and decode all the strings with this encoding.11:38
bechamelcedk: and what's happen when you use non-unicode with relatorio ? an exception ?11:39
cedknicoe: where ?11:39
cedkbechamel: yes when the parser of genshi replace the value of the browse record and put it in the xml, there is a convertion error for non-ascii value11:40
nicoecedk: I'll take a look at your source ...11:41
cedknicoe: we have hand on both client/server so we just have to fix the encoding for both, and it is done11:42
nicoecedk: You have to carefully choose the encoding used by both the client and the server because a chines might use 'kio-whatever' and you will use 'utf-8' the server must know this if you pass str string in the pipe11:43
nicoecedk: with the socket connection there does not seems to be a problem since you are using a pickle11:45
nicoecedk: But to convert in unicode you have to know the encoding of the 'str' objects11:45
cedknicoe: yes, of course use unicode everywhere will simplify as we will no more need to convert string11:46
nicoecedk: Indeed11:47
cedkbechamel: make psycopg2 return unicode instead of str, it is just one line of code11:49
nicoecedk: you will patch psycopg ?11:49
cedkbechamel: but we must check everywhere we use str() to convert things11:49
cedknicoe: no, it is just a register to call11:50
cedknicoe: psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)11:50
bechamelcedk: yes, and also isinstance(x,str)11:50
nicoecedk: OK.11:52
bechamelcedk: ack-grep --py "str\b"|wc  returns 191 lines :)11:52
nicoekinder:../trytond|hg:default|trytond % rgrep "\bstr(" . | wc -l           #703411:53
nicoebechamel: but ack returns more row than necessary11:53
nicoebechamel: I use it also ;)11:53
bechamelnicoe: not when you pipe the result11:54
bechamelnicoe: but my regexp return more lines11:55
nicoebechamel: because there is also things like "writestr("11:55
bechamelnicoe: yes11:56
-!- nicoe(n=nicoe@ has left #tryton11:57
-!- nicoe(n=nicoe@ has joined #tryton11:57
-!- nicoe(n=nicoe@ has joined #tryton11:57
cedkbechamel: so are we going to unicode ?11:59
bechamelcedk: is this modification gonna improve other parts ? i mean if genshi choose to use unicode it's because they saw an advantage to do it.12:03
cedkbechamel: it will become the standard in python 300012:04
cedkbechamel: it doesn't need to know the str encoding12:04
cedkbechamel: because if you write xml, you must know the encoding so using unicode you know the encoding12:05
bechamel cedk: ok, so let's go for it12:05
cedkbechamel: and in fact, psycopg2 need to have unicode for the queries12:05
udonoHow can I change the Border of Buttons in py-gtk. If you use Keyboard for navigation, there are only Entry boxes shown as "active", but when I use tabulator key to move to open or close button, I loose visual response where the keyboard focus is. Any help?12:12
udonosorry it doesnt depend to the Border of Buttons... but the rest of my question remains...12:12
cedkudono: what do you mean by Keyboard for navigation ?12:14
udonousing Tabulator Key12:14
cedkudono: so I don't understand you question as you say that with keyboard navigation there is only the entry that is focused but with tab you can focus on button also ?12:15
udonocedk: Yes, i can focus on button, but Its not shown by the-little-blue-border where I can see which widget has focus12:16
cedkudono: how do you construct the button ?12:18
udonocedk: Just open loginwindow, press tab, than you are on the "close Button" but its not 'highlighted'...12:23
cedkudono: remove all the set_flags and set_focus_on_click12:25
cedkudono: it is default value12:25
cedkudono: and I think if you want to use it you must call it once with set_flags(gtk.CAN_FOCUS|gtk.CAN_DEFAULT|gtk.HAS_DEFAULT)12:26
udonocedk: Its the same, I pasted...12:27
cedkudono: we use everywhere just the default value for button and you can have focus on it12:28
udonocedk: did you try it in the login Dialog?12:29
cedkbechamel: one more things, it is that gtk use unicode everywhere but when you retreive data from entry by example you get a str12:29
udonocedk: Just open loginwindow, press tab, than you are on the "close Button" but its not 'highlighted'...12:30
-!- FWiesing(n=FWiesing@ has left #tryton12:30
cedkudono: yes but for me focus on button, it is just a little rectangle dotted12:30
udonocedk: strange in an old Version I have the same dotted rectangle... but with pygtk I cant get it...12:35
udonocedk: do you have a blue border right and left of an entry box, when it is focused?12:39
cedkudono: no12:43
udonocedk: ... iam getting closer. Its just happening in all pygtk widgets. The glade widgets are ok. If you provocate an error, than you can see this misbehavior. (Use strg-Tab to come out of the Textfield)12:43
cedkudono: I don't understand what about you are talking12:44
udonocedk: :-)12:44
cedkudono: is the button or the netry widget ?12:44
cedkudono: I think your blue border come from your theme12:45
udonocedk: both are shown different in pygtk and glade12:45
cedkudono: send screenshot of what you want and what it is displayed12:45
udonocedk: ok, I think you are right with the theme, since I use KDE, there could be some problems for gtk... I will check12:48
cedkudono: but having different display between gtk and glade, is not really a problems.12:49
cedkudono: what we need is pygtk with good behavior12:50
udonocedk: you are right, I get it the dumb KDE people just use silly themes for gtk which doesnt display right...12:50
udonocedk: I thought first I have to eneable something to get this focus highlight, but its working out of the box.12:51
cedkudono: perhaps kde people have patches glade but not pygtk12:53
udonocedk: no, they just have two themes for gtk inside qt: qt and raleigh. Raleigh is working, qt is not working properly12:54
udonocedk: it doesnt depend on my thought of glade and pygtk. If I change the theme, everything works like expected12:55
cedkudono: ok so no problems13:09
udonocedk: no problem :-) sorry for disturbing... and thanks for testing.13:10
cedknicoe: how do you think about translation of reports with relatorio ?13:18
cedknicoe: I think we can add an _handle_text in odt template and pass dict for translation ?13:21
cedknicoe: ok I find that I can use a genshi Translator13:29
cedknicoe: but I need to be able to add it to the odt template13:29
cedknicoe: but the problem is that is instantiate on the call of Report so I don't have access to it13:30
cedknicoe: we can load it on the init or add a params to be able to insert filter in the odt template13:31
cedknicoe: otherwise I succeed to convert the purchase report13:32
nicoeACTION is back from lunch13:50
nicoecedk: good news for the translation13:50
nicoecedk: I'd like to keep the same signature as the genshi template13:51
nicoecedk: I'll take a look at it13:51
CIA-53tryton: Bertrand Chenal <> default * 135:a7e19b5e689f account/ Fix: missing AND in sql clause13:56
CIA-53tryton: udono roundup * #176/Moving glade to pygtk: Final: Moving login dialog from glade to pygtk Including cedks comments. Code Cleanup. accesskeys for c_onnect and c_hange14:06
nicoecedk: If generate returned a stream of event instead of an already available odt file you could apply to it your translator14:07
cedknicoe: I don't understand14:08
cedknicoe: I need to run self.content_template.insert(0, translator) in the odt Template14:09
cedknicoe: but the Template is instanciate only in __call__ of Report14:10
cedknicoe: so I can not have access to it14:10
cedknicoe: or I by pass the Report class14:11
nicoecedk: it is one way to do it. another way would be to use the translator on the framework side and render it there.14:11
cedknicoe: I find not really efficient to parse twice the xml of the report14:12
cedknicoe: and genshi can make the job14:12
cedknicoe: all it needs is to be able to add filters to the template14:13
nicoecedk: You do not have to parse it twice if you're using stream14:13
cedknicoe: I think it can be usefull for other things14:13
cedknicoe: what do you mean by stream, the lxml tree ?14:14
nicoecedk: I'm abusing the *generate()* method from genshi to produce the odt file.14:15
-!- kultviech( has joined #tryton15:34
CIA-53tryton: uspallek@bart.dsl default * 517:187d3f527142 tryton/ (share/tryton/ tryton/gui/
CIA-53tryton: Moving win_login and win_server to pygtk.15:48
CIA-53tryton: Cleanup code.15:48
CIA-53tryton: Adding accesskey to C_hange and C_onnect.15:48
CIA-53tryton: C?dric Krier <> default * 518:2277bdcd399f tryton/tryton/gui/
CIA-53tryton: Remove unused set_transient_for15:48
CIA-53tryton: Remove default value for parent in DBLogin15:48
CIA-53tryton: Add icon on connect button15:48
CIA-53tryton: Improve table Expand15:48
cedkudono: I applied your patch15:49
udonocedk: Thanks15:49
cedkudono: I make some improvement15:49
cedkudono: now we can split the main.py15:49
udonocedk: ok in which parts?15:49
cedkudono: I propose to do it15:50
cedkudono: I will create a, etc ..15:50
udonocedk: ah, yes, I understand. Great decision15:51
udonocedk: next week I will go further with glade2pygtk15:51
udonocedk: which module next?15:51
cedkudono: don't know yet15:53
udonocedk: database?15:54
-!- FWiesing(n=FWiesing@ has joined #tryton16:02
cedkudono: yes I think it is the same kind16:04
udonocedk: I think so, too. I take first some smaller ones, then the main window. If there are some minor Dialogs missing fr the release, there is no problem for me if they cant be translated...16:06
CIA-53tryton: C?dric Krier <> default * 519:bb0df46d7632 tryton/tryton/ (6 files in 3 dirs): Factorize main and add some new window16:29
cedkudono: this is the begining16:29
cedkudono: I think we can also create DBDrop, DBBackup, etc ...16:30
cedkudono: that are enterely in the Main object16:30
cedkudono: but it can be done when converting it to pygtk16:30
cedkudono: so I think with that you can work on DB dialog stuff16:31
CIA-53tryton: ced roundup * #176/Moving glade to pygtk: Applied16:32
udonocedk: yes, this looks good17:01
udonocedk: any news about the sales module?17:01
cedkbechamel: I just finish my test to integrate relatorio in tryton without loose functionality17:55
cedkbechamel: it mess just two things that nicoe will fix17:55
cedkbechamel: after that we can go for it17:55
udononicoe: is it possible to 'parse' ods files with relatorio17:55
bechamelcedk: ok17:56
cedkfor those who want to see how looks report with relatorio:
cedkthis is the purchase17:57
cedkone things that I was able to add, it is to use a different style for title purchase line17:58
cedkit is a little bit more verbose than the previous17:59
CIA-53tryton: C?dric Krier <> default * 61:b2c0058fec7a product/ Add translate on name and symbol of uom18:08
-!- nicoe(n=nicoe@ has left #tryton18:09
udonoGedd: you are from openhex?18:14
Geddyes, why?18:14
cedkGedd: I tell to udono about the relatorio stuff etc ...18:15
Geddah ok...18:15
udonoGedd: Just a question, is it possible to use relatio for ods and the other document types of open office?18:15
cedkudono: did you have already some spec about the file format ?18:16
GeddThis is nicoe ... I got disconnected and did not take the time to check what was wrong with madwifi18:17
Geddrelatorio is manipulating the xml tree from the files to add genshi directives (
udonoGedd: ok, than it should be no problem18:18
GeddSo in fact yes you could use relatorio to create simple ods file18:18
GeddBut there is probably some subtilities in ods file that are not yet taken into account18:19
GeddIt is on my schedule to test it and fix the bugs I'll found ...18:20
udonocedk: yes, ods works a bit different, I will write it together next week. This Week Iam struggling with Plone...18:20
udonoGedd: Ok.18:21
cedkudono: ok, you can use the wiki or send to the google groups18:22
udonocedk: Ai Ai, Sir18:22
cedkGedd: I don't know if you have subscribe to the google groups18:24
GeddACTION is back as himself18:25
cedkGedd: can you ask to nicoe if he receive my last comment in private chat ?18:27
CIA-53tryton: Bertrand Chenal <> default * 136:635a69de42f8 account/ Added kind field when accounts are created from templates.18:37
Geddcedk: quel commentaire?18:39
CIA-53tryton: C?dric Krier <> default * 24:98276f895080 gentoo-overlay/dev-python/Babel/ (Babel-0.9.2.ebuild Manifest): In portage now19:15
-!- irclog( has joined #tryton20:24
-!- bechamel( has joined #tryton20:35
cedkudono: do you see
bechamelcedk, udono : on a legal point of view, is historical data mandatory ? or the solution of storing the pdf sufficient ?21:00
udonobechamel: mandatory21:00
udonobechamel: storing the pdf is mandatory, too21:01
udonobechamel: in Germany, Austria, Swiss, Netherlands, USA I know its mandatory21:02
bechameludono: maybe it's mandatory for "financial forensic" stuff21:02
udonobechamel: of course. In germany they plug into your accounting system and check it via software...21:03
udonobechamel: we (the germans of us) need to implement an interface for this...21:04
udono... into tryton21:04
bechameludono: you talk about a user interface or a comunication interface (for another software) ?21:07
udonojust a communication interface. They want a special XML export, burned on serveral CDs...21:08
bechameludono: several cd ... :p21:08
udonobechamel: yes, if you have some more data... the government somtimes like to have the last fife years data...21:09
bechamelto talk about something completely different, postgres-r has been open-sourced, it's a db replication extension:
-!- nicoe( has joined #tryton21:40
CIA-53tryton: udono roundup * #177/IRC Log: possible to set anchors for each Date:time, for better Referencing IRC discussions: [new] is it possible to set anchors for each Date:time in Tryton IRC log, for better referencing IRC discussions?22:24
FWiesingudono: in Austria it is law to have the last seven years!22:49
udonoFWiesing: in Germany its ten years22:49
CIA-53tryton: ced roundup * #177/IRC Log: possible to set anchors for each Date:time, for better Referencing IRC discussions: [resolved] Done23:34
cedkudono: is it possible to have the template of the xml that is needed for german law?23:35
nicoecedk: The filters are working now (and they have been working for hours it was my example that was not good even on 'normal' streams)23:42
nicoecedk: I will now work on the style thing23:42
cedknicoe: ok I check23:43
nicoecedk: It's not commited yet23:43
cedknicoe: for styles.xml, I think that you just need to do the same as for content.xml23:44
cedknicoe: ok I wait :-(23:44
nicoecedk: Got to clean my mess first, add some tests and it will be ready23:44
nicoecedk: for the styles.xml. Well, it is a bit more complicated since you want to also use filters on them23:45
nicoecedk: Well, even if you don't I want it :)23:46
nicoecedk: So I have to mark the start of the style Stream and the start of the content Stream before I apply the filters ...23:47
cedknicoe: yes it will be a good things but for tryton it is not yet mandatory23:47
cedknicoe: you will parse the both in one way?23:47
cedknicoe: for me it can be done separatly23:48
udonocedk: yes:
nicoecedk: I was doing to do it that way yes23:48
udonocedk: but its in german language...23:48
cedkudono: ok, it is an xml file that describe a csv file23:53
cedkudono: it doesn't describe what field is mandatory for invoice23:55
cedkudono: by the way, is the irclog looks better?23:56
udonoyes, its looking good, thank you. But you inserted id="datetime" for linking we need <a name="date_time"></a>23:57
udonocedk: then we can link to <a href=" 10:24">linktext</a>23:59

Generated by 2.11.0 by Marius Gedminas - find it at!