IRC logs of #tryton for Wednesday, 2010-12-01

chat.freenode.net #tryton log beginning Wed Dec 1 00:00:02 CET 2010
-!- ikks(~ikks@190.158.122.179) has joined #tryton01:38
-!- cheche(cheche@188.85.213.151) has joined #tryton01:50
-!- gremly(~gremly@190.26.156.189) has joined #tryton03:30
-!- rednul_(~rednul@host-174-45-250-246.bln-mt.client.bresnan.net) has joined #tryton05:14
-!- yangoon(~mathiasb@p549F703C.dip.t-dialin.net) has joined #tryton05:20
-!- mhi(~mhi@pd95b104a.dip0.t-ipconnect.de) has joined #tryton05:23
-!- rednul_(~rednul@host-174-45-250-246.bln-mt.client.bresnan.net) has joined #tryton07:02
-!- trifon(~trifon@91-67-144-158-dynip.superkabel.de) has joined #tryton07:54
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton08:16
-!- trifon(~trifon@91-67-144-158-dynip.superkabel.de) has joined #tryton08:18
-!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton08:27
-!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton09:01
-!- lem0na(~lem0na@84.40.71.19) has joined #tryton09:13
-!- lem0na(~lem0na@84.40.71.19) has joined #tryton09:27
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:33
-!- pjstevns(~pjstevns@helpoort.xs4all.nl) has joined #tryton09:35
-!- bechamel(~user@cismwks02-virtual1.cism.ucl.ac.be) has joined #tryton09:38
-!- GasbaKid(~GasbaKid@41.96.40.183) has joined #tryton09:45
-!- vincentvdl(~vincent@62.58.29.41) has joined #tryton10:34
-!- vincentvdl(~vincent@62.58.29.41) has left #tryton10:37
-!- vincentvdl(~vincent@62.58.29.41) has joined #tryton10:37
-!- GasbaKid(~GasbaKid@41.96.40.183) has joined #tryton11:27
-!- ikks(~ikks@190.158.122.179) has joined #tryton11:40
-!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton12:32
-!- lem0na(~lem0na@84.40.71.19) has joined #tryton12:53
-!- vincentvdl(~vincent@62.58.29.41) has joined #tryton13:06
-!- gremly(~gremly@200.106.202.91) has joined #tryton15:04
-!- trifon(~trifon@p4FFB8893.dip0.t-ipconnect.de) has joined #tryton15:45
-!- pepeu(~manuel@201.155.193.192) has joined #tryton15:58
-!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton16:40
-!- GasbaKid(~GasbaKid@41.96.112.70) has joined #tryton17:06
-!- vladimir_(~vladimir@213.151.246.136) has joined #tryton17:16
-!- irclog(~irclog@tycho.b2ck.com) has joined #tryton17:36
-!- vincentvdl(~vincent@62.58.29.41) has left #tryton18:05
-!- paepke(~paepke@p4FEB1F44.dip0.t-ipconnect.de) has joined #tryton18:10
-!- paepke(~paepke@p4FEB0434.dip0.t-ipconnect.de) has joined #tryton18:47
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton19:02
-!- zvart(9f797202@gateway/web/freenode/ip.159.121.114.2) has joined #tryton19:08
-!- zvart(9f797202@gateway/web/freenode/ip.159.121.114.2) has left #tryton19:14
plantianIn order to use hgnested with hg I need to have the extension set in some hgrc file right ?19:27
-!- pjstevns(~pjstevns@helpoort.xs4all.nl) has joined #tryton19:34
plantianI figured it out, needed to put extension in home hgrc and downgrade mercurial.19:54
-!- trifon(~trifon@91-67-144-158-dynip.superkabel.de) has joined #tryton19:57
-!- chrue(~chrue@host-091-097-034-094.ewe-ip-backbone.de) has joined #tryton20:06
-!- enlightx(~enlightx@dynamic-adsl-94-34-210-185.clienti.tiscali.it) has joined #tryton20:24
-!- vladimir_(~vladimir@213.151.246.136) has joined #tryton21:02
plantianIs the Transaction part of 1.6 or 1.8 ?21:04
cedkplantian: 1.821:28
plantianCool thanks.  The last python example seems like it should be locals().get('context', {}).get('company', 0).  http://doc.tryton.org/1.6/trytond/doc/topics/pyson.html21:31
cedkplantian: if context  is in locals then you can get it directly21:32
plantianif it is not though the statement will return False instead of 0 like it should21:33
plantianwhere 0 is the default of the second get21:33
cedkplantian: yes21:34
cedkplantian: fixed21:36
plantianAre python tuples/lists/dictionaries allowed such as --  PYSON, such as In(Eval('state'), ('A', 'B', 'C')) ?  Seems like it should be fine.21:37
cedkplantian: only dict or list21:38
plantianOkay, maybe there should be a note about that?  I was going to use tuple.21:38
plantianAlso if Eval('state') is used but state is not defined what happens?21:39
cedkplantian: it will be the default value of Eval21:40
cedkplantian: if you use tuple you will have an exception that will be raised21:41
plantianWeird, Eval has a default... default ?21:42
cedkplantian: yes it is ''21:42
plantianIf only I was here when that was decided.  That's what I get for relaxing my involvement in the mailing list I guess.21:43
plantianI think it should be an error if no default is provided.21:43
cedkplantian: I don't see why21:43
plantianIt makes debugging difficult when typos are made or unexpected conditions are met.  Php and JavaScript both suffer from that issue.21:45
cedkplantian: there is cases where the field will not be there21:46
plantianYes, in those cases the developer should expect it in advance and set an explicit default.  That's just been a better approach in my experience but maybe you have had a different experience.21:47
cedkplantian: PYSON will be evaluated on the client, it should never fail21:48
plantianCases where the eval target is missing should be handled with explicit defaults or proper defaults provided by the calling code I would think.  I understand that it should never fail, but it doesn't help people if its not working correctly because of a typo but there is not way for a developer to know until readonly content has been updated over time which finally reveals the mistake.21:52
cedkplantian: we decided to never have exception in pyson evaluation because its usage is for GUI21:54
cedkplantian: and also we must know what is the expected type of value return by the eval for that we need to have a default value21:55
plantianOther programming failures cause error in gui though that lie in pure python, I don't understand why its different.21:55
cedkplantian: because it is a statement that can be evaluated in many environement so we can not assume that we will have everything21:56
plantianHaving a default is fine, I meant having an implicit default I think is a bad idea.  Maybe that wasn't clear.21:56
plantianEval('state') --> '' (implicit) Eval('state', '') --> explicit21:56
cedkplantian: so I don't see the issue21:56
plantianoops I mean Eval('state') --> '' (implicit) Eval('state', '') --> '' (explicit)21:56
cedkplantian: having the default explicit doesn't help for typo21:58
plantianYeah but since most of the time there will not be a default it will catch common programming errors.21:59
plantianIf you don't think its a big deal then that's fine, you have more experience than I do, I was just pointing out a possible future problem.21:59
cedkplantian: most of the time the default will be ''21:59
plantianAre there cases where state is not defined ?22:00
cedkplantian: I never got this kind of issue for now22:00
cedkplantian: I don't know it is possible22:00
plantianSeems like it is impossible on most models since its a Selection field.22:04
plantianAnyways, it doesn't matter, thanks for help with PYSON, I have another question: Is this syntax correct, will the format be interpolated from xml before the pyson is evaluated?  http://paste.pocoo.org/show/298665/22:05
plantianActually nevermind, I think I can just get an example from the stock module.22:06
cedkplantian: looks good22:07
plantianI think I have extra quotes around %(stock.group_id)d though.22:07
plantianoh wait man22:08
plantianhttp://paste.pocoo.org/show/298672/22:08
plantianWas missing rest of example.22:08
cedkplantian: I don't understand why you put eval arround "%(stock.group_stock)d"22:13
plantiancedk:  You are right. I don't think I need that.22:14
-!- GasbaKid(~GasbaKid@41.96.112.70) has joined #tryton22:19
cedkI got a patch to review for hgnested on mercurial 1.7 http://codereview.appspot.com/338104122:30

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!