IRC logs of #tryton for Friday, 2017-08-11

chat.freenode.net #tryton log beginning Fri Aug 11 00:00:01 CEST 2017
-!- kstenger(~karla@r190-134-132-220.dialup.adsl.anteldata.net.uy) has joined #tryton00:36
-!- csotelo(~csotelo@2001:1388:49c6:f9a5:a328:3589:be40:bafd) has joined #tryton01:54
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton01:57
-!- zmijunkie1(~Adium@p200300CC23C60A00FCABA723E755CB3B.dip0.t-ipconnect.de) has joined #tryton04:03
-!- kstenger1(~karla@r190-134-132-220.dialup.adsl.anteldata.net.uy) has joined #tryton04:28
-!- alexbodn(~alex@213.57.190.189) has joined #tryton04:29
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton07:07
-!- zmijunkie(~Adium@b2b-78-94-52-226.unitymedia.biz) has joined #tryton08:57
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:31
-!- dmollerm(~dmollerm@170.red-80-28-119.staticip.rima-tde.net) has joined #tryton09:41
dmollermHi all! I'm trying to set a trigger but it doesn't work. I debugged a little and found the eval method in ir/trigger.py. It just decodes the trigger condition from json string to python, but doesn't evaluate it. So if condition is not empty, eval will always return True09:44
dmollermIs there any example in a module using this feature?09:44
-!- afibanez(501c77aa@gateway/web/cgi-irc/kiwiirc.com/ip.80.28.119.170) has joined #tryton09:47
-!- udono(~udono@185.22.140.124) has joined #tryton09:52
pokolidmollerm: the tests are using the triggers: http://hg.tryton.org/trytond/file/376b2ee9e6fe/trytond/tests/test_trigger.py09:53
-!- vbastos(~vbastos@120.22.40.130) has joined #tryton09:56
dmollermpokoli: thanks! I wouldn't have made up that by myself09:58
pokolidmollerm: indeed, where the condition is not evaluated?10:06
dmollermpokoli: I wrote a domain, not a pyson statement. The domain casted to true given it was a non empty list.10:07
pokolidmollerm: ok. Since where removed safe_eval (in 3.6 IIRC) everything that must be evaluated must be a pyson statement10:08
dmollermpokoli: indeed I took an example from a 3.4 installation10:10
pokolidmollerm: you should upgrade, 3.4 is not suported for 2 months: http://hg.tryton.org/trytond/rev/8d95540374de10:10
dmollermpokoli: we are working on it, it's no fun being stuck at 3.410:12
vbastosbasic setuptools question: when I run python setup.py install, my module in my virtualenv site-packages is not updated10:18
vbastosany ideas where to look?10:18
vbastosor how to troubleshoot?10:19
dmollermvbastos: no need to say the virtualenv must have been activated. Try uninstalling it first, or increasing the version number. If you are developing I recommend you to install it in editable mode. `pip install -e .`10:21
vbastosthanks @dmollerm10:22
vbastosyes the virtualenv is activated10:22
vbastosI am using distutils to install. If I delete the directory of the module it re-installs fine10:23
vbastosI'm going to try python setup.py develop10:23
pokolidmollerm: just saying in case you where not aware of ;)10:29
-!- thaneor(~ldlc6@179.26.118.46) has joined #tryton10:30
pokolivbastos: the unique diference between install and develop is that install copies the files and develop creates a symlink instead10:30
vbastos@pokoli - yup, I'm trying develop, but I don't have my setup.py file "well formed"10:32
vbastoshttps://twitter.com/tryton_org/status/89265509868546867210:33
vbastosMODULE = "self_storage"10:34
vbastosPREFIX = "trytond"10:34
vbastosin setup.py I have10:34
vbastosoops10:34
vbastosthe 2 lines with variables was a paste10:34
pokolivbastos: you should not use trytond as prefix as it's reserved for standard modules10:37
vbastos@pokoli yes, this module will not be published10:38
-!- nicoe(~nicoe@77.109.118.213) has joined #tryton10:38
pokolivbastos: we also use custom prefix for non published modules :)10:38
vbastos@pokoli I think my issue is my value for package_dir10:39
vbastos{'trytond.modules.%s' % MODULE: '.'}10:40
pokolivbastos: this looks correct to me10:40
-!- savumies(~savumies@82-203-190-122.bb.dnainternet.fi) has joined #tryton10:42
vbastosentry_points="""10:44
vbastos    [trytond.modules]10:44
vbastos    %s = trytond.modules.%s10:44
vbastos    """ % (MODULE, MODULE)10:44
vbastosmaybe entrypoint:10:44
vbastosIOError: File not found : ... lib/python2.7/site-packages/trytond/modules/self_storage/tryton.cfg10:45
pokolivbastos: if you are using develop, make sure the source code matches the module name10:49
pokolivbastos: https://twitter.com/tryton_org/status/87490563769994444810:49
vbastos@pokoli - yup same post10:50
vbastosbut I didn't understand what that meant before10:51
vbastosfrom update_egg_modules() in the trytond module I can understand now that the entry_points value should also be appropriate10:51
vbastosnope ... that entry_points value is correct11:03
pokolivbastos: and the module name?11:04
vbastosin setup()?11:05
vbastosname='%s_%s' % (PREFIX, MODULE),11:05
vbastosthis is strange11:07
vbastosI just ran python setup.py install. I don't get a directory in the trytond modules directory11:08
vbastosyet my module works11:08
pokolivbastos: this is normal11:09
vbastos@pokoli how?11:09
pokolivbastos: you should see the module name (with prefix) on the virtualenv site-packages11:09
pokolivbastos: it's installed as python egg, so tryton reads from there11:09
vbastosyes it is there, but update_egg_modules() only reads from trytond modules folder no?11:09
vbastosso why does it work for python setup.py install but not for python setup.py develop?11:11
pokolivbastos: no it reads from the installed python modules too11:19
pokolivbastos: is the directory where do you have the code name self_storage?11:19
vbastos@pokoli trytond read from installed python modules too because that is what pkg_resources.iter_entry_points('trytond.modules') returns?11:20
vbastos@pokoli the directory where I have the code is trytond_self_storage11:21
vbastos@pokoli thanks for helping. Diner time here so I'll have to try again later11:29
pokolivbastos: if you rename the directory to self_storage, then python setup.py develop should work11:30
dmollermRegarding the pyson evaluation... any hint or example on how to access the values of target relations of the record on which the pyson will be evaluated? E.g, the create_uid of the create_uid of the record?11:30
pokolivbastos: but make sure to unsintall the installed module11:30
pokolivbastos: bon appetit :)(11:30
vbastosmerci11:30
pokolidmollerm: what do you want to access?11:31
dmollermpokoli: In this case, the login of the create_uid11:32
pokolidmollerm: IIRC you should create a functional field that retuns the login11:32
dmollermpokoli: Ah, yes, that will do it. Thanks!11:42
dmollermpokoli: Yet, any chance that pyson could do that by itself in the future?11:43
-!- mariomop(~quassel@181.90.152.146) has joined #tryton13:30
-!- nicoe(~nicoe@77.109.118.213) has joined #tryton13:51
-!- thaneor(~ldlc6@179.26.118.46) has joined #tryton13:51
-!- alexbodn(~alex@213.57.190.189) has joined #tryton14:07
-!- smarro(~sebastian@181.16.7.104) has joined #tryton14:08
-!- kstenger(~karla@r190-134-133-127.dialup.adsl.anteldata.net.uy) has joined #tryton15:39
-!- JosDzG(~Thunderbi@189.250.108.243) has joined #tryton18:20
-!- zmijunkie(~Adium@p5B15351C.dip0.t-ipconnect.de) has joined #tryton18:40
-!- kobain(~kobain@unaffiliated/kobain) has joined #tryton19:45
-!- JosDzG(~Thunderbi@189.250.108.243) has joined #tryton19:57
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton20:25
-!- silwol(silwolmatr@gateway/shell/matrix.org/x-wprcpcbtezukhvfr) has joined #tryton20:32
-!- mariomop(~quassel@181.90.152.146) has joined #tryton20:46
-!- fmorato[m](fmoratomat@gateway/shell/matrix.org/x-esphuayojvdemrfq) has joined #tryton20:56
-!- sim6(sim6matrix@gateway/shell/matrix.org/x-xsqdyvriiiswtayg) has joined #tryton20:56
-!- JosDzG(~Thunderbi@189.250.108.243) has joined #tryton20:59
-!- udono(~udono@185.22.140.124) has joined #tryton21:18
-!- nicoe(~nicoe@77.109.118.213) has joined #tryton21:40
-!- semarie_(~semarie@unaffiliated/semarie) has joined #tryton22:01
-!- silwol(silwolmatr@gateway/shell/matrix.org/x-onuuxvnpgbhgaall) has joined #tryton22:07
-!- fmorato[m](fmoratomat@gateway/shell/matrix.org/x-azbxjxxqzhehtapw) has joined #tryton22:32
-!- sim6(sim6matrix@gateway/shell/matrix.org/x-xnuoeqafrbyypbes) has joined #tryton22:32
-!- thaneor1(~ldlc6@179.26.134.181) has joined #tryton22:33

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