IRC logs of #tryton for Thursday, 2018-11-15

chat.freenode.net #tryton log beginning Thu Nov 15 00:00:01 CET 2018
-!- csotelo(~csotelo@190.40.232.60) has joined #tryton23:46
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton00:33
-!- thaneor(~lenovo3@r179-24-154-114.dialup.adsl.anteldata.net.uy) has joined #tryton00:40
-!- Seburath__(bf649377@gateway/web/freenode/ip.191.100.147.119) has joined #tryton01:52
-!- lucascastro(~lucascast@177-185-139-186.isotelco.net.br) has joined #tryton02:32
-!- yangoon1(~mathiasb@i59F4B033.versanet.de) has joined #tryton04:00
-!- mono(~mono@181.137.134.104) has joined #tryton04:45
-!- mono2(~mono@181.137.134.104) has joined #tryton04:47
-!- mono(~mono@181.137.134.104) has joined #tryton04:48
-!- kwmiebach(sid16855@gateway/web/irccloud.com/x-sxfydmckejopzzal) has joined #tryton06:00
-!- JanGB(~jan@dslb-088-075-074-201.088.075.pools.vodafone-ip.de) has joined #tryton06:22
-!- tafelgeschirr(~tafelgesc@5.104.149.54) has joined #tryton06:31
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton07:45
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton07:51
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton07:53
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton07:53
-!- rpit(~rpit@p4FD19D28.dip0.t-ipconnect.de) has joined #tryton08:07
-!- nicoe(~nicoe@2a02:578:858c:500:7e2a:31ff:fe5e:b25d) has joined #tryton08:10
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton09:19
-!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton09:50
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton11:28
-!- mono(~mono@181.137.134.104) has joined #tryton12:27
-!- thaneor1(~lenovo3@r179-25-64-11.dialup.adsl.anteldata.net.uy) has joined #tryton12:42
-!- tafelgeschirr(~tafelgesc@5.104.149.54) has joined #tryton13:08
-!- tafelgeschirr_(~tafelgesc@5.104.149.54) has joined #tryton13:09
vmorahi cedk, when a member function of my Model is called, I used to get the record id with `str(self.id)` but this doesn't work anymore, could you plz tell me how to access the id of the record on wich the function is called ?13:26
pokolivmora: the id is avaialbe on self.id for instance methods13:41
vmorapokoli, thanks, but print(self.id) returns <trytond.model.fields.integer.Integer object at 0x7eff4a27d748> and not the value of the id13:48
pokolivmora: then you are in a classmethod and self is poiting to the class instead of the record13:49
pokolivmora: classmethod normally have a second argument which is a list of records13:49
vmorait does, but the list is empty13:49
pokolivmora: on which method you are?13:50
pokolivmora: is the method decorated with Workflow.transition ?13:50
vmorapokoli no decorator on the method13:51
pokolivmora: so how you call it?13:51
vmorafields.Function13:52
vmoraI think13:52
vmorano, actually I have a @classmethod @ModelView.button function...13:58
pokolivmora so when you click on the button in the user interface the client will pass the list of records to the server14:08
pokolivmora: on which view do you have the button?14:09
vmorapokoli form view14:10
pokolivmora: so it should pass the selected record14:13
pokolivmora: are you sure it's not decorated with Worfklow.transition? because this decorator filters the records, only passing the ones that have a valid transition14:14
pokolivmora: posting a snippet of your source code using some paste service (i.e: pastebin.com) will allow us to provide better advices14:14
vmorano decorator except for the ModelView.button14:17
vmorapokoli https://pastebin.com/9sBaasw714:18
vmoraI don't get the call cls.get_map(record, 'map')14:19
vmoraif I remove 'map', then the number of arguments if wrong for the call to get_map14:20
vmorapokoli: got it: get_map should be @classmethod14:22
pokolivmora: or you should call it as: record.get_map('map')14:23
vmorapokoli, got it now, my base class  _get_image function was a @classmethod, it should'nt have14:37
vmorapokoli thanks a lot14:37
pokolivmora: you're welcome!14:42
-!- mariomop(~quassel@186.153.190.249) has joined #tryton14:58
-!- csotelo(~csotelo@181.64.192.215) has joined #tryton15:35
-!- mono(~mono@201.184.144.165) has joined #tryton15:53
-!- csotelo_(~csotelo@190.232.110.6) has joined #tryton17:08
-!- yangoon(~mathiasb@i59F4B033.versanet.de) has joined #tryton17:37
-!- mono2(~mono@201.184.144.165) has joined #tryton18:17
-!- intart(b334b6f5@gateway/web/freenode/ip.179.52.182.245) has joined #tryton18:31
-!- mono(~mono@201.184.144.165) has joined #tryton19:04
-!- mono(~mono@201.184.144.165) has joined #tryton19:11
-!- mono2(~mono@190.7.112.31) has joined #tryton19:18
-!- nicoe(~nicoe@2a02:578:858c:500:7e2a:31ff:fe5e:b25d) has joined #tryton19:46
-!- rpit(~rpit@p200300C88F34F900FFAD08C9FBE63E32.dip0.t-ipconnect.de) has joined #tryton20:08
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton21:01

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!