IRC logs of #tryton for Thursday, 2017-02-02 #tryton log beginning Thu Feb 2 00:00:01 CET 2017
-!- kstenger( has joined #tryton01:17
-!- uha4(~uha4@ has left #tryton01:32
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton02:19
-!- JanGB( has joined #tryton07:41
-!- dj_xatra(~dj_xatra@ has joined #tryton08:04
-!- JanGB( has joined #tryton08:25
-!- mamcode( has joined #tryton08:30
-!- Timitos( has joined #tryton08:35
-!- rpit(~rpit@2a02:908:e672:7480:56ee:75ff:fe0d:d3c7) has joined #tryton08:48
-!- JanGB(~jan@ has joined #tryton08:54
-!- sebd(~seb@ has joined #tryton09:04
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:28
-!- mariomop(~quassel@ has joined #tryton12:04
-!- nicoe( has joined #tryton12:28
-!- tr33(~tr33@2a01:198:45e:babe:dbe:4c70:e34f:70d4) has joined #tryton12:47
-!- JanGB(~jan@ has left #tryton13:00
pokolitr33: hello :)13:02
-!- smarro(~sebastian@ has joined #tryton14:09
-!- perilla( has joined #tryton14:23
-!- JanGB(~jan@ has joined #tryton14:24
-!- csotelo(~csotelo@2001:1388:49c5:8e4e:3a19:ec7:1f4e:7302) has joined #tryton14:26
tr33i 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."14:31
tr33but importing via tryton-client works without any tax-informations14:31
pokolitr33: can we have a look at the proteus code you are using?14:57
-!- Timitos( has joined #tryton15:07
-!- uha4(~uha4@ has joined #tryton15:27
uha4Hello, could anyone tell me with pyson in domains?15:30
uha4I want to compare the value of a  fields.Many2One. Is it possible to access fields of the linked record?15:31
uha4Or if not, how to find out, what is the exact returnvalue of Eval(<fields.Many2One>)15:32
uha4i would like to add a domain like " ('type.code', If(Equal(Eval('from_location.code'),  'SUP'), '=', '!='), 'supplier')" to the lot field in the move15:37
uha4well added a type field to stock.lot ...15:38
uha4so 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 supplier15:40
uha4is there a way to check the return value of a pyson-statement with like a print()15:41
pokoliuha4: you can not access related fields (using '.') on pyson statements15:43
pokoliuha4: instead you can use a function field which returns the type of the from_location and use it on the pyson expression15:43
pokoliuha4: 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 evaluated15:44
uha4ok, so i had to create a function field just for this filter?15:44
pokoliuha4: yes15:45
uha4i hoped i could compare Eval(from_location) with the right string...15:45
uha4when i tryed it didn't throw an error, but i don't know what string...15:46
uha4pokoli: i tryed the "stock.location,5" as this is the return when i print from_location15:48
pokoliuha4: 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 id15:49
pokoliuha4: btw I will go for something like: If(Eval('from_location_type')) == 'supplier', ('lot.type', '=', Eval('from_location_type')), ())15:50
uha4pokoli: i also tryed to compare to the id...  so it's impossible like that and i have to go for the functionfield15:51
uha4pokoli: you mean you would put the whole domain-clause in the If()  ?15:52
pokoliuha4: yes, you can put the whole domain in the if, and an empty domain in the else clause :)15:57
uha4pokoli: thanks for your help, i'll try my luck with the functionfield...15:58
pokoliuha4: you should not rely on codes nor ids, as they may change for other records15:59
-!- csotelo(~csotelo@2001:1388:49c5:b48f:df20:e375:675:9f76) has joined #tryton16:01
pokolitr33: Taxes is a Many2Many field, so you should manage it on your script16:37
pokolitr33: btw, have you thought about creating a new module which adds a wizard that imports the file in your format?16:38
-!- thaneor( has joined #tryton16:54
-!- JosDzG(~Thunderbi@ has joined #tryton17:04
tr33pokoli: not really: my tryton-programmer-skills are very poor17:06
tr33I'll try to add tax-information to my script17:06
tr33but why does the client automatically adds taxes based on the article-defaults, and proteus not?17:07
tr33using the same data in client-import, it works17:08
-!- JosDzG(~Thunderbi@ has joined #tryton17:15
cedktr33: as you will read the logs :-) it is probably because you set the invoice type after the product17:23
-!- JosDzG(~Thunderbi@ has joined #tryton17:24
-!- mamcode(~mamcode@ has joined #tryton17:53
-!- kstenger( has joined #tryton18:06
-!- JanGB( has joined #tryton18:38
-!- JosDzG( has joined #tryton18:44
-!- JosDzG(~Thunderbi@ has joined #tryton18:46
-!- mamcode(~mamcode@ has joined #tryton19:34
uha4I try to understand the possibility of tree-views, and found something i don't understand, perhaps anyone could give me a hint:19:35
uha4in 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'19:38
uha4but in the shipmentIn the columns 'from_location', 'to_location' and 'shipment' are invisible. how is this triggered? i didn't find anything.19:40
cedkuha4: it is because the one2many has a domain which fix with an equal the value of those field19:45
cedkuha4: so the client is smart enough to hide columns which always have the same value19:46
cedkuha4: this allow to almost always reuse the same view no idenpendently of the usage19:46
uha4ok that makes sense. thanks.19:47
-!- zodman__(~zodman@ has joined #tryton20:17
-!- zodman_(~zodman@ has joined #tryton20:17
-!- rpit( has joined #tryton22:30
-!- JanGB( has joined #tryton22:48
uha4pokoli 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:
uha4the 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.23:10
uha4so after first changing the from_location, then changing the lot i get a print like:23:12
uha4location: 'stock.location,5'23:12
uha4location: stock.location,3 -- direkt type: storage -- from_location_type: supplier23:12
uha4pokoli: but printing "self.from_location_type" doesn't involve pyson, this also gives always the old value23:26
uha4pokoli: 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...23:27

Generated by 2.11.0 by Marius Gedminas - find it at!