IRC logs of #tryton for Wednesday, 2012-11-28

chat.freenode.net #tryton log beginning Wed Nov 28 00:00:01 CET 2012
2012-11-28 05:22 <ivangarcia> hello, my countries table contains CountryName,Code,NationalityName columns
2012-11-28 05:22 <ivangarcia> I want to show in a form a selector with all the Nationalities... but I only know how to show the CountryNames, anybody can hint me?
2012-11-28 06:43 <ivangarcia> hello, anybody knows how to get the IP of the logged user?
2012-11-28 07:16 <udono> ivangarcia: hello, AFAIK a user can be logged from several ips with same credentials.
2012-11-28 07:17 <ivangarcia> udono: yeah, i've been taking a look at the ir.session table
2012-11-28 07:17 <ivangarcia> udono: i'd like to have a history of the sessions and if possible an extra column of the IP that they logged in
2012-11-28 07:17 <ivangarcia> for security audits, etc
2012-11-28 07:17 <ivangarcia> anybody did that before?
2012-11-28 07:21 <udono> ivangarcia: Not that I know about. But sounds interesting.
2012-11-28 07:26 <udono> ivangarcia: it sounds like an extra model which collects data about all connection attempts to tryton. There you could put the ip-address beside user name and the connection result.
2012-11-28 07:30 <ivangarcia> udono: i'm researching if I can create a history_table of the ir.session table
2012-11-28 07:30 <ivangarcia> then we would just need to add the IP address that the dispatcher.py knows
2012-11-28 08:02 <ivangarcia> udono: so i was able to create a history_table from ir.session but it's not ideal, since many session rows are created during 1 loggin, also it doesn't store the logouts(basically a logout deletes the session instance from the ir.session table)
2012-11-28 08:03 <ivangarcia> udono: so a new module should be developed, with logins,and logouts , registering: type,host,port,protocol,etc
2012-11-28 10:46 <rmu> there is a problem in production.set_moves in production-module
2012-11-28 10:47 <rmu> where the cost-price is assigned to the outgoing moves
2012-11-28 10:48 <rmu> the division cost / quantity can yield arbitrary number of decimal places, no rounding is applied, then the constraint enforcing number of digits complains
2012-11-28 10:49 <rmu> example: Decimal("33") / Decimal("7")
2012-11-28 10:50 <rmu> i will open an issue
2012-11-28 10:51 <rmu> oh i see it is already fixed
2012-11-28 10:51 <rmu> sorry for the noise
2012-11-28 10:54 <rmu> no it is not fixed
2012-11-28 11:18 <nicoe> rmu: you should create an issue
2012-11-28 11:18 <rmu> done, i'm just testing the patch... will take some time
2012-11-28 11:49 <nicoe> rmu: thanks :D
2012-11-28 11:50 <shomon> cedk?
2012-11-28 11:50 <shomon> hi
2012-11-28 11:53 <shomon> my bug with connections.. https://bugs.tryton.org/issue2847 - looks like it's due to the default db_maxconn being really low
2012-11-28 11:53 <shomon> at least 2 days I raised that value and haven't seen that bug since
2012-11-28 15:26 <rmu> so it seems the patch is working... generate_requests is giving the server a workout since 2 hours
2012-11-28 15:27 <rmu> what is strange: i can not log in with another session? client sends common.db.login and waits for answer
2012-11-28 15:43 <corro> does anybody know why it isn't allowed to set the state of an invoice from 'proforma' back to 'draft' when the invoice was generated by a sale? It raises an UserError "You cannot reset to draft an invoice generated by a sale".
2012-11-28 16:45 <rmu> it seems auto-generating request from stock_supply_production does not converge, in other words it loops/recurses forever
2012-11-28 16:45 <rmu> i remember something like this happened at the presentation at the unconference
2012-11-28 16:46 <rmu> does anybody have any idea what the problem might be?
2012-11-28 17:13 <Pilou> rmu: http://hg.tryton.org/modules/production/rev/ad9a54f0429d
2012-11-28 17:22 <rmu> *testing*
2012-11-28 18:48 <cedk> rmu: about issue2905
2012-11-28 18:49 <cedk> rmu: I think we should compute products_period inside the IN_MAX loop
2012-11-28 18:55 <rmu> cedk: and limit it to the current batch of products
2012-11-28 18:56 <cedk> rmu: yeps
2012-11-28 19:06 <rmu> cedk: about the other thing, the login issue
2012-11-28 19:06 <rmu> i can query the res_user table from psql while the wizard is running
2012-11-28 19:06 <rmu> no blocking
2012-11-28 19:08 <cedk> rmu: but are you using a repeatable read transaction ?
2012-11-28 19:12 <rmu> cedk: begin transaction isolation level repeatable read; select * from res_users;
2012-11-28 19:12 <rmu> does not block while wizard is running
2012-11-28 19:28 <rmu> cedk: it block while trying to update the login_try in get_login
2012-11-28 19:33 <cedk> rmu: that's what I thought also
2012-11-28 19:33 <cedk> rmu: I think we should move login_try outside res_user
2012-11-28 19:35 <rmu> cedk: this wizard can run for some time, blocking logins for extended periods is clearly not intended ;-)
2012-11-28 19:35 <rmu> cedk: i will work on the periods-thing in stock_supply_production
2012-11-28 19:43 <cedk> rmu: I have done a patch, could you test it?
2012-11-28 19:43 <rmu> cedk: yes, test is already running
2012-11-28 19:44 <rmu> cedk: will take about an hour
2012-11-28 22:29 <cedk> rmu: still no result?
2012-11-28 22:30 <rmu> oh sorry... forgot to check. test seems to have run ok
2012-11-28 22:32 <cedk> rmu: ok, could you put comment on issue or review
2012-11-28 22:32 <rmu> jep... it did complete as far as i can say now
2012-11-28 22:33 <rmu> i'm not at my workplace ATM, i will comment tomorrow morning
2012-11-28 22:37 <cedk> rmu: ok

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