chat.freenode.net #tryton log beginning Fri Jan 26 00:00:02 CET 2018 | ||
2018-01-26 01:32 -!- cdchapman(~perturbed@73.98.169.103) has joined #tryton | ||
2018-01-26 02:27 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | ||
2018-01-26 02:30 -!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton | ||
2018-01-26 03:36 -!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton | ||
2018-01-26 04:41 -!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton | ||
2018-01-26 04:48 -!- thaneor(~ldlc6@r167-56-50-201.dialup.adsl.anteldata.net.uy) has joined #tryton | ||
2018-01-26 05:45 -!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton | ||
2018-01-26 06:51 -!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton | ||
2018-01-26 06:55 -!- _2cadz(~2cadz@82.64.14.213) has joined #tryton | ||
2018-01-26 07:55 -!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton | ||
2018-01-26 08:10 -!- tbruyere(~smuxi@mail.saluc.com) has joined #tryton | ||
2018-01-26 08:12 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | ||
2018-01-26 08:33 -!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton | ||
2018-01-26 08:57 -!- zmijunkie(~Adium@b2b-78-94-52-226.unitymedia.biz) has joined #tryton | ||
2018-01-26 09:01 -!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton | ||
2018-01-26 09:02 -!- mrichez(~smuxi@mail.saluc.com) has joined #tryton | ||
2018-01-26 09:05 -!- rpit(~rpit@dslb-084-061-020-184.084.061.pools.vodafone-ip.de) has joined #tryton | ||
2018-01-26 09:46 -!- tbruyere(~smuxi@mail.saluc.com) has joined #tryton | ||
2018-01-26 09:48 -!- tbruyere(~smuxi@mail.saluc.com) has joined #tryton | ||
2018-01-26 10:04 <pokoli> cedk: do you want some help for https://codereview.tryton.org/40051002 ? | ||
2018-01-26 10:06 -!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton | ||
2018-01-26 10:09 <cedk> pokoli: not particulary | ||
2018-01-26 10:40 -!- fmorato(~savumies@mobile-access-6df03c-245.dhcp.inet.fi) has joined #tryton | ||
2018-01-26 11:18 -!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton | ||
2018-01-26 11:25 -!- csotelo(~csotelo@190.232.106.34) has joined #tryton | ||
2018-01-26 11:32 -!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton | ||
2018-01-26 12:04 -!- yangoon(~mathiasb@p5DFFB652.dip0.t-ipconnect.de) has joined #tryton | ||
2018-01-26 12:06 -!- swayf(~swayf@host-93-104-202-98.customer.m-online.net) has joined #tryton | ||
2018-01-26 12:07 -!- swayf(~swayf@host-93-104-202-98.customer.m-online.net) has joined #tryton | ||
2018-01-26 12:08 <csotelo> hello 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']), | ||
2018-01-26 12:08 <csotelo> https://pastebin.com/XC5Re4TA | ||
2018-01-26 12:08 <csotelo> any suggest? | ||
2018-01-26 12:10 -!- swayf_(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton | ||
2018-01-26 12:10 <pokoli> csotelo: you are missing the __name__ attribute on the class to indicate which model you are modifing | ||
2018-01-26 12:11 <pokoli> csotelo: and when inheriting from an exsiting model is not required to have a subclass of ModelSQL nor ModelView | ||
2018-01-26 12:11 <pokoli> csotelo: just simply use the trytond.pool.PoolMeta as metaclass for the class | ||
2018-01-26 12:13 -!- Artem(b0430418@gateway/web/freenode/ip.176.67.4.24) has joined #tryton | ||
2018-01-26 12:28 <csotelo> pokoli, I just copy the class name and method in order on reduce code | ||
2018-01-26 12:29 <csotelo> I mean, the text "__name__ = 'gnuhealth.patient.rounding'" is ok, just taknen off for the class definition | ||
2018-01-26 12:29 <csotelo> sorry for | ||
2018-01-26 12:30 <csotelo> taken off for the paste bin | ||
2018-01-26 12:30 <csotelo> by the way, about the PoolMeta | ||
2018-01-26 12:30 <csotelo> the 2to3 do something like "class Surgery(metaclass=PoolMeta)" | ||
2018-01-26 12:32 <csotelo> going back my issue, all is working, just the button is invisible status is not being updated | ||
2018-01-26 12:33 <csotelo> original behavior related to health module, 'invisible': ~Eval('state').in_(['draft']),, then since I have added a new selection, I need to change the behavior | ||
2018-01-26 12:34 <csotelo> un fortunatly, it wasent done | ||
2018-01-26 12:34 <csotelo> and no works as I spected | ||
2018-01-26 12:35 <pokoli> csotelo: are you using the lastest gnuhealth version? (which only works on python3) | ||
2018-01-26 12:35 <csotelo> pokoli, yes! | ||
2018-01-26 12:36 <pokoli> pokoli: then the metaclass sintax you posted is correct | ||
2018-01-26 12:36 <pokoli> csotelo: have you added your model on __init__.py and registered with the correct module name? | ||
2018-01-26 12:37 <csotelo> as told you, all is ok, my module have been updated and is working as expected, except I just not got the button behavior | ||
2018-01-26 12:39 <csotelo> I wil paste my whole model | ||
2018-01-26 12:41 <csotelo> pokoli, https://pastebin.com/5NKrQkHM | ||
2018-01-26 12:44 <csotelo> it is weird | ||
2018-01-26 12:45 <pokoli> csotelo: I don't see any issue on it | ||
2018-01-26 12:46 <csotelo> that is why I think is wird | ||
2018-01-26 12:46 <pokoli> csotelo: Have you restarted the server and the client? | ||
2018-01-26 12:46 <csotelo> cls._buttons.update is not updating button | ||
2018-01-26 12:46 <csotelo> yes, both of the | ||
2018-01-26 12:46 <csotelo> first I have updated the module, then the server, then client | ||
2018-01-26 13:18 -!- csotelo(~csotelo@190.232.106.34) has joined #tryton | ||
2018-01-26 13:21 -!- catonano(~user@151.45.37.164) has joined #tryton | ||
2018-01-26 13:46 <fmorato> He was missing the ~ before Eval | ||
2018-01-26 14:07 -!- andrespoliti(~andrespol@250-183-89-200.fibertel.com.ar) has joined #tryton | ||
2018-01-26 14:07 <andrespoliti> hi, is there a way of hiding an action button according to a domain? | ||
2018-01-26 14:12 -!- _2cadz(~2cadz@82.64.14.213) has joined #tryton | ||
2018-01-26 14:16 <pokoli> andrespoliti: you can use the invisible definition with a PYSON to define the conditin | ||
2018-01-26 14:16 -!- csotelo_at_work(~csotelo@179.7.46.181) has joined #tryton | ||
2018-01-26 14:16 <pokoli> andrespoliti: it's used on all base modules to hide transition buttons on non applicable states | ||
2018-01-26 14:17 <andrespoliti> i mean to hide an action in the Launch Action | ||
2018-01-26 14:17 <andrespoliti> not a button in the form | ||
2018-01-26 14:31 -!- Guest98556(~armand@p2E533E58.dip0.t-ipconnect.de) has joined #tryton | ||
2018-01-26 14:41 <andrespoliti> pokoli: is there a way of doing that? | ||
2018-01-26 14:43 <cedk> andrespoliti: no, action are always available | ||
2018-01-26 14:43 <cedk> andrespoliti: otherwise you must use a button | ||
2018-01-26 14:44 <andrespoliti> okey | ||
2018-01-26 14:44 <andrespoliti> thanks | ||
2018-01-26 14:49 -!- csotelo_at_work(~csotelo@179.7.41.241) has joined #tryton | ||
2018-01-26 14:49 <csotelo_at_work> dear comunity | ||
2018-01-26 14:49 <csotelo_at_work> which is the table for manage button states? | ||
2018-01-26 14:49 <csotelo_at_work> thanks | ||
2018-01-26 14:51 <cedk> csotelo_at_work: there is no table, it is in the Model code | ||
2018-01-26 14:52 <csotelo_at_work> I see cedk | ||
2018-01-26 14:52 <fmorato> csotelo_at_work: you were missing the ~ before Eval in your previous question. | ||
2018-01-26 14:52 <csotelo_at_work> I have a part of code that I could make work | ||
2018-01-26 14:53 <csotelo_at_work> it is related to cls._buttons.update method, it is working well on just a part, | ||
2018-01-26 14:53 <csotelo_at_work> but on one button it is no changing behavior | ||
2018-01-26 14:55 <fmorato> csotelo_at_work: In the code you shared earlier it should be ~Eval() instead of Eval() | ||
2018-01-26 14:56 <csotelo_at_work> fmorato, I need this behavior 'end_rounding': { 'invisible': Eval('state').in_([None, 'draft', 'done'])} | ||
2018-01-26 14:56 <csotelo_at_work> I mean , button "end_rounding" must be invisible when state is : None, draft or done | ||
2018-01-26 14:56 <csotelo_at_work> since I have added a new state named 'posted' | ||
2018-01-26 14:57 <csotelo_at_work> it is for patient rounding on gnu health | ||
2018-01-26 14:57 <fmorato> csotelo_at_work: put a '~' before Eval | ||
2018-01-26 14:57 <csotelo_at_work> ok | ||
2018-01-26 15:06 <csotelo_at_work> fmorato, no.. the behavior doesnt chage | ||
2018-01-26 15:06 <csotelo_at_work> I would like to fidn a way to know how it is been understanding on tryton | ||
2018-01-26 15:06 <csotelo_at_work> in order to kow why the button is no changing behavior | ||
2018-01-26 15:12 <fmorato> csotelo_at_work: You should then read the PYSON docs and implementation. | ||
2018-01-26 15:19 -!- hedererjs(~hedererjs@dig50-1-78-222-206-45.fbx.proxad.net) has joined #tryton | ||
2018-01-26 15:29 -!- csotelo_at_work(~csotelo@179.7.41.241) has joined #tryton | ||
2018-01-26 15:29 <csotelo_at_work> sorry, my connection gets broken | ||
2018-01-26 15:30 <csotelo_at_work> I 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 setup | ||
2018-01-26 15:40 <csotelo_at_work> any suggest? | ||
2018-01-26 15:46 <csotelo_at_work> could be a bug? | ||
2018-01-26 15:46 <csotelo_at_work> is there a way to manage dirctly on some place, like database table? | ||
2018-01-26 15:49 <pokoli> csotelo_at_work: no, states are managed on code in order to be overriden | ||
2018-01-26 15:50 <csotelo_at_work> :S | ||
2018-01-26 15:51 <csotelo_at_work> pokoli, any way to debug or follow it? since it looks if the update is no overwritting the bustton state | ||
2018-01-26 15:54 <csotelo_at_work> just for a test, I have donde something like 'invisible': Eval('state').in_(['draft']), having the state == 'posted' | ||
2018-01-26 15:55 <csotelo_at_work> then, my button must not be invisible, however it is still invisible | ||
2018-01-26 15:56 <csotelo_at_work> according this rule | ||
2018-01-26 15:56 <csotelo_at_work> http://hg.savannah.gnu.org/hgweb/health/file/c1dd5ee44c28/tryton/health_nursing/health_nursing.py#l248 | ||
2018-01-26 16:07 <pokoli> csotelo_at_work: you can debug when the client is evaluating it | ||
2018-01-26 16:08 <csotelo_at_work> thmm the only feedback here that I have is that update is no overwritting button :( | ||
2018-01-26 16:14 -!- udono(~udono@185.22.140.130) has joined #tryton | ||
2018-01-26 16:37 -!- meigallodixital(~meigallod@249.135.116.91.static.reverse-mundo-r.com) has joined #tryton | ||
2018-01-26 16:51 -!- thaneor(~ldlc6@r179-24-112-255.dialup.adsl.anteldata.net.uy) has joined #tryton | ||
2018-01-26 16:53 -!- csotelo_at_work(~csotelo@179.43.97.56) has joined #tryton | ||
2018-01-26 16:55 <csotelo_at_work> I guess here [https://hg.tryton.org/trytond/file/4.2/trytond/model/modelview.py#l116] is the button update, right? | ||
2018-01-26 16:56 <csotelo_at_work> probably doing prints could fin de issue | ||
2018-01-26 17:21 <_2cadz> Hi, is there a possiblility to define a domain like this in field definition : [('id', 'in', Eval('user', {}).get('companies', []))] ? | ||
2018-01-26 17:21 <_2cadz> 'user' is not a field but the current user. | ||
2018-01-26 17:23 <pokoli> _2cadz: you have the current user company in the context. That should be Eval('context', {}).get('company', -1) | ||
2018-01-26 17:32 <_2cadz> pokoli: Yes I know, but I would like to have the list of companies that the current user can choose as current companies. | ||
2018-01-26 17:32 <pokoli> _2cadz: we usually manage this by access rules (and there you have the user) | ||
2018-01-26 17:33 <cedk> _2cadz: put them in the context | ||
2018-01-26 17:39 -!- fmorato(~savumies@linux-finland.cryptostorm.net) has joined #tryton | ||
2018-01-26 17:46 -!- swayf(~swayf@host-93-104-202-98.customer.m-online.net) has joined #tryton | ||
2018-01-26 18:00 <_2cadz> cedk: how i can make that ? is there an example somewhere ? | ||
2018-01-26 18:08 <cedk> _2cadz: in res/user.py: User has an attribute to define field that must be in the context | ||
2018-01-26 18:16 <_2cadz> cedk: you talk about : _context_fields ? | ||
2018-01-26 18:20 -!- cdchapman(~perturbed@73.98.169.159) has joined #tryton | ||
2018-01-26 18:23 <cedk> _2cadz: yes | ||
2018-01-26 18:25 <_2cadz> cedk: Thanks. | ||
2018-01-26 18:31 <csotelo_at_work> pokoli, I couldnt find the way on solve or find how to solve, could be useful share my tryton.cfg? | ||
2018-01-26 18:59 -!- zmijunkie(~Adium@200116b80af3080024db1c4735765520.dip.versatel-1u1.de) has joined #tryton | ||
2018-01-26 19:52 -!- cdchapman(~perturbed@73.98.169.230) has joined #tryton | ||
2018-01-26 19:59 <fmorato> I've noticed that there is a multiselection widget. How can I have a multiselection field? | ||
2018-01-26 20:07 -!- swayf(~swayf@ipbcc14f49.dynamic.kabel-deutschland.de) has joined #tryton | ||
2018-01-26 20:51 -!- zmijunkie(~Adium@i577B33F6.versanet.de) has joined #tryton | ||
2018-01-26 21:09 -!- zmijunkie(~Adium@i577B33F6.versanet.de) has joined #tryton | ||
2018-01-26 21:45 -!- cdchapman(~perturbed@73.98.169.180) has joined #tryton | ||
2018-01-26 22:01 -!- semarie_(~semarie@unaffiliated/semarie) has joined #tryton | ||
2018-01-26 22:55 -!- cdchapman(~perturbed@73.98.169.113) has joined #tryton | ||
2018-01-26 22:59 -!- mariomop(~quassel@181.90.157.194) has joined #tryton | ||
2018-01-26 23:19 -!- catonano(~user@151.45.37.164) has joined #tryton | ||
2018-01-26 23:27 -!- cdchapman(~perturbed@73.98.169.113) has joined #tryton | ||
2018-01-26 23:37 -!- NeonKing(~Neonking@176.179.38.86) has joined #tryton | ||
2018-01-26 23:45 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!