IRC logs of #tryton for Friday, 2018-01-26

chat.freenode.net #tryton log beginning Fri Jan 26 00:00:02 CET 2018
-!- cdchapman(~perturbed@73.98.169.103) has joined #tryton01:32
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton02:27
-!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton02:30
-!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton03:36
-!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton04:41
-!- thaneor(~ldlc6@r167-56-50-201.dialup.adsl.anteldata.net.uy) has joined #tryton04:48
-!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton05:45
-!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton06:51
-!- _2cadz(~2cadz@82.64.14.213) has joined #tryton06:55
-!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton07:55
-!- tbruyere(~smuxi@mail.saluc.com) has joined #tryton08:10
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton08:12
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton08:33
-!- zmijunkie(~Adium@b2b-78-94-52-226.unitymedia.biz) has joined #tryton08:57
-!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton09:01
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton09:02
-!- rpit(~rpit@dslb-084-061-020-184.084.061.pools.vodafone-ip.de) has joined #tryton09:05
-!- tbruyere(~smuxi@mail.saluc.com) has joined #tryton09:46
-!- tbruyere(~smuxi@mail.saluc.com) has joined #tryton09:48
pokolicedk: do you want some help for https://codereview.tryton.org/40051002 ?10:04
-!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton10:06
cedkpokoli: not particulary10:09
-!- fmorato(~savumies@mobile-access-6df03c-245.dhcp.inet.fi) has joined #tryton10:40
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton11:18
-!- csotelo(~csotelo@190.232.106.34) has joined #tryton11:25
-!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton11:32
-!- yangoon(~mathiasb@p5DFFB652.dip0.t-ipconnect.de) has joined #tryton12:04
-!- swayf(~swayf@host-93-104-202-98.customer.m-online.net) has joined #tryton12:06
-!- swayf(~swayf@host-93-104-202-98.customer.m-online.net) has joined #tryton12:07
csotelohello dear community, I have an iddue with button, Button end_rounding on my module mymodule.health_nursing still having the health_nursing.health_nursing behavior, I mean, it is not been updated from 'invisible': ~Eval('state').in_(['draft']), to 'invisible': Eval('state').in_(['draft', 'done']),12:08
csotelohttps://pastebin.com/XC5Re4TA12:08
csoteloany suggest?12:08
-!- swayf_(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton12:10
pokolicsotelo: you are missing the __name__ attribute on the class to indicate which model you are modifing12:10
pokolicsotelo: and when inheriting from an exsiting model is not required to have a subclass of ModelSQL nor ModelView12:11
pokolicsotelo: just simply use the trytond.pool.PoolMeta as metaclass for the class12:11
-!- Artem(b0430418@gateway/web/freenode/ip.176.67.4.24) has joined #tryton12:13
csotelopokoli, I just copy the class name and method in order on reduce code12:28
csoteloI mean, the text "__name__ = 'gnuhealth.patient.rounding'" is ok, just taknen off for the class definition12:29
csotelosorry for12:29
csotelotaken off for the paste bin12:30
csoteloby the way, about the PoolMeta12:30
csotelothe 2to3 do something like "class Surgery(metaclass=PoolMeta)"12:30
csotelogoing back my issue, all is working, just the button is invisible status is not being updated12:32
csotelooriginal behavior related to health module, 'invisible': ~Eval('state').in_(['draft']),, then since I have added a new selection, I need to change the behavior12:33
csoteloun fortunatly, it wasent done12:34
csoteloand no works as I spected12:34
pokolicsotelo: are you using the lastest gnuhealth version? (which only works on python3)12:35
csotelopokoli, yes!12:35
pokolipokoli: then the metaclass sintax you posted is correct12:36
pokolicsotelo: have you added your model on __init__.py and registered with the correct module name?12:36
csoteloas told you, all is ok, my module have been updated and is working as expected, except  I just not got the button behavior12:37
csoteloI wil paste my whole model12:39
csotelopokoli, https://pastebin.com/5NKrQkHM12:41
csoteloit is weird12:44
pokolicsotelo: I don't see any issue on it12:45
csotelothat is why I think is wird12:46
pokolicsotelo: Have you restarted the server and the client?12:46
csotelocls._buttons.update is not updating button12:46
csoteloyes, both of the12:46
csotelofirst I have updated the module, then the server, then client12:46
-!- csotelo(~csotelo@190.232.106.34) has joined #tryton13:18
-!- catonano(~user@151.45.37.164) has joined #tryton13:21
fmoratoHe was missing the ~ before Eval13:46
-!- andrespoliti(~andrespol@250-183-89-200.fibertel.com.ar) has joined #tryton14:07
andrespolitihi, is there a way of hiding an action button according to a domain?14:07
-!- _2cadz(~2cadz@82.64.14.213) has joined #tryton14:12
pokoliandrespoliti: you can use the invisible definition with a PYSON to define the conditin14:16
-!- csotelo_at_work(~csotelo@179.7.46.181) has joined #tryton14:16
pokoliandrespoliti: it's used on all base modules to hide transition buttons on non applicable states14:16
andrespolitii mean to hide an action in the Launch Action14:17
andrespolitinot a button in the form14:17
-!- Guest98556(~armand@p2E533E58.dip0.t-ipconnect.de) has joined #tryton14:31
andrespolitipokoli: is there a way of doing that?14:41
cedkandrespoliti: no, action are always available14:43
cedkandrespoliti: otherwise you must use a button14:43
andrespolitiokey14:44
andrespolitithanks14:44
-!- csotelo_at_work(~csotelo@179.7.41.241) has joined #tryton14:49
csotelo_at_workdear comunity14:49
csotelo_at_workwhich is the table for manage button states?14:49
csotelo_at_workthanks14:49
cedkcsotelo_at_work: there is no table, it is in the Model code14:51
csotelo_at_workI see cedk14:52
fmoratocsotelo_at_work: you were missing the ~ before Eval in your previous question.14:52
csotelo_at_workI have a part of code that I could make work14:52
csotelo_at_workit is related to cls._buttons.update method, it is working well on just a part,14:53
csotelo_at_workbut on one button it is no changing behavior14:53
fmoratocsotelo_at_work: In the code you shared earlier it should be ~Eval() instead of Eval()14:55
csotelo_at_workfmorato, I need this behavior 'end_rounding': { 'invisible': Eval('state').in_([None, 'draft', 'done'])}14:56
csotelo_at_workI mean , button "end_rounding" must be invisible when state is : None, draft or done14:56
csotelo_at_worksince I have added a new state named 'posted'14:56
csotelo_at_workit is for patient rounding on gnu health14:57
fmoratocsotelo_at_work: put a '~' before Eval14:57
csotelo_at_workok14:57
csotelo_at_workfmorato, no.. the behavior doesnt chage15:06
csotelo_at_workI would like to fidn a way to know how it is been understanding on tryton15:06
csotelo_at_workin order to kow why the button is no changing behavior15:06
fmoratocsotelo_at_work: You should then read the PYSON docs and implementation.15:12
-!- hedererjs(~hedererjs@dig50-1-78-222-206-45.fbx.proxad.net) has joined #tryton15:19
-!- csotelo_at_work(~csotelo@179.7.41.241) has joined #tryton15:29
csotelo_at_worksorry, my connection gets broken15:29
csotelo_at_workI was telling you that I owuld like to find a way to debug button behaviors, since I couldnt way the reason on why the button state update is not being override /updated on my class setup15:30
csotelo_at_workany suggest?15:40
csotelo_at_workcould be a bug?15:46
csotelo_at_workis there a way to manage dirctly on some place, like database table?15:46
pokolicsotelo_at_work: no, states are managed on code in order to be overriden15:49
csotelo_at_work:S15:50
csotelo_at_workpokoli, any way to debug or follow it? since it looks if the update is no overwritting the bustton state15:51
csotelo_at_workjust for a test, I have donde something like 'invisible': Eval('state').in_(['draft']), having the state == 'posted'15:54
csotelo_at_workthen, my button must not be invisible, however it is still invisible15:55
csotelo_at_workaccording this rule15:56
csotelo_at_workhttp://hg.savannah.gnu.org/hgweb/health/file/c1dd5ee44c28/tryton/health_nursing/health_nursing.py#l24815:56
pokolicsotelo_at_work: you can debug when the client is evaluating it16:07
csotelo_at_workthmm the only feedback here that I have is that update is no overwritting button :(16:08
-!- udono(~udono@185.22.140.130) has joined #tryton16:14
-!- meigallodixital(~meigallod@249.135.116.91.static.reverse-mundo-r.com) has joined #tryton16:37
-!- thaneor(~ldlc6@r179-24-112-255.dialup.adsl.anteldata.net.uy) has joined #tryton16:51
-!- csotelo_at_work(~csotelo@179.43.97.56) has joined #tryton16:53
csotelo_at_workI guess here [https://hg.tryton.org/trytond/file/4.2/trytond/model/modelview.py#l116] is the button update, right?16:55
csotelo_at_workprobably doing prints  could fin de issue16:56
_2cadzHi, is there a possiblility to define a domain like this in field definition :  [('id', 'in', Eval('user', {}).get('companies', []))]  ?17:21
_2cadz'user' is not a field but the current user.17:21
pokoli_2cadz: you have the current user company in the context. That should be Eval('context', {}).get('company', -1)17:23
_2cadzpokoli: Yes I know, but I would like to have the list of companies that the current user can choose as current companies.17:32
pokoli_2cadz: we usually manage this by access rules (and there you have the user)17:32
cedk_2cadz: put them in the context17:33
-!- fmorato(~savumies@linux-finland.cryptostorm.net) has joined #tryton17:39
-!- swayf(~swayf@host-93-104-202-98.customer.m-online.net) has joined #tryton17:46
_2cadzcedk: how i can make that ? is there an example somewhere ?18:00
cedk_2cadz: in res/user.py: User has an attribute to define field that must be in the context18:08
_2cadzcedk: you talk about : _context_fields ?18:16
-!- cdchapman(~perturbed@73.98.169.159) has joined #tryton18:20
cedk_2cadz: yes18:23
_2cadzcedk: Thanks.18:25
csotelo_at_workpokoli, I couldnt find the way on solve or find how to solve, could be useful share my tryton.cfg?18:31
-!- zmijunkie(~Adium@200116b80af3080024db1c4735765520.dip.versatel-1u1.de) has joined #tryton18:59
-!- cdchapman(~perturbed@73.98.169.230) has joined #tryton19:52
fmoratoI've noticed that there is a multiselection widget. How can I have a multiselection field?19:59
-!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton20:07
-!- zmijunkie(~Adium@i577B33F6.versanet.de) has joined #tryton20:51
-!- zmijunkie(~Adium@i577B33F6.versanet.de) has joined #tryton21:09
-!- cdchapman(~perturbed@73.98.169.180) has joined #tryton21:45
-!- semarie_(~semarie@unaffiliated/semarie) has joined #tryton22:01
-!- cdchapman(~perturbed@73.98.169.113) has joined #tryton22:55
-!- mariomop(~quassel@181.90.157.194) has joined #tryton22:59
-!- catonano(~user@151.45.37.164) has joined #tryton23:19
-!- cdchapman(~perturbed@73.98.169.113) has joined #tryton23:27
-!- NeonKing(~Neonking@176.179.38.86) has joined #tryton23:37
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton23:45

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