chat.freenode.net #tryton log beginning Sat Sep 27 00:00:01 CEST 2008 | ||
2008-09-27 05:18 -!- yangoon(n=mathiasb@p549F5926.dip.t-dialin.net) has joined #tryton | ||
2008-09-27 08:29 -!- Timitos(n=Timitos@88.217.184.172) has joined #tryton | ||
2008-09-27 11:22 <CIA-52> tryton: 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 ... | ||
2008-09-27 11:37 -!- b52laptop(n=b52lapto@41.249.250.195) has joined #tryton | ||
2008-09-27 13:55 -!- yangoon(n=mathiasb@p549F5926.dip.t-dialin.net) has joined #tryton | ||
2008-09-27 16:30 -!- cedk(n=ced@gentoo/developer/cedk) has joined #tryton | ||
2008-09-27 17:06 <udono> hello cedk | ||
2008-09-27 17:07 <udono> cedk: question about invisible == | ||
2008-09-27 17:09 <cedk> udono: yes | ||
2008-09-27 17:12 <udono> cedk: I like to check in a Many2One list but it doesnt work http://paste.pocoo.org/show/86356/ | ||
2008-09-27 17:13 <udono> cedk: I know that type is just an id and this cant equal with a string "Person" | ||
2008-09-27 17:14 <udono> cedk: I tryed out states={"invisible": "type.name != 'Person'"} and states={"invisible": "type.type != 'Person'"} but they dont work. | ||
2008-09-27 17:14 <udono> cedk: did I need an helping fuctional field, which maps the ids of type to their names? | ||
2008-09-27 17:14 <cedk> udono: that doesn't work | ||
2008-09-27 17:15 <udono> cedk: No way possible? | ||
2008-09-27 17:15 <cedk> udono: I think that if you need to provide functionnality based on the type value, you must use a Selection instead of many2one | ||
2008-09-27 17:16 <udono> cedk: Yes, I had. But for the sake of genericity and better API I like to have a One2Many... | ||
2008-09-27 17:17 <udono> sorry Many2One... | ||
2008-09-27 17:17 <cedk> udono: why ? | ||
2008-09-27 17:17 <cedk> udono: if for each type, you must have code developped , it is not true | ||
2008-09-27 17:18 <cedk> udono: the use of many2one allow just that the user can create his own type | ||
2008-09-27 17:18 <cedk> udono: and as I see, you want to have specific code depending of the type | ||
2008-09-27 17:18 <cedk> udono: so users can not really create his own type | ||
2008-09-27 17:19 <udono> cedk: 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. | ||
2008-09-27 17:20 <udono> cedk: The type will be writeonly for XML. | ||
2008-09-27 17:20 <cedk> udono: that is wrong | ||
2008-09-27 17:20 <udono> cedk: why | ||
2008-09-27 17:20 <cedk> udono: use a Selection and add selection by inherit | ||
2008-09-27 17:21 <cedk> udono: because you need to know your types and with a many2one, you can not | ||
2008-09-27 17:21 <cedk> udono: one proof, is that in your code you use the name "Person" | ||
2008-09-27 17:21 <udono> cedk: Ai, thats possible? Even if I dont know which modules are inserted and changeing the selection? | ||
2008-09-27 17:21 <cedk> udono: yes of course, in the __init__ | ||
2008-09-27 17:22 <udono> cedk: so its possible to add just another element to a selection, and let the old ones stay? | ||
2008-09-27 17:23 <cedk> udono: you just need to take too set a copy of type.selection, add the field and replace the original type.selection | ||
2008-09-27 17:24 <udono> cedk: but what with inheritance of other modules which change the selection? | ||
2008-09-27 17:24 <cedk> udono: so someting like that: type.selection = type.selection[:] + [('new_type', 'New Type')] | ||
2008-09-27 17:24 <udono> cedk: ok, this looks good | ||
2008-09-27 17:24 <cedk> udono: they will add their type and that is all | ||
2008-09-27 17:25 <udono> cedk: Thanks a lot. | ||
2008-09-27 17:25 <cedk> udono: the only thing is that you must work with a copy as the selection list is a class instance | ||
2008-09-27 17:25 <udono> cedk: ok | ||
2008-09-27 17:27 <cedk> udono: in fact the + operation on list create a new one so: | ||
2008-09-27 17:27 <cedk> udono: type.selection = type.selection + [('new_type', 'New Type')] | ||
2008-09-27 17:27 <cedk> udono: must be ok | ||
2008-09-27 17:27 <udono> cedk: ok, I give it a try. | ||
2008-09-27 17:28 <cedk> udono: but not type.selection += [('new_type', 'New type')] | ||
2008-09-27 17:28 <cedk> udono: this will change the selection for every databases | ||
2008-09-27 17:29 <udono> cedk: I put an empty selection into the fields definition refering to self.selection_lines, and the self.selection_lines itself I define in __init__. | ||
2008-09-27 17:30 <cedk> udono: why ? | ||
2008-09-27 17:30 <udono> cedk: Just to test parts of your code... | ||
2008-09-27 17:31 <udono> cedk: if this works, than it works with inheritance, too. | ||
2008-09-27 17:45 <udono> cedk: It works very fine! Thanks for the great framework :-) | ||
2008-09-27 17:51 -!- b52lap(n=b52lapto@41.249.250.195) has joined #tryton | ||
2008-09-27 22:44 <CIA-52> tryton: 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 ... | ||
2008-09-27 23:52 -!- yangoon1(n=mathiasb@p549F5926.dip.t-dialin.net) has joined #tryton |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!