IRC logs of #tryton for Friday, 2012-07-06 #tryton log beginning Fri Jul 6 00:00:01 CEST 2012
__efx__hi there, somebody here ? I would like to connect to tryton using proteus with the set_trytond method (direct connection). I have a question regarding this method. Why no password is required to connect to tryton ? And how can I extract the encrypted password of a user using proteus because when I select a user and look at the password field I got only *00:21
__efx__Or how to check a user password in proteus when using direct connection to the server00:29
__efx__Somebody knows the detail on how password a stored in tryton. If I am not wrong it uses sha1 encryption right?09:11
bechamel__efx__: yes sha with a salt09:28
__efx__bechamel: thank you, and what is the salt, because I would like to add to config.set_trytond the need of the password. Because actually it can connect without password...09:30
__efx__the set_trytond function of proteus by the way09:33
bechamel__efx__: the corresponding code is in the get_login method in trytond/res/user.py09:44
__efx__bechamel : I was just looking at it, so I tried the same with proteus. When I get my user the salt is None so I simply hashed my password with the hashlib (as done in the get_login method) however when I made a : User.find([('login','=',MYLOGIN),('password','=',MYHASHEDPASS)]) I got no results..09:46
__efx__and without the password I got something. Furthermore I can not find the hashed password with proteus because it returns 'xxxxxxxx' in the password field09:48
__efx__ok the problem comes from the Salt because proteus returns None but in the database it is not None09:50
bechamel__efx__: I think you should call User.get_login instead of re-creating it09:57
__efx__bechamel: I changed in of proteus at the line 194 the by user_obj.login09:59
__efx__bechamel: but I don't understand what the user is selected with the search method and disregards completely the password10:00
__efx__bechamel : does that make sense ?10:00
__efx__sorry it was *why instead of what10:00
__efx__bechamel : or is it an error ?10:01
bechamel__efx__: when you use set_trytond, you bypass the network and connect directly to to the python code, so no password is needed10:03
bechamel__efx__: " does that make sense ?" -> it depends of your use case :)10:04
__efx__bechamel: yes that's true10:05
bechamel__efx__: actually a good behaviour would be to cann user_obj.login if the password is not empty10:06
bechamel__efx__: like that we have both behaviours10:06
__efx__bechamel: yes I think that would be excellent. I can write a patch for that but I have still a question, when I use the get_login method with a bad password then it returns a 0 and proteus still managed to connect with that, but they are no user with id=0 in the database..10:07
bechamel__efx__: actually user_id == 0 means root user, the one which bypass all access stuffs :)10:10
bechamel__efx__: so it's even worse10:10
__efx__bechamel: :), so if get_login returns 0 then we just have to set it to None10:11
bechamel__efx__: so, you must test that get_login returns an id > 010:11
bechamel__efx__: yes, check for example in trytond/security.py10:12
__efx__I can directly check on the of proteus10:12
__efx__Now I have the following behavior. If I use set_trytond without password the the search method is used if the password is set then the the login method is used and a test if the result of the login method is <=0 then the self.user is set to None10:14
__efx__*then the10:14
bechamel__efx__: sounds good10:16
__efx__bechamel : should I propose a patch for that ? And if yes where should I put it ?10:17
pietervdrpjstevns: Again I have difficulties with installing the account_nl module. Can I skype/email you?10:21
bechamel__efx__: create an issue on the bug tracker, and upload your patch on codereview, see
__efx__bechamel : ok I will do that this afternoon, thank you again10:39
-!- pietervdr(52ab65e9@gateway/web/freenode/ip. has left #tryton14:11
pjstevnsja, moment15:51
pjstevnswrong channel...15:52
-!- pjstevns( has left #tryton15:52
udononicoe: hi, do you know the revision of which is able to apply ?17:03
nicoeudono: good question ;)17:06
nicoeudono: I'll work on that during my week-end17:06
udononicoe: ok, thanks. So I'll just wait.17:07
rhubnerhi nicoe18:38
nicoerhubner: hi18:39
nicoerhubner: I saw your email18:39
rhubnernicoe: I have to do a SQL query to get the dates in fields_view_get method and add the same "result"?18:40
rhubnernicoe: ok...18:40
rhubnernicoe: Did you understand my question on email?18:40
rhubnermy questions*18:40
nicoeFor the question about how to get the data : in a previous email I explained that you have to set the correct date in the context and then trigger a read18:42
nicoeAbout how to get the dates ... I think you should do this somewhere else than in modelview18:43
nicoeprobably add a method in ModelStorage or something like that18:44
nicoeI will investigate.18:44
rhubnernicoe: Ok... I will check the previous email...18:46
rhubnernicoe: I managed to make the widget appear in correct form... I dont know if I did the best way! But it worked...18:48
gbisheimerHello to all20:11
gbisheimerAnybody there?20:12
-!- rhubner(~rhubner@ has left #tryton21:12

Generated by 2.11.0 by Marius Gedminas - find it at!