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

chat.freenode.net #tryton log beginning Thu Nov 3 00:00:02 CET 2011
2011-11-03 00:23 <cedk> cjbarnes18: no, but I'm not yet sure about the solution
2011-11-03 00:24 <cedk> cjbarnes18: I have asked to the mailing list
2011-11-03 00:24 <cedk> cjbarnes18: so let's see who others react
2011-11-03 00:25 <cjbarnes18> cedk: I am in two minds with the solution, would prefer to find where it gets added to the pool...
2011-11-03 00:26 <cjbarnes18> cedk: does the client start connection attempt as soon as create is started?
2011-11-03 00:27 <cedk> cjbarnes18: it is possble
2011-11-03 00:28 <cjbarnes18> cedk: guess I'll take a look see.
2011-11-03 00:28 <cedk> cjbarnes18: did you look at Pool.start
2011-11-03 00:30 <cjbarnes18> cedk: yes, if I read correctly it adds databases that are in the config.
2011-11-03 00:31 <cjbarnes18> other that that they are added on open or after create, think I need to make a more thorough search.
2011-11-03 00:34 <cedk> cjbarnes18: I'm wondering if you could not use the Pool._locks to see if you can start the cron or not
2011-11-03 00:37 <cjbarnes18> cedk: hmm, I think I need to find where it is added to the pool 1st..
2011-11-03 00:40 <cedk> cjbarnes18: where what is added to the pool?
2011-11-03 00:41 <cjbarnes18> the new incomplete database.
2011-11-03 00:43 <cedk> cjbarnes18: in Pool.init
2011-11-03 00:43 <cjbarnes18> cedk: in the create process it is added after database.init
2011-11-03 00:45 <cjbarnes18> cedk: i'll go do some more digging, will shout if I run into trouble.
2011-11-03 00:46 <cedk> cjbarnes18: database.init just load the boostrap SQL
2011-11-03 00:47 <cedk> cjbarnes18: the issue is that the database is added in self._pool at the beginning
2011-11-03 00:48 <cedk> cjbarnes18: so the cron thinks it is a ready database
2011-11-03 00:48 <cjbarnes18> cedk: yes, this is how I understand the problem.
2011-11-03 00:50 <cjbarnes18> cedk: so I am looking for where that is happening. I am guessing at the client but need to verify.
2011-11-03 00:51 <cedk> cjbarnes18: which client?
2011-11-03 00:51 <cjbarnes18> cedk: tryton client
2011-11-03 00:54 <cedk> cjbarnes18: it has nothing to do with the client
2011-11-03 00:56 <cjbarnes18> cedk: ok, well I'm starting the search in trytond.
2011-11-03 02:07 <cjbarnes18> cedk: I added some debug to help me understand, now I see what you meant with pool.init, thanks for your time.
2011-11-03 02:08 <cjbarnes18> cedk: i assumed that database.init did everything.
2011-11-03 02:09 <cedk> cjbarnes18: ok
2011-11-03 06:59 <zxq9> Is it possible to have two fields on a form view, and have one update the other when the cursor leaves the field?
2011-11-03 06:59 <zxq9> centimeters <--> inches automatic conversion within the form, for example?
2011-11-03 08:30 <udono> zxq9: 'check on_change' and 'on_change_with' and don't forget 'depends'
2011-11-03 08:32 <zxq9> Ah, in the python fields.*() definition, not the xml form, then?
2011-11-03 08:34 <zxq9> Found a good example. Thank you very much!
2011-11-03 11:38 <zxq9> Is there any way to may a selection drop box take up only 1 column?
2011-11-03 11:41 <zxq9> colspan="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.
2011-11-03 11:42 <cedk> zxq9: it takes only 1 columns by default
2011-11-03 11:45 <zxq9> Its taking two.
2011-11-03 11:47 <cedk> zxq9: it is not possible as it is like that in many form view
2011-11-03 11:47 <zxq9> ok
2011-11-03 11:49 <cedk> zxq9: show the XML
2011-11-03 11:50 <zxq9> You're right. I found the problem now.
2011-11-03 11:51 <zxq9> Need a larger number of columns to control this and adjust other fields to get the correct proportion (maybe).
2011-11-03 11:53 <zxq9> No, nevermind... its still really wide.
2011-11-03 11:54 <zxq9> The field is currently on a line by itself. Would that make a difference?
2011-11-03 12:00 <cedk> zxq9: don't know, show the XML
2011-11-03 12:03 <zxq9> http://pastebin.com/7m53PyQN
2011-11-03 12:03 <zxq9> Do you need more of the XML to know?
2011-11-03 12:04 <zxq9> Its the very last field "dob_jp_era" that is the silliest looking.
2011-11-03 12:07 <cedk> zxq9: I think it is because above it you get only fields with colspan=2
2011-11-03 12:08 <cedk> zxq9: but I must say that a form with 16 columns it is for me non-userfriendly
2011-11-03 12:08 <zxq9> It was originally 8 columns, I switched to 16 columns to see if the problem was fixed, but nothing changed.
2011-11-03 12:09 <zxq9> I'll finish the form and see what happens. I might ask you again later. Thanks for checking.
2011-11-03 12:09 <cedk> zxq9: and is not a large options in the selection?
2011-11-03 12:10 <zxq9> No, not for this one. Only one letter wide, only three options.
2011-11-03 12:10 <zxq9> The values are "H" "S" and "T" only.
2011-11-03 15:25 <sharoon> we have unclean `stop()`ing of Transactions when an exception occurs during the start
2011-11-03 15:25 <sharoon> has anybody else faced this issue ?
2011-11-03 15:25 <sharoon> http://paste.pocoo.org/show/502264/
2011-11-03 15:27 <sharoon> i 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)
2011-11-03 16:06 <cedk> sharoon: I guess it is the self.cursor.close() in Transaction.stop that should be catched
2011-11-03 16:18 -!- hoRn(~jan@business-088-079-110-234.static.arcor-ip.net) has left #tryton
2011-11-03 16:41 <sharoon> cedk: it doesn't reach Transaction().stop
2011-11-03 16:41 <sharoon> cedk: the blow up happens in start itself
2011-11-03 16:55 <cedk> sharoon: so assignation of user should come after database connection
2011-11-03 16:55 <sharoon> cedk: yes
2011-11-03 16:55 <sharoon> cedk: that solves the problem for now
2011-11-03 16:58 <sharoon> cedk: do you want me to propose a patch and write a test case ?
2011-11-03 16:58 <cedk> sharoon: yes
2011-11-03 16:58 <sharoon> cedk: there is no test_transaction.py (do you want me to create or include in any other file ?)
2011-11-03 17:00 <cedk> sharoon: create
2011-11-03 17:00 <sharoon> cedk: thanks
2011-11-03 18:20 <udono> hi, 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.
2011-11-03 18:21 <cedk> udono: using the context
2011-11-03 18:27 <udono> cedk: thanks. I try it with [('user', '=', Get(Eval('context', {}), 'user_id', False))] and [('user', '=', Get(Eval('context', {}), 'user', False))] but both will not work.
2011-11-03 18:28 <udono> oh, I see missing .id in field name...
2011-11-03 18:32 <udono> Does 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))]
2011-11-03 18:34 <cedk> udono: user id is not in the context
2011-11-03 18:35 <cedk> udono: it is _user
2011-11-03 18:35 <udono> cedk: IC
2011-11-03 18:45 <udono> cedk: 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.
2011-11-03 18:46 <udono> all on 2.0.3
2011-11-03 18:47 <cedk> udono: I don't understand
2011-11-03 18:49 <udono> cedk: http://paste.pocoo.org/show/502394/
2011-11-03 18:50 <udono> cedk: when using menu_reminder_user_view it should show only the entries of the actual user.
2011-11-03 18:52 <udono> but using this domain, the view tree shows no results.
2011-11-03 18:57 <cedk> udono: [('user', '=', Eval('_user'))]
2011-11-03 19:06 <udono> cedk: 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.
2011-11-03 19:36 <udono> cedk: 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?
2011-11-03 19:41 <sharoon> cedk: how do you tackle the possible issue in self.cursor.close()
2011-11-03 19:42 <sharoon> cedk: do you want to push it to the end ?
2011-11-03 19:42 <cedk> udono: we should fix 2.0
2011-11-03 19:43 <cedk> sharoon: I will just catch all exception
2011-11-03 19:43 <sharoon> cedk: you mean a try.. except.. finally...handler ?
2011-11-03 19:45 <cedk> sharoon: yes
2011-11-03 19:45 <sharoon> cedk: ok
2011-11-03 19:48 <udono> cedk: ok
2011-11-03 20:00 <sharoon> cedk: i have fixed according to what you have said
2011-11-03 20:01 <sharoon> ACTION brb
2011-11-03 21:53 -!- hoRn(~jan@business-088-079-110-234.static.arcor-ip.net) has left #tryton

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