IRC logs of #tryton for Thursday, 2016-07-28

chat.freenode.net #tryton log beginning Thu Jul 28 00:00:01 CEST 2016
-!- JosDzG(~Thunderbi@fixed-188-72-187-188-72-36.iusacell.net) has joined #tryton00:44
-!- shrox(shrox@nat/iiit/x-yrfhjryjmhukiwrn) has joined #tryton01:14
-!- shrox(shrox@nat/iiit/x-zidmmthkeefggjld) has joined #tryton01:24
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton01:28
-!- robink_(~quassel@unaffilated/robink) has joined #tryton01:34
-!- robink_(~quassel@unaffilated/robink) has joined #tryton03:10
-!- robink_(~quassel@unaffilated/robink) has joined #tryton04:24
-!- shrox(shrox@nat/iiit/x-enxtxsajjwwtoauw) has joined #tryton05:00
-!- prayashm(~prayashm@103.194.233.35) has joined #tryton06:02
-!- prayashm(~prayashm@unaffiliated/prayashm) has joined #tryton06:02
-!- prayashm(~prayashm@unaffiliated/prayashm) has joined #tryton07:21
-!- shrox(shrox@nat/iiit/x-okibfudpuzgwptbs) has joined #tryton07:51
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton07:51
-!- aasnan(~angel@91.red-88-5-177.dynamicip.rima-tde.net) has joined #tryton08:04
-!- dj_xatra(~dj_xatra@217.166.83.130) has joined #tryton08:13
-!- gytis(~gytis@v100.nfq.lt) has joined #tryton08:16
-!- rpit(~rpit@aftr-37-24-145-166.unity-media.net) has joined #tryton08:27
-!- afibanez(~afibanez@170.red-80-28-119.adsl.static.ccgg.telefonica.net) has joined #tryton08:36
-!- aasnan(~angel@91.red-88-5-177.dynamicip.rima-tde.net) has left #tryton08:44
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton08:47
-!- xcodinas(~xcodinas@unaffiliated/xcodinas) has joined #tryton08:49
-!- tbruyere(~smuxi@mail.saluc.com) has joined #tryton08:51
-!- meigallodixital(~meigallod@188.72.113.45) has joined #tryton09:19
-!- nicoe(~nicoe@balisto.wifi.b2ck.com) has joined #tryton09:54
pokolicedk: do you want a separate commit for tests in https://tryton-rietveld.appspot.com/21171002/  ?10:00
cedkpokoli: yes10:06
xcodinascedk: I tried to push issue25461002 and i'm not allowed yet10:08
cedkxcodinas: and now?10:10
xcodinascedk: Pushed! Thanks.10:14
-!- gytis(~gytis@v100.nfq.lt) has joined #tryton10:33
cedkshrox: when you update the codereview, could you put a description. It eases the reviewing process10:36
cedkshrox: also do not forget to fix the flake8 errors10:36
gytisHello, I have strange behavior with Tryton client. I have this code: http://pastebin.com/Y1ZD2xYD which dynamically generates a list for party_category when assigned_employee is changing. On tryton client 3.4.1 it worked very well, but when I updated it to 3.4.9, selection list has an empty item at the end of the list on the GUI. When I select something, then selection list is correct and empty item disappears. Any ideas?10:44
cedkgytis: this is strange that it ever worked10:47
cedkgytis: you can not use the selection method as on_change_with method, they have different returned type10:48
cedkgytis: the on_change_with must return a string10:48
gytiscedk, so I think my code is incorrect - selection requires a list, but on_change_with returns a string only. Is other way to implement dynamic selection?11:00
cedkgytis: you can use a Many2One with a domain11:02
cedkgytis: which will be better because you will have foreign key constraint11:03
xcodinascedk: I'm not sure how to manage that https://tryton-rietveld.appspot.com/32361002/diff/1/src/view/calendar.js#newcode6511:10
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton11:24
xcodinascedk: nvm11:26
cedkxcodinas: I do not know what is accepted by FullCalendar11:27
gytiscedk, is anywhere more complicated example of how domain should be written when a field depends on the other selected field? On my codebase I can find simple examples like ('company', '=', Eval('company')) or ('type', '!=', 'service'), but nothing more complicated...11:38
cedkgytis: do not understand the question11:45
gytiscedk, let's say I have modified field which now looks like http://pastebin.com/zQV1wHsg . The darkest point of this code for me is domain. Current domain ('id', '=', 1) is super simple and works as expected. Other examples on the codebase are also easy, for example, ('company', '=', Eval('company')) or ('type', '!=', 'service'). The problem I'm solving is - how to get party categories of the selected employee. I can access these categories in the previous code11:58
gytislike this: self.assigned_employee.party.categories, but I don't know how to rewrite it using a domain. It looks very difficult..11:58
cedkgytis: you have to create a Function field that brings to the record the needed values12:01
gytiscedk, brilliant idea, I will try that!12:02
pokolihi, is possible to run trytond sources with python3 ?12:29
cedkpokoli: yes convert it with 2to312:30
pokolicedk: worked, thanks. I was sure i was missing anything as it worked well with pip install but not from sources12:35
-!- mariomop(~quassel@181.94.13.136) has joined #tryton12:59
-!- shrox(shrox@nat/iiit/x-bxwxtgpkkrfidhdp) has joined #tryton13:16
-!- shrox(shrox@nat/iiit/x-didwmibjnmoujfrf) has joined #tryton13:18
-!- shrox(shrox@nat/iiit/x-jcjymkhbwyyhfpnu) has joined #tryton13:19
-!- shrox(shrox@nat/iiit/x-cgkhyvgbftzknpfp) has joined #tryton13:20
-!- shrox(shrox@nat/iiit/x-sxhffmzqwytwqqyn) has joined #tryton13:22
-!- shrox(shrox@nat/iiit/x-bowtipyvkmqktglh) has joined #tryton13:23
-!- shrox(shrox@nat/iiit/x-cnnvtqhibfslasam) has joined #tryton13:24
-!- shrox(shrox@nat/iiit/x-zhmxznborimolhaf) has joined #tryton13:27
-!- shrox(shrox@nat/iiit/x-zpjgjoejgxuqjkgl) has joined #tryton13:28
-!- shrox(shrox@nat/iiit/x-nmtiugpjqzqhzjab) has joined #tryton13:37
-!- shrox(shrox@nat/iiit/x-obxjodveqkqvmeke) has joined #tryton13:40
-!- shrox(shrox@nat/iiit/x-bldiopishrbplynq) has joined #tryton13:42
-!- tbruyere(~smuxi@mail.saluc.com) has joined #tryton14:21
prayashmI was searching on how to implement the "save" option in exports14:24
prayashmseems there are two ways that can be done:14:24
prayashm1) Use FileSaver Interface (with a fallback like https://github.com/eligrey/FileSaver.js/) to be able to save the file with a name from the user14:25
prayashm2) Since we are already showing a dialog mentioning the number of records generated, we can put a link in the same dialog using html5 "download" attribute to specify the name of the file. Clicking the link would download the file with the user provided name14:26
prayashmwhich one should we go with?14:28
cedkprayashm: what do you mean by "html5 download"?14:32
prayashmWhen use the blob url like <a href="blob_url" download="filename.csv"> it will be downloaded with the specified file name14:33
cedkprayashm: this one, I prefer to rely less possible on external library14:34
prayashmcedk: okay then. :)14:35
cedkprayashm: indeed, I think it is better to just let the browser open the blob url14:37
cedkprayashm: we do not need to duplicate the open/save option of tryton but just let the browser manage it14:37
prayashmcedk: you mean, I'll remove the open/save option. And just let the browser handle the blob url?14:38
cedkprayashm: yes14:38
prayashmcedk: will do that then.14:39
-!- tbruyere(~smuxi@mail.saluc.com) has joined #tryton15:16
-!- shrox(shrox@nat/iiit/x-mbzdfojxrcolzgsf) has joined #tryton16:40
-!- JosDzG(~Thunderbi@fixed-188-72-187-188-72-36.iusacell.net) has joined #tryton16:55
gytiscedk, I'm trying to create dynamic list of the party category, but unfortunately I'm missing something.. I changed type of party_category from Selection to Many2One, which should be depend on assigned_employee_party_categories functional field. When I change assigned_employee on GUI, should method get_assigned_employee_party_categories to be called? I think I'm missing on_change_with_* method, but unfortunately it can return string only.17:15
gytishttp://pastebin.com/dQp6Lqn917:15
pokoligytis: you can use the selection_change_with for that http://doc.tryton.org/4.0/trytond/doc/ref/models/fields.html?highlight=selection_change_with#trytond.model.fields.Selection.selection_change_with17:17
pokoligytis: or use a many2one with domain17:18
pokoligytis: you should implement the function field as on_change_with17:20
cedkgytis: the best is to change the method get_assigned_employee_party_categories into on_change_with_assigned_employee_party_categories17:20
gytiswoohoo! it works!!! Thanks!!! ;)17:24
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton17:30
-!- shrox(shrox@nat/iiit/x-gqfpqvxrijumyzhr) has joined #tryton17:46
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton20:51
-!- JosDzG(~Thunderbi@fixed-188-72-187-188-72-36.iusacell.net) has joined #tryton23:01

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