IRC logs of #tryton for Sunday, 2011-06-26

chat.freenode.net #tryton log beginning Sun Jun 26 00:00:01 CEST 2011
2011-06-26 00:02 <jcm> my accountant should do it as soon as I have a working server... should be this week
2011-06-26 00:02 <cedk> jcm: ok
2011-06-26 00:02 <jcm> I modified the import script. Now passes, with simply a warning :
2011-06-26 00:02 <jcm> /home/tryton/tryton2.0/proteus/proteus/__init__.py:69: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal if previous != getattr(instance, self.name):
2011-06-26 00:04 <cedk> jcm: it is just a warning
2011-06-26 00:04 <cedk> jcm: I guess there is a comparison between a str and None
2011-06-26 00:05 <jcm> seems this is not from import code; can it be a code line from proteus?
2011-06-26 00:05 <cedk> jcm: yes it is a line in proteus
2011-06-26 00:05 <cedk> jcm: it is a warning so the code runs anyway
2011-06-26 00:06 <jcm> is this pb linked with unicode string transition in 2.6 to 3 Python?
2011-06-26 00:07 <cedk> jcm: I think it is a warning added for this purpose
2011-06-26 00:08 -!- _stephane_(~stephane@91.180.60.5) has joined #tryton
2011-06-26 00:08 <cedk> jcm: I think it should be fixed with this patch http://codereview.tryton.org/48005
2011-06-26 00:12 <jcm> how often should I do 'hg npull -u' on my prod server install ?
2011-06-26 00:17 <jcm> in fact, is it the right way to get the last corrections to the 2.0 branch ? I get many unresolved merges.
2011-06-26 00:17 <jcm> found this command here: http://code.google.com/p/tryton/wiki/InstallationMercurial#Updating_Client,_Server_and_Modules_Repositories
2011-06-26 00:17 <cedk> jcm: you can as we push only delayed fixes
2011-06-26 00:18 <cedk> jcm: but you should not have merge to do
2011-06-26 00:18 <cedk> jcm: did you modify the code?
2011-06-26 00:19 <jcm> I get 'use 'hg resolve' to retry unresolved file merges' and 5 unresolved files after the npull -u
2011-06-26 00:19 <jcm> no, I don't remember I changed files, except I added the custom modules with hg import --no-commit
2011-06-26 00:21 <cedk> jcm: npull with repository no cloned has a bug I think
2011-06-26 00:21 <cedk> jcm: you should perhaps add a default path in .hgrc of those repo
2011-06-26 00:23 <jcm> maybe my install is broken: complains with 'couldn't find merge tool hgmerge'
2011-06-26 00:23 <jcm> during hg npull -n
2011-06-26 00:25 <cedk> jcm: I don't use hgmerge
2011-06-26 04:23 -!- rhubner(~rhubner@187.112.227.253) has joined #tryton
2011-06-26 05:19 -!- yangoon(~mathiasb@p54B4F749.dip.t-dialin.net) has joined #tryton
2011-06-26 06:00 -!- alimon(~alimon@189.154.30.225) has joined #tryton
2011-06-26 07:17 -!- rhubner(~rhubner@187.112.227.253) has left #tryton
2011-06-26 09:36 -!- enlightx(~enlightx@dynamic-adsl-94-34-187-59.clienti.tiscali.it) has joined #tryton
2011-06-26 09:53 -!- paepke(~paepke@gate.paepke.net) has joined #tryton
2011-06-26 09:57 -!- nicoe(~nicoe@137.139-247-81.adsl-dyn.isp.belgacom.be) has joined #tryton
2011-06-26 10:03 -!- nicoe_(~nicoe@137.139-247-81.adsl-dyn.isp.belgacom.be) has joined #tryton
2011-06-26 10:04 -!- chrue(~chrue@host-091-097-064-136.ewe-ip-backbone.de) has joined #tryton
2011-06-26 10:14 -!- vladimirek(~vladimire@adsl-dyn24.78-98-14.t-com.sk) has joined #tryton
2011-06-26 10:54 -!- pjstevns(~pjstevns@helpoort.xs4all.nl) has joined #tryton
2011-06-26 10:55 -!- pjstevns(~pjstevns@helpoort.xs4all.nl) has left #tryton
2011-06-26 11:22 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2011-06-26 11:44 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2011-06-26 12:51 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2011-06-26 13:17 -!- chrue(~chrue@dyndsl-091-096-056-098.ewe-ip-backbone.de) has joined #tryton
2011-06-26 13:42 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2011-06-26 14:01 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2011-06-26 14:38 -!- sharkcz(~sharkcz@2001:15c0:6747:160::7) has joined #tryton
2011-06-26 16:51 -!- alimon(~alimon@189.154.30.225) has joined #tryton
2011-06-26 17:59 -!- gremly(~gremly@200.106.202.91) has joined #tryton
2011-06-26 18:18 -!- enlightx(~enlightx@dynamic-adsl-94-34-187-59.clienti.tiscali.it) has joined #tryton
2011-06-26 18:23 -!- zodman(~zodman@foresight/developer/zodman) has joined #tryton
2011-06-26 18:36 -!- pjstevns(~pjstevns@helpoort.xs4all.nl) has joined #tryton
2011-06-26 18:36 -!- pjstevns(~pjstevns@helpoort.xs4all.nl) has left #tryton
2011-06-26 19:00 -!- rhubner(~rhubner@187.112.227.253) has joined #tryton
2011-06-26 19:01 <rhubner> Hi cedk!
2011-06-26 19:02 <rhubner> cedk: I saw your comments in codereview...
2011-06-26 19:02 <cedk> rhubner: yep
2011-06-26 19:03 <rhubner> cedk: I didn't understand some parts...
2011-06-26 19:04 <rhubner> cedk: for example, in line 500 you added the comment: "doesn't seem to be used"
2011-06-26 19:05 <rhubner> cedk: do you think is better a method for each feature? (bold, italic and underline)
2011-06-26 19:10 <cedk> rhubner: I just mean I did not find any place where it is called
2011-06-26 19:12 <rhubner> cedk: Is calling on the lines where the connections happen (line 143 to 154)
2011-06-26 19:14 <rhubner> cedk: self.action_style_font change bold, italic and underline styles
2011-06-26 19:14 <cedk> rhubner: ok it is because the line is cut in codereview so search doesn't find it
2011-06-26 19:15 <rhubner> cedk: yes... I follow the advice of Udo
2011-06-26 19:15 <rhubner> cedk: I'll try to change every lines to width 80 chars
2011-06-26 19:16 <cedk> rhubner: it is a requirement :-)
2011-06-26 19:17 <rhubner> cedk: Ok...
2011-06-26 19:19 <cedk> rhubner: it is important for readability
2011-06-26 19:20 <cedk> rhubner: we read more often the code than write it
2011-06-26 19:20 <cedk> so it is important that we can read it easily
2011-06-26 19:20 <rhubner> right!
2011-06-26 19:21 <cedk> rhubner: also do't hesistate to put comment and docstring
2011-06-26 19:21 <cedk> I know the client code is laking on this side
2011-06-26 19:21 <rhubner> cedk: I will
2011-06-26 19:23 <rhubner> cedk: Do you know how do I resize a figure in gtk.ToggleToolButton?
2011-06-26 19:23 <cedk> rhubner: you mean the icon?
2011-06-26 19:24 <rhubner> cedk: I had to add a gtk.ToolItem and after add gtk.ToggleButton in it to change size of button
2011-06-26 19:24 <rhubner> cedk: yes
2011-06-26 19:25 <rhubner> cedk: After that I do it the TootleButtons becomes "dark"
2011-06-26 19:27 <cedk> rhubner: I don't understand
2011-06-26 19:28 <rhubner> cedk: 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 clear
2011-06-26 19:30 <rhubner> cedk: 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...
2011-06-26 19:30 <rhubner> cedk: did you understand?
2011-06-26 19:32 <rhubner> cedk: the background of button are dark... the gtk.ToolItem causes this.
2011-06-26 19:34 <cedk> rhubner: I think you must use ToggleToolButton
2011-06-26 19:34 <rhubner> cedk: I wanted to put gtk.ToggleToolButton again, but I can't shrink the image there ...
2011-06-26 19:36 <rhubner> cedk: but I can't decrease the size of images in ToggleToolButton... Do you know how?
2011-06-26 19:36 <cedk> rhubner: you must let the theme choose the size
2011-06-26 19:38 <rhubner> cedk: Hmmm ... It is currently big as early in the prototype
2011-06-26 19:44 <cedk> rhubner: I think you must create a ToggleToolButton (without icon)
2011-06-26 19:44 <cedk> rhubner: create an image with the icon
2011-06-26 19:44 <cedk> rhubner: and add the image to the button with set_icon_widget
2011-06-26 19:48 <rhubner> cedk: Ok.. I'll try this
2011-06-26 19:52 <rhubner> cedk: 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?
2011-06-26 20:07 <rhubner> cedk: I think the next work week is just to fix bugs... hehehe
2011-06-26 20:07 <rhubner> ... and improve the code!
2011-06-26 20:13 <rhubner> cedk: "there is a lot of states stored on the widget object". Is it about what for example?
2011-06-26 20:19 <cedk> rhubner: when you use self."something" to store value
2011-06-26 20:20 <rhubner> cedk: Sorry.. I also didn't understand...
2011-06-26 20:21 <cedk> rhubner: in many places you store value in the object
2011-06-26 20:24 <rhubner> cedk: In method self.action_style_font for example?
2011-06-26 20:25 <cedk> rhubner: yes
2011-06-26 20:25 <rhubner> cedk: tell me a piece of code for me to understand please
2011-06-26 20:25 <cedk> rhubner: line 509
2011-06-26 20:27 <rhubner> cedk: Doyou think better to make each feature (bold, italic, underline) on a different method?
2011-06-26 20:29 -!- elbenfreund(~elbenfreu@g227006045.adsl.alicedsl.de) has joined #tryton
2011-06-26 20:29 <cedk> rhubner: no
2011-06-26 20:37 <rhubner> cedk: 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...
2011-06-26 20:38 <rhubner> cedk: What do you think to reduce this points?
2011-06-26 20:42 <rhubner> cedk: 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...
2011-06-26 20:46 <cedk> rhubner: storing information this way, I'm pretty sure that it will generate bugs
2011-06-26 20:46 <cedk> rhubner: I don't understand what you mean by "overload the objects"
2011-06-26 20:50 <rhubner> cedk: it's mean stored the same object several times...
2011-06-26 20:52 <cedk> rhubner: I don't understand about what you are talking
2011-06-26 20:54 <rhubner> cedk: for example, in the line 231, 334, ... you said "Could be factorized with other tags". How do must I do this?
2011-06-26 20:55 <cedk> rhubner: from 230-255, you can see you are doing almost the same thing multiple times
2011-06-26 20:55 <rhubner> cedk: I think I'll have to do things like on line 509, i.e. stored an object several times...
2011-06-26 20:56 <cedk> rhubner: no line 509 is bad
2011-06-26 20:57 <rhubner> cedk: what is the best way then? I really don't know...
2011-06-26 20:57 <cedk> rhubner: nor me
2011-06-26 20:57 <cedk> rhubner: what represent the field bold_start ?
2011-06-26 20:59 <rhubner> cedk: this is the start of bold tag mark
2011-06-26 20:59 <cedk> rhubner: which tag?
2011-06-26 21:01 -!- elbenfreund(~elbenfreu@g227006045.adsl.alicedsl.de) has joined #tryton
2011-06-26 21:02 <rhubner> cedk: 'weight' tag, defined on line 127
2011-06-26 21:02 <cedk> rhubner: I think the value stored doesn't work if you move the cursor by clicking somewhere else
2011-06-26 21:03 <cedk> rhubner: do you see the issue, you store in the object some kind of value that depend of the position of the cursor in the text
2011-06-26 21:04 <rhubner> cedk: the bold_star is used on persist_style when you click in somewhere else...
2011-06-26 21:05 <cedk> rhubner: persist_style is only called when you insert text
2011-06-26 21:05 <rhubner> cedk: yes
2011-06-26 21:06 -!- elbenfreund(~elbenfreu@g227006045.adsl.alicedsl.de) has joined #tryton
2011-06-26 21:06 <rhubner> and detect_style when you click ... sorry I missed
2011-06-26 21:07 <rhubner> cedk: but, what is the problem?
2011-06-26 21:10 <rhubner> cedk: if I don't use self.bold_start in persist_style and keep writing, bold style will not persist!
2011-06-26 21:12 <cedk> rhubner: on insert text, you should just look if the bold button is pressed or not to see if you need to set bold style
2011-06-26 21:17 <rhubner> cedk: I'll try to improve it then... But it will be a difficult task :/
2011-06-26 21:18 <rhubner> cedk: but I think it'll be even better
2011-06-26 21:18 <cedk> rhubner: GTK programming is about event so you must try to avoid any state storage
2011-06-26 21:19 <cedk> rhubner: for example, the insert-text callback give you the position of the cursor as argument and not as a property of the widget
2011-06-26 21:21 <rhubner> cedk: uhum
2011-06-26 21:22 <rhubner> cedk: do you think is necessary the method detect style yet?
2011-06-26 21:22 <cedk> rhubner: don't understand
2011-06-26 21:25 <rhubner> cedk: I did it because when the user clicks on different parts of the text, you can determine which styles are in every part...
2011-06-26 21:27 <cedk> rhubner: but what is the question
2011-06-26 21:29 <rhubner> cedk: I don't know how I'm going to change the method persist_style
2011-06-26 21:31 <rhubner> cedk: instead of applied "try..except" on self.bold_start do I have to verify if the bold button is active or no?
2011-06-26 21:31 <cedk> rhubner: why not
2011-06-26 21:32 <cedk> rhubner: at least, it is what you expect as user when you type
2011-06-26 21:35 <rhubner> cedk: Ok... Several things to change :)
2011-06-26 21:36 <rhubner> cedk: do you think I'm in time with gsoc?
2011-06-26 21:37 <cedk> rhubner: I think
2011-06-26 21:37 <cedk> rhubner: you show that you are working, you provide codes etc.
2011-06-26 21:37 <cedk> rhubner: for me, this sounds good
2011-06-26 21:40 <rhubner> cedk: Ok! I'll try to fix all next week and then I continue the TODO list... Thank you
2011-06-26 21:48 -!- rhubner(~rhubner@187.112.227.253) has left #tryton
2011-06-26 22:06 -!- ciupicri(~ciupicri@81.180.234.249) has joined #tryton
2011-06-26 22:55 -!- gremly(~gremly@200.106.202.91) has joined #tryton
2011-06-26 23:00 <jcm> cedk: hi! I cannot figure out how does carrier module works. Could you take some minutes to point me in the right dir plz ?
2011-06-26 23:00 <jcm> I don't find how the list (weight, price) should be attached to a shipping product
2011-06-26 23:04 <jcm> should I add sale_price_list module and create a sale price list for each shipment product?
2011-06-26 23:19 <cedk> jcm: we said that the computation of the carrier price will be done with a further dev
2011-06-26 23:19 <cedk> jcm: because we don't know the rules of the carrier
2011-06-26 23:22 <jcm> so how can I test that the module work ? will it add the fixed price of the shipment product to the invoice?
2011-06-26 23:22 <jcm> is it a thing you will code later or should I do it?
2011-06-26 23:22 <cedk> jcm: yes the list price
2011-06-26 23:26 <cedk> jcm: but you can change the price on the shipment
2011-06-26 23:26 <jcm> should 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?
2011-06-26 23:26 <cedk> jcm: you said that first you did not want to compute it, but being able to enter it on shipment was enough
2011-06-26 23:28 <jcm> yes, it's equivalent to our current invoicing process, but we hope to make some automation thanks to tryton ;-)
2011-06-26 23:30 <cedk> jcm: the carrier_cost is there to define specific way to compute
2011-06-26 23:35 <jcm> in fact, I cannot see the Carrier administration, so I cannot edit the carrier_cost :/ I checked the carrier module is installed
2011-06-26 23:44 <cedk> jcm: you must be in the carrier admin group
2011-06-26 23:46 <jcm> isn't admin automatically in this group ?
2011-06-26 23:48 <cedk> jcm: yes
2011-06-26 23:48 <jcm> sry, it's an old base done before I installed the last update you made to carrier.
2011-06-26 23:48 <jcm> on a more recent one, it appears correctly.
2011-06-26 23:49 <jcm> strange though, if I add later a new module like carrier, I won't see it in an existing base ??
2011-06-26 23:49 <cedk> jcm: I don't understand
2011-06-26 23:54 <jcm> I can see Carrier managment on a database I created yesterday,
2011-06-26 23:55 <jcm> on my debian server. But locally (MacOSX) with a database created before your last corrections to carrier module, I cannot see the menu for Carrier
2011-06-26 23:57 <jcm> This behaviour is strange, if adding a new module needing a new user group denies access to the admin user...
2011-06-26 23:58 <cedk> jcm: if your database comes from previous change it is normal
2011-06-26 23:59 <jcm> is there a manual "update" to be done to old database after updating trytond code?

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!