IRC logs of #tryton for Saturday, 2008-09-27

chat.freenode.net #tryton log beginning Sat Sep 27 00:00:01 CEST 2008
-!- yangoon(n=mathiasb@p549F5926.dip.t-dialin.net) has joined #tryton05:18
-!- Timitos(n=Timitos@88.217.184.172) has joined #tryton08:29
CIA-52tryton: udono roundup * #400/trytond documentation: missing prefix on search result links: [new] There is a missing ".html" prefix for search-results in the documentation. Whe I serch for "create" I get this result: file:///home/uspallek ...11:22
-!- b52laptop(n=b52lapto@41.249.250.195) has joined #tryton11:37
-!- yangoon(n=mathiasb@p549F5926.dip.t-dialin.net) has joined #tryton13:55
-!- cedk(n=ced@gentoo/developer/cedk) has joined #tryton16:30
udonohello cedk17:06
udonocedk: question about invisible ==17:07
cedkudono: yes17:09
udonocedk: I like to check in a Many2One list but it doesnt work http://paste.pocoo.org/show/86356/17:12
udonocedk: I know that type is just an id and this cant equal with a string "Person"17:13
udonocedk: I tryed out states={"invisible": "type.name != 'Person'"} and states={"invisible": "type.type != 'Person'"} but they dont work.17:14
udonocedk: did I need an helping fuctional field, which maps the ids of type to their names?17:14
cedkudono: that doesn't work17:14
udonocedk: No way possible?17:15
cedkudono: I think that if you need to provide functionnality based on the type value, you must use a Selection instead of many2one17:15
udonocedk: Yes, I had. But for the sake of genericity and better API I like to have a One2Many...17:16
udonosorry Many2One...17:17
cedkudono: why ?17:17
cedkudono: if for each type, you must have code developped , it is not true17:17
cedkudono: the use of many2one allow just that the user can create his own type17:18
cedkudono: and as I see, you want to have specific code depending of the type17:18
cedkudono: so users can not really create his own type17:18
udonocedk: Yes, of course you need to develop code for each type. If you want to make something in online service, you get another party_type for ip connections. With a Many2One jou just inherit the partymodule bring in your code and bring the new type with an XML.17:19
udonocedk: The type will be writeonly for XML.17:20
cedkudono: that is wrong17:20
udonocedk: why17:20
cedkudono: use a Selection and add selection by inherit17:20
cedkudono: because you need to know your types and with a many2one, you can not17:21
cedkudono: one proof, is that in your code you use the name "Person"17:21
udonocedk: Ai, thats possible? Even if I dont know which modules are inserted and changeing the selection?17:21
cedkudono: yes of course, in the __init__17:21
udonocedk: so its possible to add just another element to a selection, and let the old ones stay?17:22
cedkudono: you just need to take too set a copy of type.selection, add the field and replace the original type.selection17:23
udonocedk: but what with inheritance of other modules which change the selection?17:24
cedkudono: so someting like that: type.selection = type.selection[:] + [('new_type', 'New Type')]17:24
udonocedk: ok, this looks good17:24
cedkudono: they will add their type and that is all17:24
udonocedk: Thanks a lot.17:25
cedkudono: the only thing is that you must work with a copy as the selection list is a class instance17:25
udonocedk: ok17:25
cedkudono: in fact the + operation on list create a new one so:17:27
cedkudono: type.selection = type.selection + [('new_type', 'New Type')]17:27
cedkudono: must be ok17:27
udonocedk: ok, I give it a try.17:27
cedkudono: but not type.selection += [('new_type', 'New type')]17:28
cedkudono: this will change the selection for every databases17:28
udonocedk: I put an empty selection into the fields definition refering to self.selection_lines, and the self.selection_lines itself I define in __init__.17:29
cedkudono: why ?17:30
udonocedk: Just to test parts of your code...17:30
udonocedk: if this works, than it works with inheritance, too.17:31
udonocedk: It works very fine! Thanks for the great framework :-)17:45
-!- b52lap(n=b52lapto@41.249.250.195) has joined #tryton17:51
CIA-52tryton: matb roundup * #137/icon tryton-delete is looking to harmless and meaningless: Once again (isn't there any interest to close this issue?;): Attached screenshot shows tryton with edit-delete form older tango set. In my eyes i ...22:44
-!- yangoon1(n=mathiasb@p549F5926.dip.t-dialin.net) has joined #tryton23:52

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