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 #tryton00:11
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton01:11
-!- thaneor(~lenovo3@r179-24-154-114.dialup.adsl.anteldata.net.uy) has joined #tryton01:11
-!- Seburath__(bf649377@gateway/web/freenode/ip.191.100.147.119) has joined #tryton02:11
-!- lucascastro(~lucascast@177-185-139-186.isotelco.net.br) has joined #tryton03:11
-!- yangoon1(~mathiasb@i59F4B033.versanet.de) has joined #tryton05:11
-!- mono(~mono@181.137.134.104) has joined #tryton05:11
-!- mono2(~mono@181.137.134.104) has joined #tryton05:11
-!- mono(~mono@181.137.134.104) has joined #tryton05:11
-!- kwmiebach(sid16855@gateway/web/irccloud.com/x-sxfydmckejopzzal) has joined #tryton07:11
-!- JanGB(~jan@dslb-088-075-074-201.088.075.pools.vodafone-ip.de) has joined #tryton07:11
-!- tafelgeschirr(~tafelgesc@5.104.149.54) has joined #tryton07:11
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton08:11
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton08:11
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton08:11
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton08:11
-!- rpit(~rpit@p4FD19D28.dip0.t-ipconnect.de) has joined #tryton09:11
-!- nicoe(~nicoe@2a02:578:858c:500:7e2a:31ff:fe5e:b25d) has joined #tryton09:11
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton10:11
-!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton10:11
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton12:11
-!- mono(~mono@181.137.134.104) has joined #tryton13:11
-!- thaneor1(~lenovo3@r179-25-64-11.dialup.adsl.anteldata.net.uy) has joined #tryton13:11
-!- tafelgeschirr(~tafelgesc@5.104.149.54) has joined #tryton14:11
-!- tafelgeschirr_(~tafelgesc@5.104.149.54) has joined #tryton14:11
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 ?14:11
pokolivmora: the id is avaialbe on self.id for instance methods14:11
vmorapokoli, thanks, but print(self.id) returns <trytond.model.fields.integer.Integer object at 0x7eff4a27d748> and not the value of the id14:11
pokolivmora: then you are in a classmethod and self is poiting to the class instead of the record14:11
pokolivmora: classmethod normally have a second argument which is a list of records14:11
vmorait does, but the list is empty14:11
pokolivmora: on which method you are?14:11
pokolivmora: is the method decorated with Workflow.transition ?14:11
vmorapokoli no decorator on the method14:11
pokolivmora: so how you call it?14:11
vmorafields.Function14:11
vmoraI think14:11
vmorano, actually I have a @classmethod @ModelView.button function...14:11
pokolivmora so when you click on the button in the user interface the client will pass the list of records to the server15:11
pokolivmora: on which view do you have the button?15:11
vmorapokoli form view15:11
pokolivmora: so it should pass the selected record15:11
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 transition15:11
pokolivmora: posting a snippet of your source code using some paste service (i.e: pastebin.com) will allow us to provide better advices15:11
vmorano decorator except for the ModelView.button15:11
vmorapokoli https://pastebin.com/9sBaasw715:11
vmoraI don't get the call cls.get_map(record, 'map')15:11
vmoraif I remove 'map', then the number of arguments if wrong for the call to get_map15:11
vmorapokoli: got it: get_map should be @classmethod15:11
pokolivmora: or you should call it as: record.get_map('map')15:11
vmorapokoli, got it now, my base class  _get_image function was a @classmethod, it should'nt have15:11
vmorapokoli thanks a lot15:11
pokolivmora: you're welcome!15:11
-!- mariomop(~quassel@186.153.190.249) has joined #tryton15:11
-!- csotelo(~csotelo@181.64.192.215) has joined #tryton16:11
-!- mono(~mono@201.184.144.165) has joined #tryton16:11
-!- csotelo_(~csotelo@190.232.110.6) has joined #tryton18:11
-!- yangoon(~mathiasb@i59F4B033.versanet.de) has joined #tryton18:11
-!- mono2(~mono@201.184.144.165) has joined #tryton19:11
-!- intart(b334b6f5@gateway/web/freenode/ip.179.52.182.245) has joined #tryton19:11
-!- mono(~mono@201.184.144.165) has joined #tryton20:11
-!- mono(~mono@201.184.144.165) has joined #tryton20:11
-!- mono2(~mono@190.7.112.31) has joined #tryton20:11
-!- nicoe(~nicoe@2a02:578:858c:500:7e2a:31ff:fe5e:b25d) has joined #tryton20:11
-!- rpit(~rpit@p200300C88F34F900FFAD08C9FBE63E32.dip0.t-ipconnect.de) has joined #tryton21:11
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton22:11

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