IRC logs of #tryton for Sunday, 2011-06-26 #tryton log beginning Sun Jun 26 00:00:01 CEST 2011
jcmmy accountant should do it as soon as I have a working server... should be this week00:02
cedkjcm: ok00:02
jcmI modified the import script. Now passes, with simply a warning :00:02
jcm/home/tryton/tryton2.0/proteus/proteus/ UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal if previous != getattr(instance,
cedkjcm: it is just a warning00:04
cedkjcm: I guess there is a comparison between a str and None00:04
jcmseems this is not from import code; can it be a code line from proteus?00:05
cedkjcm: yes it is a line in proteus00:05
cedkjcm: it is a warning so the code runs anyway00:05
jcmis this pb linked with unicode string transition in 2.6 to 3 Python?00:06
cedkjcm: I think it is a warning added for this purpose00:07
-!- _stephane_(~stephane@ has joined #tryton00:08
cedkjcm: I think it should be fixed with this patch
jcmhow often should I do 'hg npull -u' on my prod server install ?00:12
jcmin fact, is it the right way to get the last corrections to the 2.0 branch ? I get many unresolved merges.00:17
jcmfound this command here:,_Server_and_Modules_Repositories00:17
cedkjcm: you can as we push only delayed fixes00:17
cedkjcm: but you should not have merge to do00:18
cedkjcm: did you modify the code?00:18
jcmI get 'use 'hg resolve' to retry unresolved file merges' and 5 unresolved files after the npull -u00:19
jcmno, I don't remember I changed files, except I added the custom modules with hg import --no-commit00:19
cedkjcm: npull with repository no cloned has a bug I think00:21
cedkjcm: you should perhaps add a default path in .hgrc of those repo00:21
jcmmaybe my install is broken: complains with 'couldn't find merge tool hgmerge'00:23
jcmduring hg npull -n00:23
cedkjcm: I don't use hgmerge00:25
-!- rhubner(~rhubner@ has joined #tryton04:23
-!- yangoon( has joined #tryton05:19
-!- alimon(~alimon@ has joined #tryton06:00
-!- rhubner(~rhubner@ has left #tryton07:17
-!- enlightx( has joined #tryton09:36
-!- paepke( has joined #tryton09:53
-!- nicoe( has joined #tryton09:57
-!- nicoe_( has joined #tryton10:03
-!- chrue( has joined #tryton10:04
-!- vladimirek( has joined #tryton10:14
-!- pjstevns( has joined #tryton10:54
-!- pjstevns( has left #tryton10:55
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton11:22
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton11:44
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton12:51
-!- chrue( has joined #tryton13:17
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton13:42
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton14:01
-!- sharkcz(~sharkcz@2001:15c0:6747:160::7) has joined #tryton14:38
-!- alimon(~alimon@ has joined #tryton16:51
-!- gremly(~gremly@ has joined #tryton17:59
-!- enlightx( has joined #tryton18:18
-!- zodman(~zodman@foresight/developer/zodman) has joined #tryton18:23
-!- pjstevns( has joined #tryton18:36
-!- pjstevns( has left #tryton18:36
-!- rhubner(~rhubner@ has joined #tryton19:00
rhubnerHi cedk!19:01
rhubnercedk: I saw your comments in codereview...19:02
cedkrhubner: yep19:02
rhubnercedk: I didn't understand some parts...19:03
rhubnercedk: for example, in line 500 you added the comment: "doesn't seem to be used"19:04
rhubnercedk: do you think is better a method for each feature? (bold, italic and underline)19:05
cedkrhubner: I just mean I did not find any place where it is called19:10
rhubnercedk: Is calling on the lines where the connections happen (line 143 to 154)19:12
rhubnercedk: self.action_style_font change bold, italic and underline styles19:14
cedkrhubner: ok it is because the line is cut in codereview so search doesn't find it19:14
rhubnercedk: yes... I follow the advice of Udo19:15
rhubnercedk: I'll try to change every lines to width 80 chars19:15
cedkrhubner: it is a requirement :-)19:16
rhubnercedk: Ok...19:17
cedkrhubner: it is important for readability19:19
cedkrhubner: we read more often the code than write it19:20
cedkso it is important that we can read it easily19:20
cedkrhubner: also do't hesistate to put comment and docstring19:21
cedkI know the client code is laking on this side19:21
rhubnercedk: I will19:21
rhubnercedk: Do you know how do I resize a figure in gtk.ToggleToolButton?19:23
cedkrhubner: you mean the icon?19:23
rhubnercedk: I had to add a gtk.ToolItem and after add gtk.ToggleButton in it to change size of button19:24
rhubnercedk: yes19:24
rhubnercedk: After that I do it the TootleButtons becomes "dark"19:25
cedkrhubner: I don't understand19:27
rhubnercedk: for example, in the line 52-57 I did this with bold button... Before i did a bold ToogltButton with 1 line and the button on the interface was clear19:28
rhubnercedk: Now I had to add all of this lines just to reduce the size of the button with set_image and the button went dark...19:30
rhubnercedk: did you understand?19:30
rhubnercedk: the background of button are dark... the gtk.ToolItem causes this.19:32
cedkrhubner: I think you must use ToggleToolButton19:34
rhubnercedk: I wanted to put gtk.ToggleToolButton again, but I can't shrink the image there ...19:34
rhubnercedk: but I can't decrease the size of images in ToggleToolButton... Do you know how?19:36
cedkrhubner: you must let the theme choose the size19:36
rhubnercedk: Hmmm ... It is currently big as early in the prototype19:38
cedkrhubner: I think you must create a ToggleToolButton (without icon)19:44
cedkrhubner: create an image with the icon19:44
cedkrhubner: and add the image to the button with set_icon_widget19:44
rhubnercedk: Ok.. I'll try this19:48
rhubnercedk: you said at line 45 to reuse TextBox widgets.... Bu if I'm rewriting the __init__ method do I also need replace the TextView widget?19:52
rhubnercedk: I think the next work week is just to fix bugs... hehehe20:07
rhubner... and improve the code!20:07
rhubnercedk: "there is a lot of states stored on the widget object". Is it about what for example?20:13
cedkrhubner: when you use self."something" to store value20:19
rhubnercedk: Sorry.. I also didn't understand...20:20
cedkrhubner: in many places you store value in the object20:21
rhubnercedk: In method self.action_style_font for example?20:24
cedkrhubner: yes20:25
rhubnercedk: tell me a piece of code for me to understand please20:25
cedkrhubner: line 50920:25
rhubnercedk: Doyou think better to make each feature (bold, italic, underline) on a different method?20:27
-!- elbenfreund( has joined #tryton20:29
cedkrhubner: no20:29
rhubnercedk: will be hard not to use self.bold_start variables such as, because I use it in different methods. I think I can destroy it at some points using del(), thus reducing the side effects...20:37
rhubnercedk: What do you think to reduce this points?20:38
rhubnercedk: when you said "...This could also be factorized for all tags.." I don't see other way than to overload the objects in the method...20:42
cedkrhubner: storing information this way, I'm pretty sure that it will generate bugs20:46
cedkrhubner: I don't understand what you mean by "overload the objects"20:46
rhubnercedk: it's mean stored the same object several times...20:50
cedkrhubner: I don't understand about what you are talking20:52
rhubnercedk: for example, in the line 231, 334, ... you said "Could be factorized with other tags". How do must I do this?20:54
cedkrhubner: from 230-255, you can see you are doing almost the same thing multiple times20:55
rhubnercedk: I think I'll have to do things like on line 509, i.e. stored an object several times...20:55
cedkrhubner: no line 509 is bad20:56
rhubnercedk: what is the best way then? I really don't know...20:57
cedkrhubner: nor me20:57
cedkrhubner: what represent the field bold_start ?20:57
rhubnercedk: this is the start of bold tag mark20:59
cedkrhubner: which tag?20:59
-!- elbenfreund( has joined #tryton21:01
rhubnercedk: 'weight' tag, defined on line 12721:02
cedkrhubner: I think the value stored doesn't work if you move the cursor by clicking somewhere else21:02
cedkrhubner: do you see the issue, you store in the object some kind of value that depend of the position of the cursor in the text21:03
rhubnercedk: the bold_star is used on persist_style when you click in somewhere else...21:04
cedkrhubner: persist_style is only called when you insert text21:05
rhubnercedk: yes21:05
-!- elbenfreund( has joined #tryton21:06
rhubnerand detect_style when you click ... sorry I missed21:06
rhubnercedk: but, what is the problem?21:07
rhubnercedk: if I don't use self.bold_start in persist_style and keep writing, bold style will not persist!21:10
cedkrhubner: on insert text, you should just look if the bold button is pressed or not to see if you need to set bold style21:12
rhubnercedk: I'll try to improve it then... But it will be a difficult task :/21:17
rhubnercedk: but I think it'll be even better21:18
cedkrhubner: GTK programming is about event so you must try to avoid any state storage21:18
cedkrhubner: for example, the insert-text callback give you the position of the cursor as argument and not as a property of the widget21:19
rhubnercedk: uhum21:21
rhubnercedk: do you think is necessary the method detect style yet?21:22
cedkrhubner: don't understand21:22
rhubnercedk: I did it because when the user clicks on different parts of the text, you can determine which styles are in every part...21:25
cedkrhubner: but what is the question21:27
rhubnercedk: I don't know how I'm going to change the method persist_style21:29
rhubnercedk: instead of applied "try..except" on self.bold_start do I have to verify if the bold button is active or no?21:31
cedkrhubner: why not21:31
cedkrhubner: at least, it is what you expect as user when you type21:32
rhubnercedk: Ok... Several things to change :)21:35
rhubnercedk: do you think I'm in time with gsoc?21:36
cedkrhubner: I think21:37
cedkrhubner: you show that you are working, you provide codes etc.21:37
cedkrhubner: for me, this sounds good21:37
rhubnercedk: Ok! I'll try to fix all next week and then I continue the TODO list... Thank you21:40
-!- rhubner(~rhubner@ has left #tryton21:48
-!- ciupicri(~ciupicri@ has joined #tryton22:06
-!- gremly(~gremly@ has joined #tryton22:55
jcmcedk: hi! I cannot figure out how does carrier module works. Could you take some minutes to point me in the right dir plz ?23:00
jcmI don't find how the list (weight, price) should be attached to a shipping product23:00
jcmshould I add sale_price_list module and create a sale price list for each shipment product?23:04
cedkjcm: we said that the computation of the carrier price will be done with a further dev23:19
cedkjcm: because we don't know the rules of the carrier23:19
jcmso how can I test that the module work ? will it add the fixed price of the shipment product to the invoice?23:22
jcmis it a thing you will code later or should I do it?23:22
cedkjcm: yes the list price23:22
cedkjcm: but you can change the price on the shipment23:26
jcmshould I add a test "if carrier.carrier_cost == 'service':" in get_sale_price and, for instance, parse a yaml list of (weights, prices) placed in product description?23:26
cedkjcm: you said that first you did not want to compute it, but being able to enter it on shipment was enough23:26
jcmyes, it's equivalent to our current invoicing process, but we hope to make some automation thanks to tryton ;-)23:28
cedkjcm: the carrier_cost is there to define specific way to compute23:30
jcmin fact, I cannot see the Carrier administration, so I cannot edit the carrier_cost :/ I checked the carrier module is installed23:35
cedkjcm: you must be in the carrier admin group23:44
jcmisn't admin automatically in this group ?23:46
cedkjcm: yes23:48
jcmsry, it's an old base done before I installed the last update you made to carrier.23:48
jcmon a more recent one, it appears correctly.23:48
jcmstrange though, if I add later a new module like carrier, I won't see it in an existing base ??23:49
cedkjcm: I don't understand23:49
jcmI can see Carrier managment on a database I created yesterday,23:54
jcmon my debian server. But locally (MacOSX) with a database created before your last corrections to carrier module, I cannot see the menu for Carrier23:55
jcmThis behaviour is strange, if adding a new module needing a new user group denies access to the admin user...23:57
cedkjcm: if your database comes from previous change it is normal23:58
jcmis there a manual "update" to be done to old database after updating trytond code?23:59

Generated by 2.11.0 by Marius Gedminas - find it at!