IRC logs of #tryton for Saturday, 2010-04-17

chat.freenode.net #tryton log beginning Sat Apr 17 00:00:02 CEST 2010
-!- tekoholic(~quassel@184-96-4-83.hlrn.qwest.net) has joined #tryton04:07
-!- tekoholic(~quassel@tekoholic-1-pt.tunnel.tserv8.dal1.ipv6.he.net) has joined #tryton04:43
-!- yangoon(~mathiasb@p549F3CFB.dip.t-dialin.net) has joined #tryton05:19
-!- tekoholic(~quassel@67.217.14.90) has joined #tryton05:46
-!- fhoahf55593(~Gla@200-55-110-251.dsl.prima.net.ar) has joined #tryton05:56
-!- fhoahf55593(~Gla@200-55-110-251.dsl.prima.net.ar) has left #tryton05:56
-!- udono(~udono@dynamic-unidsl-85-197-17-194.westend.de) has joined #tryton06:56
-!- tekoholic(~quassel@tekoholic-1-pt.tunnel.tserv8.dal1.ipv6.he.net) has joined #tryton08:23
-!- sharkcz(~dan@plz1-v-4-17.static.adsl.vol.cz) has joined #tryton08:42
-!- udono(~udono@dynamic-unidsl-85-197-17-194.westend.de) has joined #tryton09:04
-!- tekoholic(~quassel@tekoholic-1-pt.tunnel.tserv8.dal1.ipv6.he.net) has joined #tryton09:08
-!- enlightx(~enlightx@217.202.106.175) has joined #tryton09:24
-!- Timitos(~timitos@88.217.184.172) has joined #tryton09:39
-!- enlightx(~enlightx@217.202.97.213) has joined #tryton11:36
-!- enlightx(~enlightx@217.202.99.159) has joined #tryton12:25
-!- FWiesing(~FWiesing@194-208-185-012.tele.net) has joined #tryton12:28
-!- ikks_(~ikks@200.118.243.193) has joined #tryton13:37
-!- woakas(~woakas@78.220.60.190.host.ifxnetworks.com) has joined #tryton15:16
-!- onisemus(~4e5d357a@gateway/web/freenode/x-cbtizwshmpozlqrs) has joined #tryton16:21
onisemushello tryton channel16:21
onisemusneed your help16:22
onisemushow to dynamically populate fields.selection based on the value of another field?16:23
onisemushmmm very quiet16:27
Timitosonisemus: your answer is not very precise. please give us more details16:35
onisemusok timitos16:36
Timitoss/answer/question16:37
onisemussay i have fields named  1.item type and  2.items16:39
onisemusboth fields are fields.selection16:39
onisemusif i select 1.item type:   metal16:40
onisemusthen 2.items will filter the selection to:   'gold', 'aluminum', 'copper', 'silver'16:41
onisemusany thought timitos?16:42
Timitosi think that only selections are not enough for something like this. you should use a parent-child relation like on product.category.16:45
onisemusthe main question timitos is:  how to modify fields.selection dynamically16:46
Timitosthen you can create 2 fields. ony with a domain = [('parent', '=', False)] and a second field with [['parent', '=', NAME_OF_1ST_FIELD)]16:46
Timitosonisemus: you can use a normal many2one field for this an use in the view the selection widget16:46
onisemusunfortunately, 'domain' is not working on fields.Selection field16:46
onisemustried that trick already timitos, many2one -> xml' widget=selection16:47
onisemusthe thing is, for this given application, its nicer to use dropdown list (combo box) instead of lookup (many2one)16:48
onisemusso is there a way to tweak the content of list inside the loaded fields.selection16:49
Timitosonisemus: it should be possible with a domain on the 2. selection field. but the domain maybe needs to be a hardcoded domain.16:51
Timitosonisemus: i do not understand why many2one should not work for this16:51
onisemusbut got to be 'dynamic'16:51
onisemusme too, but you can try yourself, if you have time16:52
Timitosonisemus: 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 code16:55
onisemuscould be a bug then, as for my code, i just followed the doku or samples16:56
Timitosonisemus: can you paste me your code?16:57
onisemusits a straight forward:   @model  fields.many2one         @xml  widget=selection16:57
Timitosonisemus: the interesting part is the domain16:59
Timitosonisemus: which version of tryton are you running?17:00
onisemus1.4?17:00
Timitosok17:01
Timitosonisemus: is there an error message when you use the selection widget for the many2one?17:09
onisemusthere is no error.  but the list returns all (unfiltered)17:10
Timitosonisemus: how is the domain looking?17:12
Timitosonisemus: i can confirm this. you should file a issue17:18
onisemusso its a bug timitos?17:19
Timitosonisemus: yes17:19
onisemusthanks a lot timitos for your time17:19
onisemusjust wondering if there is other way to manipulate the list of fields.selection17:19
onisemusnot via domain17:20
Timitosonisemus: i do not see any other solution for your problem. the domain is the correct tool for something like this.17:21
onisemusi agree this is supposed to be the right trigger, i just want to confirm maybe i am not aware of some hacks17:22
Timitosi there are some i do not know about them ;-)17:22
Timitosonisemus: maybe the issue is already solved in 1.5. i did not test it with the trunk version17:22
onisemusperhaps on lower level, through objects as in standard pygtk  combobox.clear(), combobox.append()17:23
onisemuscalled via onchange_  ;)17:23
Timitosonisemus: this is framework layer. not the right place to solve such problems17:24
onisemuscan wait to fix, while maybe this is not yet addressed issue even on 1.517:26
onisemus:(17:26
Timitosonisemus: why not use many2one first and switch to selection widget after fix release?17:26
Timitosps: do not forget to file the issue17:27
Timitosonisemus: 1.6 should be released next week.17:28
onisemusyep most likely will do for the time being, just hate to be trapped and do nothing ;)17:30
Timitos:-)17:30
Timitosi need to go now. cu17:30
Timitosafk17:30
onisemusagain thanks a lot timitos17:30
Timitosyou are welcome17:31
-!- gremly(~gremly@78.220.60.190.host.ifxnetworks.com) has joined #tryton18:45
-!- ikks_(~ikks@200.118.243.193) has joined #tryton23:50

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