IRC logs of #tryton for Tuesday, 2014-05-06

chat.freenode.net #tryton log beginning Tue May 6 00:00:01 CEST 2014
marI see that PYSON doesn't support walking.. how do I workaround?00:21
-!- digitalsatori(~Thunderbi@114.94.143.109) has joined #tryton03:18
-!- defyasdf(~defyasdf@ec2-54-234-60-70.compute-1.amazonaws.com) has joined #tryton03:28
-!- sharoonthomas(~sharoonth@118.91.181.250) has joined #tryton06:26
-!- defyasdf(~defyasdf@ec2-54-234-60-70.compute-1.amazonaws.com) has joined #tryton06:31
-!- frispete(~frispete@p54A93A6C.dip0.t-ipconnect.de) has joined #tryton06:40
-!- mar(~marius@v100.nfq.lt) has joined #tryton06:43
-!- marius_(~marius@v100.nfq.lt) has joined #tryton06:43
marius_Hello. I'm editing relation model through One2Many default editor.  stock -> relation <- line. I'm trying to add new entry, and I have PYSON in relation.lines.domain. In that PYSON I'm unable to access/don't know how to access stock. How do I make so that I can access it?06:45
-!- mar(~marius@unaffiliated/mar) has joined #tryton06:46
-!- mar(~marius@v100.nfq.lt) has joined #tryton06:47
-!- mar(~marius@unaffiliated/mar) has joined #tryton06:47
-!- digitalsatori(~Thunderbi@114.94.143.109) has joined #tryton06:58
-!- yangoon1(~mathiasb@p549F3A22.dip0.t-ipconnect.de) has joined #tryton07:02
-!- LordVan(~LordVan@gentoo/developer/LordVan) has joined #tryton07:14
-!- pobsteta(~Thunderbi@4cb54-3-88-160-87-54.fbx.proxad.net) has joined #tryton07:39
-!- grasbauer(~jan@dslb-094-222-158-218.pools.arcor-ip.net) has joined #tryton07:45
maranyone ? :)08:05
marshall I do it like this: domain=[('origin', '=', Eval('_parent_stock_move', {}).get('origin'))] ?08:20
-!- digitalsatori(~Thunderbi@114.94.143.109) has joined #tryton08:26
-!- jeancavallo(~giovanni@bob75-9-88-181-2-176.fbx.proxad.net) has joined #tryton08:51
-!- bechamel(~Adium@62-197-96-189.teledisnet.be) has joined #tryton09:12
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:18
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton09:25
-!- nicoe(~nicoe@2001:6f8:3aa:0:b699:baff:fe56:2328) has joined #tryton10:27
mar('invoice_type', '=', Eval('_parent_stock_move', {}).get('invoice_type')), can I access invoice_type which is field.Function like that?10:58
marit works server-side, but doesn't work client-side :/10:58
-!- uranush(~uranus@ool-182fa854.dyn.optonline.net) has joined #tryton11:00
cedkmar: it will work only inside a one2many of stock.move11:00
marcan I get .get('from_location.type') or use some other workaround then?11:02
cedkmar: on client side, you have access to only what is on the screen11:02
maryeah, but I'm unable to walk the relation11:03
mar.get('from_location') works, returns the ID (but I want .type)11:04
marshould I use context or something for that then?11:04
cedkmar: don'T know what you are doing11:05
marI have models: stock -> relation <- line11:07
mar-> is One2Many11:07
marI'm trying to add create relations editing stock (One2Many field)11:07
marand I'm trying to limit lines which I can select with domain=[..]11:07
marlimiting by origin works: domain=[('origin', '=', Eval('_parent_stock_move', {}).get('origin'))]11:09
cedkmar: use a function field11:12
cedkmar: or write a domain base on location instead of type11:12
-!- pilou(~pilou@181.204.19.93.rev.sfr.net) has joined #tryton11:27
-!- pilou(~pilou@pdpc/supporter/active/pilou) has joined #tryton11:28
-!- corro(~corro@46.22.23.85) has joined #tryton11:44
-!- Shrine_(~mark@37.46.136.17) has joined #tryton11:46
marcedk, so I use function field, "invoice_type" is my function field11:51
marand it doesn't get called, result is u''11:51
cedkmar: it must be on the view or in the depends list of an other field in the view11:53
marcan I to depends=['stock_move.invoice_type']11:54
mar*do11:55
cedkmar: no11:55
marwhere do I do it then?11:56
cedkmar: it is not your function field11:56
cedkmar: you can only depend on local fields11:56
marok so I make origin depend on my function field?11:56
maror something like that?11:56
-!- pobsteta(~Thunderbi@4cb54-3-88-160-87-54.fbx.proxad.net) has joined #tryton11:57
marstock.move.origin.depends = ['invoice_type']11:57
marno?11:57
cedkmar: don't understand11:58
marcedk, I create a fake dependency to my function field of some field on stock.move that I display12:00
marso I display origin, I add ['function_field'] into origins depends12:00
maror even better, into one2many field12:02
cedkmar: fake dependencies are wrong12:02
pokolimar: you must add your function field into your intermediate model, and add it to the stock_move Many2One depends12:04
pokolimar: if the functional field is calculated based on the value of the invoice_line field, i will recomend you using the on_change_with function to get always the correct value12:05
marit's calculated based on stock.move12:08
pokolimar: so it's the same but using stock_move instead of invoice_line12:16
marok, so in intermediade model i do12:17
mar    invoice_type = fields.Function(fields.Char('invoice_type', 64, on_change_with=['stock_move']),12:17
mar                                   'on_change_with_invoice_type')12:17
marand in intermediade model I do: stock_move = fields.Many2One('stock.move', 'Stock Move', required=True, depends=['invoice_type']), right?12:19
pokolimar: correct12:21
marand my domain in intermediade model is: [('invoice_type', '=', Eval('invoice_type'))]12:23
pokolimar: so i should work now12:24
marand on change stub is: def on_change_with_invoice_type(self, name=None):12:24
mar        return 'in_invoice'12:24
marand I still see: [['invoice_type', '=', '']]]12:24
marin logs :/12:24
pokolimar: did you have client in debug mode?12:24
maryes12:24
pokolimar: so you must close the window and reopen it12:25
maro reopened client12:25
pokolis/window/tab12:25
mar*I12:25
pokolimar: you're inside a one2Many?12:26
maryes12:26
pokolimar: from stock move right?12:26
maryes12:26
pokolimar: so stock_move value is not set, so invoice_type value is not set also12:27
marbut _parent_stock_move is set...12:27
pokolimar: yes but the on_change_with is not called as the value for stock_move is not changed12:28
marcan I trigger it somehow?12:29
pokolimar: you can use a default value for the invoice_type field12:31
marwill I reach stock_move when setting default?12:32
marI think not, because its cls method :/12:38
pokolimar: no, but you can use a context set in the One2Many field12:41
mar context={'stock_move': Eval('id')}?12:59
pokolimar:  yes13:00
margreat, thank you a lot13:00
-!- sharoonthomas(~sharoonth@122.177.174.158) has joined #tryton13:12
-!- sharoonthomas(~sharoonth@118.91.181.250) has joined #tryton13:26
-!- gremly(~gremly@190.85.36.58) has joined #tryton13:37
-!- smarro(~sebastian@190.105.93.196) has joined #tryton13:49
-!- pobsteta(~Thunderbi@ANancy-652-1-252-50.w83-196.abo.wanadoo.fr) has joined #tryton14:17
-!- nicoe(~nicoe@2001:6f8:3aa:1:ee55:f9ff:fe7b:f7ac) has joined #tryton14:20
-!- jeancavallo(~giovanni@bob75-9-88-181-2-176.fbx.proxad.net) has joined #tryton14:29
-!- vernichon(~Thunderbi@gex01-1-78-234-55-95.fbx.proxad.net) has joined #tryton14:30
-!- sharoonthomas(~sharoonth@118.91.181.250) has joined #tryton14:32
-!- pablovannini(~pablo@host126.186-109-85.telecom.net.ar) has joined #tryton14:43
-!- nicoe(~nicoe@2001:6f8:3aa:0:b699:baff:fe56:2328) has joined #tryton14:56
-!- digitalsatori(~Thunderbi@116.234.181.110) has joined #tryton16:00
-!- mariomop(~quassel@host91.186-125-149.telecom.net.ar) has joined #tryton16:18
-!- alisonken1lap3(~alisonken@18.18.ultimate-int.uia.net) has joined #tryton16:30
-!- mar(~marius@v100.nfq.lt) has joined #tryton17:12
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton17:50
-!- littlebit(~Thunderbi@ulmg-5d845b87.pool.mediaWays.net) has joined #tryton17:54
-!- Telesight(~anthony@77-175-159-159.FTTH.ispfabriek.nl) has joined #tryton17:59
-!- grasbauer(~jan@dslb-178-000-013-117.pools.arcor-ip.net) has joined #tryton18:19
-!- bechamel(~Adium@62-197-96-189.teledisnet.be) has joined #tryton18:36
-!- mar(~marius@v100.nfq.lt) has joined #tryton18:54
-!- mar(~marius@v100.nfq.lt) has joined #tryton19:13
-!- LordVan(~lordvan@gentoo/developer/LordVan) has joined #tryton19:16
-!- smarro(~sebastian@190.105.93.196) has joined #tryton19:21
-!- pobsteta(~Thunderbi@4cb54-3-88-160-87-54.fbx.proxad.net) has joined #tryton19:23
-!- pobsteta(~Thunderbi@4cb54-3-88-160-87-54.fbx.proxad.net) has joined #tryton19:43
-!- pobsteta(~Thunderbi@4cb54-3-88-160-87-54.fbx.proxad.net) has joined #tryton19:50
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton19:55
-!- grasbauer(~jan@dslb-178-000-013-117.pools.arcor-ip.net) has joined #tryton20:00
-!- grasbauer(~jan@dslb-178-000-013-117.pools.arcor-ip.net) has joined #tryton20:17
-!- bechamel(~Adium@62-197-96-189.teledisnet.be) has joined #tryton20:59
-!- mariomop(~quassel@host169.190-231-38.telecom.net.ar) has joined #tryton21:19
-!- bechamel(~Adium@62-197-96-189.teledisnet.be) has joined #tryton21:27
-!- cjbarnes18(~craig@host109-157-158-41.range109-157.btcentralplus.com) has joined #tryton22:44
-!- yangoon(~mathiasb@p549F3A22.dip0.t-ipconnect.de) has joined #tryton22:51

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