IRC logs of #tryton for Wednesday, 2012-06-27

chat.freenode.net #tryton log beginning Wed Jun 27 00:00:01 CEST 2012
luc_Hi, i have a question, I was reading the documentation but there is not answer there. How can I link a Button to a Python function?03:21
-!- ccomb(~ccomb@men75-7-82-239-165-22.fbx.proxad.net) has left #tryton10:38
-!- pjstevns(~pjstevns@nfg3.nfgs.net) has left #tryton16:01
lukiohello, I create a field into my Product model, and I only want to see it, when my category of the product is 'TERCEROS', but I don't understand how to ask it using PYSON. any idea? thanks! my pastebin -> http://pastebin.com/WMRdnLzM17:29
cedklukio: Eval('category') will return the id not the name17:49
cedklukio: so you must convert 'TERCEROS' into an id17:49
cedklukio: you can use the PYSON.Id if the category is created via XML17:49
lukiook. first i have to create the category TERCEROS, and then, check how to ask it using the function Id()18:51
lukiodo u have any example of creating the category TERCEROS using xml ?18:52
cedklukio: no but it is like any record18:53
lukiook, now i create a my category using XML -> http://pastebin.com/WMRdnLzM19:28
lukiohow do i ask for my category using the function Id() ?19:29
lukioI wrote this --->>  'invisible': Eval('category').in_([Id('product.category', 'cat_terceros')]),  but throws me an error -->> http://pastebin.com/yxGKryhP19:39
lukiocedk: ?19:39
cedklukio: it must be: Id(<module name>, <xml id>)19:58
lukiocedk: I read the doc, and I didn't think the first argument must be the module name where it's defined the xml.20:25
cedklukio: it is http://doc.tryton.org/2.4/trytond/doc/ref/pyson.html#trytond.pyson.Id21:04
-!- newzen(~newzen@190.199.245.224) has left #tryton21:28

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