IRC logs of #tryton for Thursday, 2017-02-02 #tryton log beginning Thu Feb 2 00:00:01 CET 2017
2017-02-02 01:17 -!- kstenger( has joined #tryton
2017-02-02 01:32 -!- uha4(~uha4@ has left #tryton
2017-02-02 02:19 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-02-02 07:41 -!- JanGB( has joined #tryton
2017-02-02 08:04 -!- dj_xatra(~dj_xatra@ has joined #tryton
2017-02-02 08:25 -!- JanGB( has joined #tryton
2017-02-02 08:30 -!- mamcode( has joined #tryton
2017-02-02 08:35 -!- Timitos( 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@ has joined #tryton
2017-02-02 09:04 -!- sebd(~seb@ has joined #tryton
2017-02-02 09:28 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-02-02 12:04 -!- mariomop(~quassel@ has joined #tryton
2017-02-02 12:28 -!- nicoe( 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@ has left #tryton
2017-02-02 13:02 <pokoli> tr33: hello :)
2017-02-02 14:09 -!- smarro(~sebastian@ has joined #tryton
2017-02-02 14:23 -!- perilla( has joined #tryton
2017-02-02 14:24 -!- JanGB(~jan@ 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( has joined #tryton
2017-02-02 15:27 -!- uha4(~uha4@ 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:
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( has joined #tryton
2017-02-02 17:04 -!- JosDzG(~Thunderbi@ 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@ 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@ has joined #tryton
2017-02-02 17:53 -!- mamcode(~mamcode@ has joined #tryton
2017-02-02 18:06 -!- kstenger( has joined #tryton
2017-02-02 18:38 -!- JanGB( has joined #tryton
2017-02-02 18:44 -!- JosDzG( has joined #tryton
2017-02-02 18:46 -!- JosDzG(~Thunderbi@ has joined #tryton
2017-02-02 19:34 -!- mamcode(~mamcode@ 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@ has joined #tryton
2017-02-02 20:17 -!- zodman_(~zodman@ has joined #tryton
2017-02-02 22:30 -!- rpit( has joined #tryton
2017-02-02 22:48 -!- JanGB( 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/, but it doesn't work. Could anyone please have a look on my code:
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 2.17.3 by Marius Gedminas - find it at!