IRC logs of #tryton for Thursday, 2017-02-02

chat.freenode.net #tryton log beginning Thu Feb 2 00:00:01 CET 2017
2017-02-02 01:17 -!- kstenger(~karla@r186-54-189-109.dialup.adsl.anteldata.net.uy) has joined #tryton
2017-02-02 01:32 -!- uha4(~uha4@213.187.69.58) has left #tryton
2017-02-02 02:19 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-02-02 07:41 -!- JanGB(~jan@ip92343817.dynamic.kabel-deutschland.de) has joined #tryton
2017-02-02 08:04 -!- dj_xatra(~dj_xatra@217.166.83.130) has joined #tryton
2017-02-02 08:25 -!- JanGB(~jan@ip92343817.dynamic.kabel-deutschland.de) has joined #tryton
2017-02-02 08:30 -!- mamcode(~mamcode@186-94-176-117.genericrev.cantv.net) has joined #tryton
2017-02-02 08:35 -!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton
2017-02-02 08:48 -!- rpit(~rpit@2a02:908:e672:7480:56ee:75ff:fe0d:d3c7) has joined #tryton
2017-02-02 08:54 -!- JanGB(~jan@193.174.248.1) has joined #tryton
2017-02-02 09:04 -!- sebd(~seb@85.31.145.12) has joined #tryton
2017-02-02 09:28 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-02-02 12:04 -!- mariomop(~quassel@181.110.66.9) has joined #tryton
2017-02-02 12:28 -!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton
2017-02-02 12:47 -!- tr33(~tr33@2a01:198:45e:babe:dbe:4c70:e34f:70d4) has joined #tryton
2017-02-02 12:49 <tr33> hello
2017-02-02 13:00 -!- JanGB(~jan@193.174.248.1) has left #tryton
2017-02-02 13:02 <pokoli> tr33: hello :)
2017-02-02 14:09 -!- smarro(~sebastian@181.16.7.104) has joined #tryton
2017-02-02 14:23 -!- perilla(~perilla@corp-190-57-169-210.cue.puntonet.ec) has joined #tryton
2017-02-02 14:24 -!- JanGB(~jan@193.174.248.1) has joined #tryton
2017-02-02 14:26 -!- csotelo(~csotelo@2001:1388:49c5:8e4e:3a19:ec7:1f4e:7302) has joined #tryton
2017-02-02 14:31 <tr33> i try to import invoice_lines via proteus, but the interface complains about "The value of the field "Taxes" on "Invoice Line" is not valid according to its domain."
2017-02-02 14:31 <tr33> but importing via tryton-client works without any tax-informations
2017-02-02 14:57 <pokoli> tr33: can we have a look at the proteus code you are using?
2017-02-02 15:07 -!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton
2017-02-02 15:27 -!- uha4(~uha4@146.0.103.221) has joined #tryton
2017-02-02 15:30 <uha4> Hello, could anyone tell me with pyson in domains?
2017-02-02 15:31 <uha4> I want to compare the value of a fields.Many2One. Is it possible to access fields of the linked record?
2017-02-02 15:32 <uha4> Or if not, how to find out, what is the exact returnvalue of Eval(<fields.Many2One>)
2017-02-02 15:37 <uha4> i would like to add a domain like " ('type.code', If(Equal(Eval('from_location.code'), 'SUP'), '=', '!='), 'supplier')" to the lot field in the move
2017-02-02 15:38 <uha4> well added a type field to stock.lot ...
2017-02-02 15:40 <uha4> so if the from_location in the move is set to 'Supplier' it should only allow Lots of type 'supplier', other from_locations should not allow lots of type supplier
2017-02-02 15:41 <uha4> is there a way to check the return value of a pyson-statement with like a print()
2017-02-02 15:43 <pokoli> uha4: you can not access related fields (using '.') on pyson statements
2017-02-02 15:43 <pokoli> uha4: instead you can use a function field which returns the type of the from_location and use it on the pyson expression
2017-02-02 15:44 <pokoli> uha4: and the function fields should be computed using a on_change_with method so it gets updated on the client when the user changes the from location and it is always correctly evaluated
2017-02-02 15:44 <uha4> ok, so i had to create a function field just for this filter?
2017-02-02 15:45 <pokoli> uha4: yes
2017-02-02 15:45 <uha4> i hoped i could compare Eval(from_location) with the right string...
2017-02-02 15:46 <uha4> when i tryed it didn't throw an error, but i don't know what string...
2017-02-02 15:48 <uha4> pokoli: i tryed the "stock.location,5" as this is the return when i print from_location
2017-02-02 15:49 <pokoli> uha4: because this is a many2one field, which on server returns a record (and what you see is it's representation), but on pyson Many2One are represented by their id
2017-02-02 15:50 <pokoli> uha4: btw I will go for something like: If(Eval('from_location_type')) == 'supplier', ('lot.type', '=', Eval('from_location_type')), ())
2017-02-02 15:51 <uha4> pokoli: i also tryed to compare to the id... so it's impossible like that and i have to go for the functionfield
2017-02-02 15:52 <uha4> pokoli: you mean you would put the whole domain-clause in the If() ?
2017-02-02 15:57 <pokoli> uha4: yes, you can put the whole domain in the if, and an empty domain in the else clause :)
2017-02-02 15:58 <uha4> pokoli: thanks for your help, i'll try my luck with the functionfield...
2017-02-02 15:59 <pokoli> uha4: you should not rely on codes nor ids, as they may change for other records
2017-02-02 16:01 -!- csotelo(~csotelo@2001:1388:49c5:b48f:df20:e375:675:9f76) has joined #tryton
2017-02-02 16:24 <tr33> pokoli: https://seafile.nexplosion.de/d/53bb871b67/
2017-02-02 16:37 <pokoli> tr33: Taxes is a Many2Many field, so you should manage it on your script
2017-02-02 16:38 <pokoli> tr33: btw, have you thought about creating a new module which adds a wizard that imports the file in your format?
2017-02-02 16:54 -!- thaneor(~ldlc6@r167-57-79-81.dialup.adsl.anteldata.net.uy) has joined #tryton
2017-02-02 17:04 -!- JosDzG(~Thunderbi@187.188.72.36) has joined #tryton
2017-02-02 17:06 <tr33> pokoli: not really: my tryton-programmer-skills are very poor
2017-02-02 17:06 <tr33> I'll try to add tax-information to my script
2017-02-02 17:07 <tr33> but why does the client automatically adds taxes based on the article-defaults, and proteus not?
2017-02-02 17:08 <tr33> using the same data in client-import, it works
2017-02-02 17:15 -!- JosDzG(~Thunderbi@187.188.72.36) has joined #tryton
2017-02-02 17:23 <cedk> tr33: as you will read the logs :-) it is probably because you set the invoice type after the product
2017-02-02 17:24 -!- JosDzG(~Thunderbi@187.188.72.36) has joined #tryton
2017-02-02 17:53 -!- mamcode(~mamcode@201.208.162.5) has joined #tryton
2017-02-02 18:06 -!- kstenger(~karla@r190-134-138-25.dialup.adsl.anteldata.net.uy) has joined #tryton
2017-02-02 18:38 -!- JanGB(~jan@p54B9878F.dip0.t-ipconnect.de) has joined #tryton
2017-02-02 18:44 -!- JosDzG(~Thunderbi@fixed-188-72-187-188-72-36.iusacell.net) has joined #tryton
2017-02-02 18:46 -!- JosDzG(~Thunderbi@187.188.72.36) has joined #tryton
2017-02-02 19:34 -!- mamcode(~mamcode@201.208.162.5) has joined #tryton
2017-02-02 19:35 <uha4> I try to understand the possibility of tree-views, and found something i don't understand, perhaps anyone could give me a hint:
2017-02-02 19:38 <uha4> in the form view of shipment in you see the list of incomming moves. This seems to use the same file move_tree.xml as the main tree-view were you get with the menu-entry 'Move'
2017-02-02 19:40 <uha4> but in the shipmentIn the columns 'from_location', 'to_location' and 'shipment' are invisible. how is this triggered? i didn't find anything.
2017-02-02 19:45 <cedk> uha4: it is because the one2many has a domain which fix with an equal the value of those field
2017-02-02 19:46 <cedk> uha4: so the client is smart enough to hide columns which always have the same value
2017-02-02 19:46 <cedk> uha4: this allow to almost always reuse the same view no idenpendently of the usage
2017-02-02 19:47 <uha4> ok that makes sense. thanks.
2017-02-02 20:17 -!- zodman__(~zodman@187.188.105.56) has joined #tryton
2017-02-02 20:17 -!- zodman_(~zodman@187.188.105.56) has joined #tryton
2017-02-02 22:30 -!- rpit(~rpit@aftr-37-24-150-225.unity-media.net) has joined #tryton
2017-02-02 22:48 -!- JanGB(~jan@ip92343817.dynamic.kabel-deutschland.de) has joined #tryton
2017-02-02 23:08 <uha4> pokoli told me earlier, to solve my problem with function-fields. I think i did it exactly like it is done in stock/move.py, but it doesn't work. Could anyone please have a look on my code: http://pastebin.com/h5ctFwJy
2017-02-02 23:10 <uha4> the self.from_location within the on_change_with_from_location_type never gets updatet. but in on_change_lot it gives the current/correct value.
2017-02-02 23:12 <uha4> so after first changing the from_location, then changing the lot i get a print like:
2017-02-02 23:12 <uha4> location: 'stock.location,5'
2017-02-02 23:12 <uha4> location: stock.location,3 -- direkt type: storage -- from_location_type: supplier
2017-02-02 23:26 <uha4> pokoli: but printing "self.from_location_type" doesn't involve pyson, this also gives always the old value
2017-02-02 23:27 <uha4> pokoli: oops, i scrolled up to look for the pevios dicussion, and a few minutes later took an old reply of yours for a new one. sorry...

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