chat.freenode.net #tryton log beginning Sat Apr 17 00:00:02 CEST 2010 | ||
2010-04-17 04:07 -!- tekoholic(~quassel@184-96-4-83.hlrn.qwest.net) has joined #tryton | ||
2010-04-17 04:43 -!- tekoholic(~quassel@tekoholic-1-pt.tunnel.tserv8.dal1.ipv6.he.net) has joined #tryton | ||
2010-04-17 05:19 -!- yangoon(~mathiasb@p549F3CFB.dip.t-dialin.net) has joined #tryton | ||
2010-04-17 05:46 -!- tekoholic(~quassel@67.217.14.90) has joined #tryton | ||
2010-04-17 05:56 -!- fhoahf55593(~Gla@200-55-110-251.dsl.prima.net.ar) has joined #tryton | ||
2010-04-17 05:56 -!- fhoahf55593(~Gla@200-55-110-251.dsl.prima.net.ar) has left #tryton | ||
2010-04-17 06:56 -!- udono(~udono@dynamic-unidsl-85-197-17-194.westend.de) has joined #tryton | ||
2010-04-17 08:23 -!- tekoholic(~quassel@tekoholic-1-pt.tunnel.tserv8.dal1.ipv6.he.net) has joined #tryton | ||
2010-04-17 08:42 -!- sharkcz(~dan@plz1-v-4-17.static.adsl.vol.cz) has joined #tryton | ||
2010-04-17 09:04 -!- udono(~udono@dynamic-unidsl-85-197-17-194.westend.de) has joined #tryton | ||
2010-04-17 09:08 -!- tekoholic(~quassel@tekoholic-1-pt.tunnel.tserv8.dal1.ipv6.he.net) has joined #tryton | ||
2010-04-17 09:24 -!- enlightx(~enlightx@217.202.106.175) has joined #tryton | ||
2010-04-17 09:39 -!- Timitos(~timitos@88.217.184.172) has joined #tryton | ||
2010-04-17 11:36 -!- enlightx(~enlightx@217.202.97.213) has joined #tryton | ||
2010-04-17 12:25 -!- enlightx(~enlightx@217.202.99.159) has joined #tryton | ||
2010-04-17 12:28 -!- FWiesing(~FWiesing@194-208-185-012.tele.net) has joined #tryton | ||
2010-04-17 13:37 -!- ikks_(~ikks@200.118.243.193) has joined #tryton | ||
2010-04-17 15:16 -!- woakas(~woakas@78.220.60.190.host.ifxnetworks.com) has joined #tryton | ||
2010-04-17 16:21 -!- onisemus(~4e5d357a@gateway/web/freenode/x-cbtizwshmpozlqrs) has joined #tryton | ||
2010-04-17 16:21 <onisemus> hello tryton channel | ||
2010-04-17 16:22 <onisemus> need your help | ||
2010-04-17 16:23 <onisemus> how to dynamically populate fields.selection based on the value of another field? | ||
2010-04-17 16:27 <onisemus> hmmm very quiet | ||
2010-04-17 16:35 <Timitos> onisemus: your answer is not very precise. please give us more details | ||
2010-04-17 16:36 <onisemus> ok timitos | ||
2010-04-17 16:37 <Timitos> s/answer/question | ||
2010-04-17 16:39 <onisemus> say i have fields named 1.item type and 2.items | ||
2010-04-17 16:39 <onisemus> both fields are fields.selection | ||
2010-04-17 16:40 <onisemus> if i select 1.item type: metal | ||
2010-04-17 16:41 <onisemus> then 2.items will filter the selection to: 'gold', 'aluminum', 'copper', 'silver' | ||
2010-04-17 16:42 <onisemus> any thought timitos? | ||
2010-04-17 16:45 <Timitos> i think that only selections are not enough for something like this. you should use a parent-child relation like on product.category. | ||
2010-04-17 16:46 <onisemus> the main question timitos is: how to modify fields.selection dynamically | ||
2010-04-17 16:46 <Timitos> then you can create 2 fields. ony with a domain = [('parent', '=', False)] and a second field with [['parent', '=', NAME_OF_1ST_FIELD)] | ||
2010-04-17 16:46 <Timitos> onisemus: you can use a normal many2one field for this an use in the view the selection widget | ||
2010-04-17 16:46 <onisemus> unfortunately, 'domain' is not working on fields.Selection field | ||
2010-04-17 16:47 <onisemus> tried that trick already timitos, many2one -> xml' widget=selection | ||
2010-04-17 16:48 <onisemus> the thing is, for this given application, its nicer to use dropdown list (combo box) instead of lookup (many2one) | ||
2010-04-17 16:49 <onisemus> so is there a way to tweak the content of list inside the loaded fields.selection | ||
2010-04-17 16:51 <Timitos> onisemus: it should be possible with a domain on the 2. selection field. but the domain maybe needs to be a hardcoded domain. | ||
2010-04-17 16:51 <Timitos> onisemus: i do not understand why many2one should not work for this | ||
2010-04-17 16:51 <onisemus> but got to be 'dynamic' | ||
2010-04-17 16:52 <onisemus> me too, but you can try yourself, if you have time | ||
2010-04-17 16:55 <Timitos> onisemus: it must be possible with a domain on a many2one that is set to selection widget. if this is not working it is a bug. either in trytons code or your code | ||
2010-04-17 16:56 <onisemus> could be a bug then, as for my code, i just followed the doku or samples | ||
2010-04-17 16:57 <Timitos> onisemus: can you paste me your code? | ||
2010-04-17 16:57 <onisemus> its a straight forward: @model fields.many2one @xml widget=selection | ||
2010-04-17 16:59 <Timitos> onisemus: the interesting part is the domain | ||
2010-04-17 17:00 <Timitos> onisemus: which version of tryton are you running? | ||
2010-04-17 17:00 <onisemus> 1.4? | ||
2010-04-17 17:01 <Timitos> ok | ||
2010-04-17 17:09 <Timitos> onisemus: is there an error message when you use the selection widget for the many2one? | ||
2010-04-17 17:10 <onisemus> there is no error. but the list returns all (unfiltered) | ||
2010-04-17 17:12 <Timitos> onisemus: how is the domain looking? | ||
2010-04-17 17:18 <Timitos> onisemus: i can confirm this. you should file a issue | ||
2010-04-17 17:19 <onisemus> so its a bug timitos? | ||
2010-04-17 17:19 <Timitos> onisemus: yes | ||
2010-04-17 17:19 <onisemus> thanks a lot timitos for your time | ||
2010-04-17 17:19 <onisemus> just wondering if there is other way to manipulate the list of fields.selection | ||
2010-04-17 17:20 <onisemus> not via domain | ||
2010-04-17 17:21 <Timitos> onisemus: i do not see any other solution for your problem. the domain is the correct tool for something like this. | ||
2010-04-17 17:22 <onisemus> i agree this is supposed to be the right trigger, i just want to confirm maybe i am not aware of some hacks | ||
2010-04-17 17:22 <Timitos> i there are some i do not know about them ;-) | ||
2010-04-17 17:22 <Timitos> onisemus: maybe the issue is already solved in 1.5. i did not test it with the trunk version | ||
2010-04-17 17:23 <onisemus> perhaps on lower level, through objects as in standard pygtk combobox.clear(), combobox.append() | ||
2010-04-17 17:23 <onisemus> called via onchange_ ;) | ||
2010-04-17 17:24 <Timitos> onisemus: this is framework layer. not the right place to solve such problems | ||
2010-04-17 17:26 <onisemus> can wait to fix, while maybe this is not yet addressed issue even on 1.5 | ||
2010-04-17 17:26 <onisemus> :( | ||
2010-04-17 17:26 <Timitos> onisemus: why not use many2one first and switch to selection widget after fix release? | ||
2010-04-17 17:27 <Timitos> ps: do not forget to file the issue | ||
2010-04-17 17:28 <Timitos> onisemus: 1.6 should be released next week. | ||
2010-04-17 17:30 <onisemus> yep most likely will do for the time being, just hate to be trapped and do nothing ;) | ||
2010-04-17 17:30 <Timitos> :-) | ||
2010-04-17 17:30 <Timitos> i need to go now. cu | ||
2010-04-17 17:30 <Timitos> afk | ||
2010-04-17 17:30 <onisemus> again thanks a lot timitos | ||
2010-04-17 17:31 <Timitos> you are welcome | ||
2010-04-17 18:45 -!- gremly(~gremly@78.220.60.190.host.ifxnetworks.com) has joined #tryton | ||
2010-04-17 23:50 -!- ikks_(~ikks@200.118.243.193) has joined #tryton |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!