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

chat.freenode.net #tryton log beginning Thu Jun 23 00:00:02 CEST 2016
2016-06-23 00:20 -!- pelox_(~rail@gusl/staff/risturiz) has joined #tryton
2016-06-23 03:03 -!- pokoli(~pokoli@2001:41d0:1:9acb::1) has joined #tryton
2016-06-23 07:15 -!- prayashm(~prayashm@unaffiliated/prayashm) has joined #tryton
2016-06-23 07:19 -!- frispete_(~frispete@p54A91249.dip0.t-ipconnect.de) has joined #tryton
2016-06-23 07:45 -!- zmijunkie(~Adium@i59F5C93C.versanet.de) has joined #tryton
2016-06-23 08:21 -!- rpit(~rpit@2a02:908:e672:9420:56ee:75ff:fe0d:d3c7) has joined #tryton
2016-06-23 08:24 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2016-06-23 08:52 -!- mrichez(~smuxi@mail.saluc.com) has joined #tryton
2016-06-23 09:08 -!- udono(~udono@tmo-113-169.customers.d1-online.com) has joined #tryton
2016-06-23 09:14 -!- frispete(~frispete@p54A91249.dip0.t-ipconnect.de) has joined #tryton
2016-06-23 09:18 -!- michale(caa0a538@gateway/web/freenode/ip.202.160.165.56) has joined #tryton
2016-06-23 09:19 <michale> hello
2016-06-23 09:19 <michale> how will I get context?
2016-06-23 09:21 <pokoli> michale: hi, which context? what are you trying to achieve?
2016-06-23 09:22 <michale> I mean user preferences
2016-06-23 09:22 <cedk> I think we should write a description for http://doc.tryton.org/4.0/trytond/doc/ref/transaction.html?highlight=context#trytond.transaction.Transaction.context
2016-06-23 09:24 <cedk> michale: User.get_preferences
2016-06-23 09:24 <cedk> michale: with argument context_only=True
2016-06-23 09:28 <michale> is this http://pastebin.com/ewbgCmV5 good?
2016-06-23 09:30 <cedk> michale: no, I said argument must be True not a dict
2016-06-23 09:31 <cedk> michale: and also JSON-RPC call must always have a context as last argument
2016-06-23 09:32 <michale> can you please correct my JSON RPC call?
2016-06-23 09:33 <michale> I am just trying to get preference that's why I am not append context in this call as well as login
2016-06-23 09:33 <michale> as same as login
2016-06-23 09:33 <cedk> michale: login is special call without context
2016-06-23 09:34 -!- dj_xatra(~dj_xatra@217.166.83.130) has joined #tryton
2016-06-23 09:34 <michale> isn't it this also because I am just trying to context via this call?
2016-06-23 09:35 <michale> after this call only, I am able to set context for next calls
2016-06-23 09:35 <michale> Am I right?
2016-06-23 09:35 <cedk> no
2016-06-23 09:36 <michale> isn't it preference == context?
2016-06-23 09:39 -!- frispete(~frispete@p54A91249.dip0.t-ipconnect.de) has joined #tryton
2016-06-23 10:30 <cedk> pokoli: do you plan to write the doc?
2016-06-23 10:30 <pokoli> cedk: which doc?
2016-06-23 10:30 <cedk> pokoli: for triggers
2016-06-23 10:30 <pokoli> cedk: not now
2016-06-23 10:31 <cedk> pokoli: OK, I will maybe
2016-06-23 10:31 <pokoli> cedk: ok, at least I will review it :)
2016-06-23 10:38 -!- frispete(~frispete@p54A91249.dip0.t-ipconnect.de) has joined #tryton
2016-06-23 10:40 -!- nicoe(~nicoe@balisto.wifi.b2ck.com) has joined #tryton
2016-06-23 10:41 -!- michale(caa0a538@gateway/web/freenode/ip.202.160.165.56) has joined #tryton
2016-06-23 10:41 <michale> isn't it preference == context?
2016-06-23 10:42 <cedk> michale: it is what the client does
2016-06-23 10:44 <michale> so both are different?
2016-06-23 10:46 <cedk> michale: I don't understand the question
2016-06-23 10:47 <cedk> michale: context is a mechanism, you can fill it with what you want but the client fill it with get_preferences
2016-06-23 10:47 <michale> my question is this http://pastebin.com/ewbgCmV5 correct? I understand preference == context,right?
2016-06-23 10:48 <michale> get_preference used to get context,right?
2016-06-23 10:49 <cedk> michale: I already told you that it is wrong, arguments must be True and a context
2016-06-23 10:49 <michale> then how can I get context?
2016-06-23 10:50 <cedk> michale: you put whatever you want
2016-06-23 10:50 <cedk> michale: the client uses an empty dict
2016-06-23 10:53 <michale> now http://pastebin.com/m5NpYKdR?
2016-06-23 10:53 <michale> now http://pastebin.com/m5NpYKdR ?
2016-06-23 11:00 <michale> cedk, sorry to disturb you, are you there?
2016-06-23 11:03 <cedk> michale: and where the True parameters?
2016-06-23 11:05 <michale> can you just correct me? I don't understand where to put it
2016-06-23 11:07 <cedk> michale: did you look at the method?
2016-06-23 11:10 <michale> here nothing is menthion
2016-06-23 11:10 <michale> here nothing is mention* http://doc.tryton.org/3.2/trytond/doc/ref/transaction.html?highlight=transaction#trytond.transaction.Transaction.user
2016-06-23 11:11 -!- sisalp(~sisalpuse@boxoo.sisalp.net) has joined #tryton
2016-06-23 11:17 <cedk> michale: I'm talking about the method User.get_preferences
2016-06-23 11:18 -!- frispete(~frispete@p54A91249.dip0.t-ipconnect.de) has joined #tryton
2016-06-23 11:21 <michale> no sorry I am not able find it
2016-06-23 11:21 <cedk> michale: to find method you can use: http://linux.die.net/man/1/grep
2016-06-23 11:22 <prayashm> Why does exporting a CSV append a blank line at the end of the file?
2016-06-23 11:25 <michale> are you talking about this http://doc.tryton.org/3.2/trytond/trytond/modules/account_asset/tests/scenario_account_asset.html?highlight=get_preferences ?
2016-06-23 11:25 <pokoli> prayashm: it does not export any blank line on my case
2016-06-23 11:26 <cedk> michale: no it is not documented but Python is made to be read
2016-06-23 11:26 <pokoli> prayashm: are you sure you are not exporting a record with all the fields you selected as blank?
2016-06-23 11:28 <prayashm> pokoli: Yes, I haven't selected any blank records
2016-06-23 11:28 <prayashm> pokoli: I am default branch. Version 4.1.0
2016-06-23 11:29 <michale> now http://pastebin.com/tZCSkbjy ?
2016-06-23 11:29 <prayashm> pokoli: s/am/am on/
2016-06-23 11:31 <pokoli> prayashm: me to, are you opening the file directly or saving it to your drive?
2016-06-23 11:32 <prayashm> pokoli: I am saving it on my drive.
2016-06-23 11:33 <cedk> prayashm: is not just your viewer who display the '\r\n' ?
2016-06-23 11:34 <cedk> michale: did you test it?
2016-06-23 11:34 <prayashm> cedk: I think it is
2016-06-23 11:35 <michale> yes, it gives me dictionary
2016-06-23 11:35 <prayashm> cedk: This happens when I open the file with Sublime Text / Nano / PapaParse
2016-06-23 11:36 <prayashm> I did a cat file.csv. That showed correctly
2016-06-23 11:36 <pokoli> prayashm: so it's your editor/paparse that does not show it correctly :)
2016-06-23 11:36 <pokoli> prayashm: I see it correctly in vim also
2016-06-23 11:37 <pokoli> prayashm: and I can confirm it is not correctly shown in nano
2016-06-23 11:37 <michale> as here http://pastebin.com/8EnzszEu
2016-06-23 11:38 <prayashm> pokoli: right
2016-06-23 11:40 <prayashm> cedk pokoli: thank you :)
2016-06-23 11:52 -!- udono(~udono@tmo-113-169.customers.d1-online.com) has joined #tryton
2016-06-23 12:55 -!- mariomop(~quassel@181.110.64.209) has joined #tryton
2016-06-23 13:39 -!- frispete(~frispete@p54A91249.dip0.t-ipconnect.de) has joined #tryton
2016-06-23 14:44 -!- udono(~udono@tmo-113-169.customers.d1-online.com) has joined #tryton
2016-06-23 14:47 -!- kstenger(~karla@r186-55-73-93.dialup.adsl.anteldata.net.uy) has joined #tryton
2016-06-23 15:11 -!- kstenger(~karla@r186-55-73-93.dialup.adsl.anteldata.net.uy) has joined #tryton
2016-06-23 15:28 <mrichez> hello
2016-06-23 15:29 <mrichez> how to get current user employee_id ?
2016-06-23 15:30 <mrichez> i'm trying: if (Eval('_user',{}).get('employee.id') == employee.id)
2016-06-23 15:30 -!- udono(~udono@ip-37-201-245-214.hsi13.unitymediagroup.de) has joined #tryton
2016-06-23 15:31 <cedk> mrichez: _user contains only the id
2016-06-23 15:32 <cedk> mrichez: it is set in the context normally
2016-06-23 15:34 <mrichez> cedk: ok, i see so i should use Transaction().context['employee'] ?
2016-06-23 15:36 <cedk> mrichez: you can
2016-06-23 15:39 <mrichez> cedk: working ! thanks :-)
2016-06-23 15:40 -!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton
2016-06-23 17:07 -!- udono(~udono@tmo-107-169.customers.d1-online.com) has joined #tryton
2016-06-23 17:16 -!- JosDzG(~Thunderbi@fixed-203-141-189-203-141-123.iusacell.net) has joined #tryton
2016-06-23 17:41 -!- bvillasanti(~bvillasan@138.117.21.154) has joined #tryton
2016-06-23 18:31 -!- JosDzG(~Thunderbi@fixed-203-141-189-203-141-123.iusacell.net) has joined #tryton
2016-06-23 19:11 -!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton
2016-06-23 19:25 -!- prayashm(~prayashm@unaffiliated/prayashm) has joined #tryton
2016-06-23 19:36 -!- perilla(~perilla@190.57.169.210) has joined #tryton
2016-06-23 19:42 -!- JosDzG(~Thunderbi@fixed-203-141-189-203-141-123.iusacell.net) has joined #tryton
2016-06-23 20:04 -!- kstenger(~karla@r186-54-47-203.dialup.adsl.anteldata.net.uy) has joined #tryton
2016-06-23 22:14 -!- kstenger(~karla@r186-54-47-203.dialup.adsl.anteldata.net.uy) has joined #tryton
2016-06-23 22:28 -!- pokoli(~pokoli@2001:41d0:1:9acb::1) has joined #tryton
2016-06-23 22:28 -!- leio(~leio@gentoo/developer/leio) has joined #tryton
2016-06-23 22:36 -!- JosDzG(~Thunderbi@fixed-203-141-189-203-141-123.iusacell.net) has joined #tryton

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