IRC logs of #tryton for Thursday, 2011-11-03

chat.freenode.net #tryton log beginning Thu Nov 3 00:00:02 CET 2011
cedkcjbarnes18: no, but I'm not yet sure about the solution00:23
cedkcjbarnes18: I have asked to the mailing list00:24
cedkcjbarnes18: so let's see who others react00:24
cjbarnes18cedk: I am in two minds with the solution, would prefer to find where it gets added to the pool...00:25
cjbarnes18cedk: does the client start connection attempt as soon as create is started?00:26
cedkcjbarnes18: it is possble00:27
cjbarnes18cedk: guess I'll take a look see.00:28
cedkcjbarnes18: did you look at Pool.start00:28
cjbarnes18cedk: yes, if I read correctly it adds databases that are in the config.00:30
cjbarnes18other that that they are added on open or after create,  think I need to make a more thorough search.00:31
cedkcjbarnes18: I'm wondering if you could not use the Pool._locks to see if you can start the cron or not00:34
cjbarnes18cedk: hmm, I think I need to find where it is added to the pool 1st..00:37
cedkcjbarnes18: where what is added to the pool?00:40
cjbarnes18the new incomplete database.00:41
cedkcjbarnes18: in Pool.init00:43
cjbarnes18cedk: in the create process it is added after database.init00:43
cjbarnes18cedk: i'll go do some more digging, will shout if I run into trouble.00:45
cedkcjbarnes18: database.init just load the boostrap SQL00:46
cedkcjbarnes18: the issue is that the database is added in self._pool at the beginning00:47
cedkcjbarnes18: so the cron thinks it is a ready database00:48
cjbarnes18cedk: yes, this is how I understand the problem.00:48
cjbarnes18cedk: so I am looking for where that is happening.  I am guessing at the client but need to verify.00:50
cedkcjbarnes18: which client?00:51
cjbarnes18cedk: tryton client00:51
cedkcjbarnes18: it has nothing to do with the client00:54
cjbarnes18cedk: ok, well I'm starting the search in trytond.00:56
cjbarnes18cedk: I added some debug to help me understand, now I see what you meant with pool.init, thanks for your time.02:07
cjbarnes18cedk: i assumed that database.init did everything.02:08
cedkcjbarnes18: ok02:09
zxq9Is it possible to have two fields on a form view, and have one update the other when the cursor leaves the field?06:59
zxq9centimeters <--> inches automatic conversion within the form, for example?06:59
udonozxq9: 'check on_change' and 'on_change_with' and don't forget 'depends'08:30
zxq9Ah, in the python fields.*() definition, not the xml form, then?08:32
zxq9Found a good example. Thank you very much!08:34
zxq9Is there any way to may a selection drop box take up only 1 column?11:38
zxq9colspan="1" gives me 2 column-wide selection boxes, and colspan="0" makes the whole thing 0 columns/invisible -- the selection strings are only 1 character, so its a bit weird looking.11:41
cedkzxq9: it takes only 1 columns by default11:42
zxq9Its taking two.11:45
cedkzxq9: it is not possible as it is like that in many form view11:47
zxq9ok11:47
cedkzxq9: show the XML11:49
zxq9You're right. I found the problem now.11:50
zxq9Need a larger number of columns to control this and adjust other fields to get the correct proportion (maybe).11:51
zxq9No, nevermind... its still really wide.11:53
zxq9The field is currently on a line by itself. Would that make a difference?11:54
cedkzxq9: don't know, show the XML12:00
zxq9http://pastebin.com/7m53PyQN12:03
zxq9Do you need more of the XML to know?12:03
zxq9Its the very last field "dob_jp_era" that is the silliest looking.12:04
cedkzxq9: I think it is because above it you get only fields with colspan=212:07
cedkzxq9: but I must say that a form with 16 columns it is for me non-userfriendly12:08
zxq9It was originally 8 columns, I switched to 16 columns to see if the problem was fixed, but nothing changed.12:08
zxq9I'll finish the form and see what happens. I might ask you again later. Thanks for checking.12:09
cedkzxq9: and is not a large options in the selection?12:09
zxq9No, not for this one. Only one letter wide, only three options.12:10
zxq9The values are "H" "S" and "T" only.12:10
sharoonwe have unclean `stop()`ing of Transactions when an exception occurs during the start15:25
sharoonhas anybody else faced this issue ?15:25
sharoonhttp://paste.pocoo.org/show/502264/15:25
sharooni don't think this problem will be seen when running trytond daemon (except if something happens to the database connection in b/w like a timeout or cursor creation failure)15:27
cedksharoon: I guess it is the self.cursor.close() in Transaction.stop that should be catched16:06
-!- hoRn(~jan@business-088-079-110-234.static.arcor-ip.net) has left #tryton16:18
sharooncedk: it doesn't reach Transaction().stop16:41
sharooncedk: the blow up happens in start itself16:41
cedksharoon: so assignation of user should come after database connection16:55
sharooncedk: yes16:55
sharooncedk: that solves the problem for now16:55
sharooncedk: do you want me to propose a patch and write a test case ?16:58
cedksharoon: yes16:58
sharooncedk: there is no test_transaction.py (do you want me to create or include in any other file ?)16:58
cedksharoon: create17:00
sharooncedk: thanks17:00
udonohi, has anyone an idea if and how I can create a domain in xml like [('user', '=', active_user_id)]? 'user' is a field in the model 'active_user_id' should be the id of the actual user which starts the action.18:20
cedkudono: using the context18:21
udonocedk: thanks. I try it with [('user', '=', Get(Eval('context', {}), 'user_id', False))] and [('user', '=', Get(Eval('context', {}), 'user', False))] but both will not work.18:27
udonooh, I see missing .id in field name...18:28
udonoDoes not work. The domains are accepted, but there are not the expected results. I try with [('user.id', '=', Get(Eval('context', {}), 'user_id', False))] and [('user.id', '=', Get(Eval('context', {}), 'user', False))]18:32
cedkudono: user id is not in the context18:34
cedkudono: it is _user18:35
udonocedk: IC18:35
udonocedk: thanks for the hints. Now I tried with [('user.id', '=', Get(Eval('context', {}), '_user', False))] but it shows no results, but it should. When changing the domain in XML it seems needed to 1. delete the involved ir.actions, 2. make a database update, 3. recreate ir.action with new domain, and 4. again database update.18:45
udonoall on 2.0.318:46
cedkudono: I don't understand18:47
udonocedk: http://paste.pocoo.org/show/502394/18:49
udonocedk: when using menu_reminder_user_view it should show only the entries of the actual user.18:50
udonobut using this domain, the view tree shows no results.18:52
cedkudono: [('user', '=', Eval('_user'))]18:57
udonocedk: yes, its defined in res.request. But no results on my first tries. Since it is working on res.request, this is the way to go for me. Thanks.19:06
udonocedk: FYI it seems to be a 2.0 issue. On tip it works as expected with http://paste.pocoo.org/show/502419/. Is it worth to file a bug?19:36
sharooncedk: how do you tackle the possible issue in self.cursor.close()19:41
sharooncedk: do you want to push it to the end ?19:42
cedkudono: we should fix 2.019:42
cedksharoon: I will just catch all exception19:43
sharooncedk: you mean a try.. except.. finally...handler ?19:43
cedksharoon: yes19:45
sharooncedk: ok19:45
udonocedk: ok19:48
sharooncedk: i have fixed according to what you have said20:00
sharoonACTION brb20:01
-!- hoRn(~jan@business-088-079-110-234.static.arcor-ip.net) has left #tryton21:53

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