IRC logs of #tryton for Thursday, 2016-06-23

chat.freenode.net #tryton log beginning Thu Jun 23 00:00:02 CEST 2016
-!- pelox_(~rail@gusl/staff/risturiz) has joined #tryton00:20
-!- pokoli(~pokoli@2001:41d0:1:9acb::1) has joined #tryton03:03
-!- prayashm(~prayashm@unaffiliated/prayashm) has joined #tryton07:15
-!- frispete_(~frispete@p54A91249.dip0.t-ipconnect.de) has joined #tryton07:19
-!- zmijunkie(~Adium@i59F5C93C.versanet.de) has joined #tryton07:45
-!- rpit(~rpit@2a02:908:e672:9420:56ee:75ff:fe0d:d3c7) has joined #tryton08:21
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton08:24
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton08:52
-!- udono(~udono@tmo-113-169.customers.d1-online.com) has joined #tryton09:08
-!- frispete(~frispete@p54A91249.dip0.t-ipconnect.de) has joined #tryton09:14
-!- michale(caa0a538@gateway/web/freenode/ip.202.160.165.56) has joined #tryton09:18
michalehello09:19
michalehow will I get context?09:19
pokolimichale: hi, which context? what are you trying to achieve?09:21
michaleI mean user preferences09:22
cedkI think we should write a description for http://doc.tryton.org/4.0/trytond/doc/ref/transaction.html?highlight=context#trytond.transaction.Transaction.context09:22
cedkmichale: User.get_preferences09:24
cedkmichale: with argument context_only=True09:24
michaleis this http://pastebin.com/ewbgCmV5 good?09:28
cedkmichale: no, I said argument must be True not a dict09:30
cedkmichale: and also JSON-RPC call must always have a context as last argument09:31
michalecan you please correct my JSON RPC call?09:32
michaleI am just trying to get preference that's why I am not append context in this call as well as login09:33
michaleas same as login09:33
cedkmichale: login is special call without context09:33
-!- dj_xatra(~dj_xatra@217.166.83.130) has joined #tryton09:34
michaleisn't it this also because I am just trying to context via this call?09:34
michaleafter this call only, I am able to set context for next calls09:35
michaleAm I right?09:35
cedkno09:35
michaleisn't it preference == context?09:36
-!- frispete(~frispete@p54A91249.dip0.t-ipconnect.de) has joined #tryton09:39
cedkpokoli: do you plan to write the doc?10:30
pokolicedk: which doc?10:30
cedkpokoli: for triggers10:30
pokolicedk: not now10:30
cedkpokoli: OK, I will maybe10:31
pokolicedk: ok, at least I will review it :)10:31
-!- frispete(~frispete@p54A91249.dip0.t-ipconnect.de) has joined #tryton10:38
-!- nicoe(~nicoe@balisto.wifi.b2ck.com) has joined #tryton10:40
-!- michale(caa0a538@gateway/web/freenode/ip.202.160.165.56) has joined #tryton10:41
michaleisn't it preference == context?10:41
cedkmichale: it is what the client does10:42
michaleso both are different?10:44
cedkmichale: I don't understand the question10:46
cedkmichale: context is a mechanism, you can fill it with what you want but the client fill it with get_preferences10:47
michalemy question is this http://pastebin.com/ewbgCmV5 correct? I understand preference == context,right?10:47
michaleget_preference used to get context,right?10:48
cedkmichale: I already told you that it is wrong, arguments must be True and a context10:49
michalethen how can I get context?10:49
cedkmichale: you put whatever you want10:50
cedkmichale: the client uses an empty dict10:50
michalenow http://pastebin.com/m5NpYKdR?10:53
michalenow  http://pastebin.com/m5NpYKdR  ?10:53
michalecedk, sorry to disturb you, are you there?11:00
cedkmichale: and where the True parameters?11:03
michalecan you just correct me? I don't understand where to put it11:05
cedkmichale: did you look at the method?11:07
michalehere nothing is menthion11:10
michalehere nothing is mention* http://doc.tryton.org/3.2/trytond/doc/ref/transaction.html?highlight=transaction#trytond.transaction.Transaction.user11:10
-!- sisalp(~sisalpuse@boxoo.sisalp.net) has joined #tryton11:11
cedkmichale: I'm talking about the method User.get_preferences11:17
-!- frispete(~frispete@p54A91249.dip0.t-ipconnect.de) has joined #tryton11:18
michaleno sorry I am not able find it11:21
cedkmichale: to find method you can use: http://linux.die.net/man/1/grep11:21
prayashmWhy does exporting a CSV append a blank line at the end of the file?11:22
michaleare you talking about this http://doc.tryton.org/3.2/trytond/trytond/modules/account_asset/tests/scenario_account_asset.html?highlight=get_preferences ?11:25
pokoliprayashm: it does not export any blank line on my case11:25
cedkmichale: no it is not documented but Python is made to be read11:26
pokoliprayashm: are you sure you are not exporting a record with all the fields you selected as blank?11:26
prayashmpokoli: Yes, I haven't selected any blank records11:28
prayashmpokoli: I am default branch. Version 4.1.011:28
michalenow http://pastebin.com/tZCSkbjy ?11:29
prayashmpokoli: s/am/am on/11:29
pokoliprayashm: me to, are you opening the file directly or saving it to your drive?11:31
prayashmpokoli: I am saving it on my drive.11:32
cedkprayashm: is not just your viewer who display the '\r\n' ?11:33
cedkmichale: did you test it?11:34
prayashmcedk: I think it is11:34
michaleyes, it gives me dictionary11:35
prayashmcedk: This happens when I open the file with Sublime Text / Nano / PapaParse11:35
prayashmI did a cat file.csv. That showed correctly11:36
pokoliprayashm: so it's your editor/paparse that does not show it correctly :)11:36
pokoliprayashm: I see it correctly in vim also11:36
pokoliprayashm: and I can confirm it is not correctly shown in nano11:37
michaleas here http://pastebin.com/8EnzszEu11:37
prayashmpokoli: right11:38
prayashmcedk pokoli: thank you :)11:40
-!- udono(~udono@tmo-113-169.customers.d1-online.com) has joined #tryton11:52
-!- mariomop(~quassel@181.110.64.209) has joined #tryton12:55
-!- frispete(~frispete@p54A91249.dip0.t-ipconnect.de) has joined #tryton13:39
-!- udono(~udono@tmo-113-169.customers.d1-online.com) has joined #tryton14:44
-!- kstenger(~karla@r186-55-73-93.dialup.adsl.anteldata.net.uy) has joined #tryton14:47
-!- kstenger(~karla@r186-55-73-93.dialup.adsl.anteldata.net.uy) has joined #tryton15:11
mrichezhello15:28
mrichezhow to get current user employee_id ?15:29
mrichezi'm trying: if (Eval('_user',{}).get('employee.id') == employee.id)15:30
-!- udono(~udono@ip-37-201-245-214.hsi13.unitymediagroup.de) has joined #tryton15:30
cedkmrichez: _user contains only the id15:31
cedkmrichez: it is set in the context normally15:32
mrichezcedk: ok, i see so i should use Transaction().context['employee'] ?15:34
cedkmrichez: you can15:36
mrichezcedk: working ! thanks :-)15:39
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton15:40
-!- udono(~udono@tmo-107-169.customers.d1-online.com) has joined #tryton17:07
-!- JosDzG(~Thunderbi@fixed-203-141-189-203-141-123.iusacell.net) has joined #tryton17:16
-!- bvillasanti(~bvillasan@138.117.21.154) has joined #tryton17:41
-!- JosDzG(~Thunderbi@fixed-203-141-189-203-141-123.iusacell.net) has joined #tryton18:31
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton19:11
-!- prayashm(~prayashm@unaffiliated/prayashm) has joined #tryton19:25
-!- perilla(~perilla@190.57.169.210) has joined #tryton19:36
-!- JosDzG(~Thunderbi@fixed-203-141-189-203-141-123.iusacell.net) has joined #tryton19:42
-!- kstenger(~karla@r186-54-47-203.dialup.adsl.anteldata.net.uy) has joined #tryton20:04
-!- kstenger(~karla@r186-54-47-203.dialup.adsl.anteldata.net.uy) has joined #tryton22:14
-!- pokoli(~pokoli@2001:41d0:1:9acb::1) has joined #tryton22:28
-!- leio(~leio@gentoo/developer/leio) has joined #tryton22:28
-!- JosDzG(~Thunderbi@fixed-203-141-189-203-141-123.iusacell.net) has joined #tryton22:36

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