IRC logs of #tryton for Tuesday, 2015-04-28

chat.freenode.net #tryton log beginning Tue Apr 28 00:00:02 CEST 2015
-!- lukio(~lukio@110-189-235-201.fibertel.com.ar) has left #tryton00:14
-!- digitalsatori(~Thunderbi@114.92.196.106) has joined #tryton02:56
-!- smarro(~sebastian@190.105.93.196) has joined #tryton04:37
-!- zodman_(~zodman@187.155.18.247) has joined #tryton04:46
-!- zodman_(~zodman@187.155.18.247) has joined #tryton04:47
-!- notzippy(~sabayonus@d207-216-251-90.bchsia.telus.net) has joined #tryton05:24
-!- sunny_dealmeida(~quassel@210.89.37.249) has joined #tryton06:18
-!- frispete_(~frispete@p54A9044D.dip0.t-ipconnect.de) has joined #tryton06:40
-!- digitalsatori(~Thunderbi@114.92.196.106) has joined #tryton06:46
-!- yangoon(~mathiasb@p549F0376.dip0.t-ipconnect.de) has joined #tryton07:01
-!- LordVan(~LordVan@gentoo/developer/LordVan) has joined #tryton07:03
-!- digitalsatori(~Thunderbi@114.92.196.106) has joined #tryton07:58
-!- Telesight(~anthony@4dafef36.ftth.telfortglasvezel.nl) has joined #tryton08:04
-!- mathsniper(1b6db22b@gateway/web/freenode/ip.27.109.178.43) has joined #tryton08:11
mathsniperHi, I try "user, = User.create([{'name': 'myname', 'login': 'myname'}]); User.write([user], {'password': '123456'})" but the record is not saved in res_user table. Why?08:14
-!- michael-kohlhaas(~mk@p5DD46EF0.dip0.t-ipconnect.de) has joined #tryton08:24
-!- michael-kohlhaas(~mk@unaffiliated/michael-kohlhaas) has joined #tryton08:24
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton08:34
-!- bechamel(~Adium@host-85-201-213-94.dynamic.voo.be) has joined #tryton08:48
-!- vcardon(~vcardon@bureau-sdsl.tranquil.it) has joined #tryton09:36
-!- vcardon(~vcardon@bureau-sdsl.tranquil.it) has joined #tryton09:36
-!- vcardon(~vcardon@bureau-sdsl.tranquil.it) has joined #tryton09:37
-!- vcardon(~vcardon@bureau-sdsl.tranquil.it) has joined #tryton09:37
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:51
-!- Timitos(~kpreisler@2001:a60:162e:ef01:ae7b:a1ff:feaf:55f0) has joined #tryton09:55
-!- Jitesh_Nair(~jitesh@unaffiliated/jitesh-nair/x-6738125) has joined #tryton09:57
-!- munron(~AndChat68@197.211.216.214) has joined #tryton10:05
-!- michael-kohlhaas(~mk@p5DD46EF0.dip0.t-ipconnect.de) has joined #tryton10:21
-!- michael-kohlhaas(~mk@unaffiliated/michael-kohlhaas) has joined #tryton10:21
-!- udono(~udono@ip-37-201-196-116.hsi13.unitymediagroup.de) has joined #tryton10:35
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton12:03
-!- Telesight(~anthony@4dafef36.ftth.telfortglasvezel.nl) has joined #tryton12:24
-!- nicoe(~nicoe@balisto.wifi.b2ck.com) has joined #tryton12:47
-!- mariomop(~quassel@181.90.77.193) has joined #tryton13:00
-!- smarro(~sebastian@190.105.93.196) has joined #tryton13:17
-!- bechamel(~Adium@host-85-201-213-94.dynamic.voo.be) has joined #tryton13:47
-!- kstenger(~karla@200.124.209.158) has joined #tryton13:59
Jitesh_Nairhow to verify res.user password?14:03
Jitesh_Nairi have created a user with password14:03
Jitesh_Nairand now i am trying to verify the password of the user14:03
-!- jcnorman(~jcnorman@24-197-138-90.dhcp.spbg.sc.charter.com) has joined #tryton14:05
pokoliJitesh_Nair: just call the get_login method on User class and check their return value14:06
Jitesh_Nairpokoli, i saw that function in source code.. but when i tried that AttributeError: type object 'res.user' has no attribute 'get_login'14:07
pokoliJitesh_Nair: using proteus?14:08
Jitesh_Nairyes14:08
pokoliJitesh_Nair: so you can specify the user/password on set_trytond14:11
Jitesh_Nairpokoli, but set_trytond in proteus 3.6.0 doesnt have password field14:12
pokoliJitesh_Nair: you can set password using xml_rpc14:17
pokoliJitesh_Nair: but i'm wondering that if you need to login/logout users, proteus is not the right library14:17
-!- mathsniper(3cf631cc@gateway/web/freenode/ip.60.246.49.204) has joined #tryton14:18
Jitesh_Nairpokoli, ohh... then how am i supposed to do that?14:18
pokoliJitesh_Nair: why you need login?14:19
pokoliJitesh_Nair: what do you want to achieve?14:19
Jitesh_Nairi am not using client...creating a small custom client14:19
mathsniperHi, I am reading Tryton "Domain" chapter, it says "Is the name of a trytond.model.fields or a pyson statement, that evaluates to a string.". Could anyone give an example of pyson that evaluates to a string?14:20
pokolimathsniper: could you post the link?14:20
pokoliJitesh_Nair: small custom client? which type? web based? mobile? desktop?14:21
mathsniperhttp://doc.tryton.org/3.6/trytond/doc/topics/domain.html#topics-domain14:21
Jitesh_Nairpokoli, desktop14:21
mathsniperI know I can set the field name but I don't know how to get a pyson statement with string return.14:21
pokolimathsniper: for example [(Eval('functional_field_name'), '=', True)] will be a valid domain14:22
-!- juanfe(~juanfe@190.85.115.49) has joined #tryton14:22
pokolimathsniper: and functional_field_name should be a function field that return the name of another field, that will be evaluated to True on such domain14:23
pokoliJitesh_Nair: so why not using the tryton client?14:23
mathsniperI try to set a variable test='name' in a function but print Eval('test') return empty14:26
mathsniperIt expects to be "name"14:26
-!- Jitesh_Nair(~jitesh@116.68.97.199) has joined #tryton14:28
pokolimathsniper: could you upload the code to some paste web and paste the link here?14:28
-!- Jitesh_Nair(~jitesh@unaffiliated/jitesh-nair/x-6738125) has joined #tryton14:29
Jitesh_Nairnet disconnected sorry14:29
pokoliACTION brb 14:32
mathsniperGet back later, network very slow14:32
-!- jitesh_(~jitesh@116.68.97.199) has joined #tryton14:41
-!- Jitesh_Nair(~jitesh@unaffiliated/jitesh-nair/x-6738125) has joined #tryton14:48
Jitesh_Nairpokoli,  there?14:55
pokoliJitesh_Nair: yes :)15:01
Jitesh_Nairpokoli, you were telling me about the problems with proteus in logging15:08
pokoliJitesh_Nair: i asked you why you don't use the tryton client15:20
Jitesh_Nairpokoli, ahh ya... i mentioned it but my net got disconnected15:24
Jitesh_Nairpokoli, i am trying to use a custom build client with trytond utilities15:24
Jitesh_Nairi am not gud with gtk so created a small interface with pyside15:24
Jitesh_Nairnow iam trying to use trytond as a backend controller15:24
-!- jcnorman(~jcnorman@24-197-138-90.dhcp.spbg.sc.charter.com) has joined #tryton15:27
pokoliJitesh_Nair: but you will be missing a lot of interesting client features like domain inversion15:27
Jitesh_Nairyes...i am just learning, and i will soon learn them too :)15:28
pokoliJitesh_Nair: why you want to use a custom build? I can not see any benefit on it15:29
pokoliJitesh_Nair: nor benefits you, nor benefits tryton community15:29
Jitesh_Nairi am not trying to out grow tryton its just that iam trying to use it just as a backend (just trying to learn15:29
Jitesh_Nair)15:29
Jitesh_Nairuse it in a different way..15:29
pokoliJitesh_Nair: you're creating yourself a lot of problems, just don't understad why15:30
Jitesh_Nairwell i guess that will make tryton more flexible as a standalone server and also as an application15:30
Jitesh_Nairpokoli, i do get your point that this thing iam trying to do is not worth15:31
pokoliJitesh_Nair: you can use tryton as standalone server with your custom clients if you want. It's designed to work like this15:32
-!- hiaselhans(~Thunderbi@212.186.50.97) has joined #tryton15:32
pokoliJitesh_Nair: just saying that it's not an easy task to implement a custom client, with all the features15:32
Jitesh_Nairpokoli, but since i started this i dont want to drop it...15:32
Jitesh_Nairexactly....standalone15:32
pokoliJitesh_Nair: so I wont recommend you to write one from scratch15:33
Jitesh_Nairhey as a beginer i wont try to implement all the features15:33
Jitesh_Nairjust few of them as a test...lightweight stuff15:33
Jitesh_Nairjust few of the things like inventory management etc15:34
pokoliJitesh_Nair: just install the client, deploy a server, connect and install the stock module15:35
pokoliJitesh_Nair: no need to code anything15:35
Jitesh_Nairpokoli, customizing the ui is what i tried...now i know an erp doesnt require much ui stuffs...as i said i was trying to learn15:36
-!- bvillasanti(~bvillasan@181.16.21.34) has joined #tryton15:37
pokoliJitesh_Nair: if you want to learn how tryton works as ERP, install the client and test it15:39
pokoliJitesh_Nair: if you want to learn how tryton internals work, it's not easy15:39
Jitesh_Nairyes i will be doing that for sure...last time when you told me to work on client and then learn how to work internal....i downloaded client and got it running15:41
pokoliJitesh_Nair: so don't understand what issues do you have15:42
Jitesh_Nairwell back to the issue how to authorize a user with proteus....i used res.user created a user and added password for it, saved it15:44
Jitesh_Nairnow how to authenticate its password is what iam trying to do.15:45
pokoliJitesh_Nair: User.get_login(username, password)15:48
Jitesh_Nairyes i read the source and did that but it failed and then came here to ask from you guys....the error was..AttributeError: type object 'res.user' has no attribute 'get_login'15:49
pokoliJitesh_Nair: because get_login function is not available from RPC, so you can not call it directly from proteus15:51
Jitesh_Nairohh kkk.....15:57
Jitesh_Nairthanks mate....15:57
Jitesh_Nair:)16:01
-!- pablovannini(~pablo@110-189-235-201.fibertel.com.ar) has joined #tryton16:37
-!- mathsniper(1b6db22b@gateway/web/freenode/ip.27.109.178.43) has joined #tryton18:14
mathsniperHi pokoli, this is the code I said before: http://tny.cz/01531e5b18:19
mathsniperpyson.Eval('test') is empty even "test" variable is set.18:19
mathsniperDoes anyone know the issue?18:28
cedkmathsniper: why are you using a PYSON?18:38
cedkmathsniper: indeed, I even don't understand what you try to do18:38
cedkmathsniper: why don't you write: User.find([('login', '=', 'admin')])18:39
mathsniperhttp://doc.tryton.org/3.4/trytond/doc/topics/domain.html#topics-domain18:39
mathsniper<field name> Is the name of a trytond.model.fields or a pyson statement, that evaluates to a string.18:39
mathsniperI would like to know how pyson evaluates to a string18:40
cedkmathsniper: with the decoder18:40
mathsniperI try "test='abc'; print "eval %s " % pyson.PYSONDecoder().decode(pyson.PYSONEncoder().encode(pyson.Eval('test')))" but still return empty18:41
cedkmathsniper: you must set a context to the decoder18:42
mathsniperWhat does 'context' should be?18:44
mathsniperI try " pyson.PYSONDecoder(context=pyson.CONTEXT['Eval']).decode(pyson.PYSONEncoder().encode(pyson.Eval('test')))" but error appears: TypeError: unbound method get() must be called with Eval instance as first argument (got unicode instance instead)18:48
cedkmathsniper: look at the unittest18:50
-!- smarro(~sebastian@190.105.79.159) has joined #tryton18:52
mathsniperI see. resolved the issue.18:55
mathsniperI try "pyson.PYSONDecoder(context=locals()).decode(pyson.PYSONEncoder().encode(eval))"18:55
Jitesh_Nairmathsniper, were you able to verify a users password?? even i wanted to do that18:57
-!- bvillasanti(~bvillasan@181.16.21.34) has joined #tryton18:57
mathsniperWhen I read the tryton domain chapter document, I think the statement "<field name> Is the name of a trytond.model.fields or a pyson statement, that evaluates to a string." is saying that "the model search function will convert the domain variable to proper string if it is an instance of PYSON".18:58
Jitesh_Nairmathsniper, you there?19:01
Jitesh_Nairmathsniper, were you able to verify password of a user with this??19:06
-!- Jitesh_Nair(~jitesh@unaffiliated/jitesh-nair/x-6738125) has joined #tryton19:09
mathsniperUser.get_login class method is not in User __rpc__. Is it possible to call User.get_login method using proteus?19:17
Jitesh_Nairis there any way to verify the password of the user if not by get_login as its not in the __rpc__19:19
-!- jcnorman(~jcnorman@24-197-138-90.dhcp.spbg.sc.charter.com) has joined #tryton19:22
mathsnipertry User.sessions19:25
mathsniperSeems User.get_login is the only way to login19:29
-!- jcnorman(~jcnorman@24-197-138-90.dhcp.spbg.sc.charter.com) has joined #tryton19:31
-!- jcnorman(~jcnorman@24-197-138-90.dhcp.spbg.sc.charter.com) has joined #tryton19:37
-!- bvillasanti(~bvillasan@190.105.79.159) has joined #tryton19:38
mathsniperI think it is better the get the pool from proteus_config and call get_login within Transaction.19:43
mathsniperIt works.19:43
mathsniperHi @cedk, Will the circular dependent imports of Transaction being solved in future? The error always happen if I import Transaction in module scope.19:46
mathsniperPlease see "issue 4724"19:51
-!- sunny_dealmeida(~quassel@210.89.37.244) has joined #tryton20:39
-!- frispete_(~frispete@p54A9044D.dip0.t-ipconnect.de) has joined #tryton20:46
-!- nineinchnick(~jwas@109.231.18.226) has joined #tryton20:48
-!- nineinchnick1(~jwas@109.231.18.226) has joined #tryton20:50
-!- jcnorman(~jcnorman@24-197-138-90.dhcp.spbg.sc.charter.com) has joined #tryton21:00
-!- nicoe(~nicoe@2a02:a03f:3068:4b00:ee55:f9ff:fe7b:f7ac) has joined #tryton21:12
-!- vcardon(~vcardon@bureau-sdsl.tranquil.it) has left #tryton21:20
-!- vcardon(~vcardon@bureau-sdsl.tranquil.it) has joined #tryton22:05
-!- vcardon(~vcardon@bureau-sdsl.tranquil.it) has left #tryton22:47
-!- duesenfranz(~jona@chello213047182122.tirol.surfer.at) has joined #tryton22:53
duesenfranz..can anybody explain to me why this doesn't work?: http://is.gd/qeYGBF22:58
duesenfranzsince the function should only life as long as 'a, shouldn't this be correct?22:59
-!- pablovannini(~pablo@110-189-235-201.fibertel.com.ar) has joined #tryton23:06
-!- duesenfranz(~jona@chello213047182122.tirol.surfer.at) has left #tryton23:10
-!- pablovannini(~pablo@110-189-235-201.fibertel.com.ar) has joined #tryton23:43
-!- jcnorman(~jcnorman@24-197-138-90.dhcp.spbg.sc.charter.com) has joined #tryton23:50

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