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

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

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!