IRC logs of #tryton for Friday, 2017-08-11 #tryton log beginning Fri Aug 11 00:00:01 CEST 2017
-!- kstenger( 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( has joined #tryton04:03
-!- kstenger1( has joined #tryton04:28
-!- alexbodn(~alex@ has joined #tryton04:29
-!- Timitos( has joined #tryton07:07
-!- zmijunkie( has joined #tryton08:57
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:31
-!- dmollerm( 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/ 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/ has joined #tryton09:47
-!- udono(~udono@ has joined #tryton09:52
pokolidmollerm: the tests are using the triggers:
-!- vbastos(~vbastos@ 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:
dmollermpokoli: we are working on it, it's no fun being stuck at 3.410:12
vbastosbasic setuptools question: when I run python 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 develop10:23
pokolidmollerm: just saying in case you where not aware of ;)10:29
-!- thaneor(~ldlc6@ 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 file "well formed"10:32
vbastosMODULE = "self_storage"10:34
vbastosPREFIX = "trytond"10:34
vbastosin I have10: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@ 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( has joined #tryton10:42
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
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 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 install but not for python 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 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
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@ has joined #tryton13:30
-!- nicoe(~nicoe@ has joined #tryton13:51
-!- thaneor(~ldlc6@ has joined #tryton13:51
-!- alexbodn(~alex@ has joined #tryton14:07
-!- smarro(~sebastian@ has joined #tryton14:08
-!- kstenger( has joined #tryton15:39
-!- JosDzG(~Thunderbi@ has joined #tryton18:20
-!- zmijunkie( has joined #tryton18:40
-!- kobain(~kobain@unaffiliated/kobain) has joined #tryton19:45
-!- JosDzG(~Thunderbi@ has joined #tryton19:57
-!- Telesight( has joined #tryton20:25
-!- silwol(silwolmatr@gateway/shell/ has joined #tryton20:32
-!- mariomop(~quassel@ has joined #tryton20:46
-!- fmorato[m](fmoratomat@gateway/shell/ has joined #tryton20:56
-!- sim6(sim6matrix@gateway/shell/ has joined #tryton20:56
-!- JosDzG(~Thunderbi@ has joined #tryton20:59
-!- udono(~udono@ has joined #tryton21:18
-!- nicoe(~nicoe@ has joined #tryton21:40
-!- semarie_(~semarie@unaffiliated/semarie) has joined #tryton22:01
-!- silwol(silwolmatr@gateway/shell/ has joined #tryton22:07
-!- fmorato[m](fmoratomat@gateway/shell/ has joined #tryton22:32
-!- sim6(sim6matrix@gateway/shell/ has joined #tryton22:32
-!- thaneor1(~ldlc6@ has joined #tryton22:33

Generated by 2.11.0 by Marius Gedminas - find it at!