chat.freenode.net #tryton log beginning Fri 20 Dec 2019 12:00:01 AM CET | ||
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 00:37 | |
-!- yangoon1(~mathiasb@166-72-142-46.pool.kielnet.net) has joined #tryton | 03:18 | |
-!- thaneor(~lenovo3@r179-24-36-80.dialup.adsl.anteldata.net.uy) has joined #tryton | 06:17 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 06:30 | |
-!- rpit(~rpit@p200300C88F32F600A22070230F535743.dip0.t-ipconnect.de) has joined #tryton | 07:11 | |
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton | 07:20 | |
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton | 07:59 | |
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton | 08:06 | |
-!- josesalvador(~josesalva@84.124.29.26.static.user.ono.com) has joined #tryton | 08:17 | |
mrichez | hi, when doing test on a custom code: https://pastebin.com/YQQNSwmA got this error AssertionError: Missing "_parent_sale" in "sale.amendment"."customer"."on_change_with" ... Don't understand why i should have a "_parent_sale" ? | 08:26 |
---|---|---|
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 08:30 | |
pokoli | mrichez: since version 5.4 we ensure that on_change work also from One2Many fields (where _parent_ is used) | 08:40 |
pokoli | mrichez: so as you should add '_parent_sale.party' as depends, so when used in a One2Many relation the party field is correctly updated on the clients | 08:41 |
mrichez | pokoli: ok, thanks for explanation :-) | 08:43 |
mrichez | pokoli: now got this error : AssertionError: Invalid empty "_parent_sale" in "sale.amendment"."customer"."on_change_with" | 08:44 |
mrichez | oups forgot party :-) | 08:44 |
pokoli | mrichez: did you add '_parent_sale.party'? or what you added? | 08:44 |
mrichez | pokoli: indeed i forgot party | 08:45 |
mrichez | pokoli: working now | 08:45 |
mrichez | another question concerning extras_depend... in a custom module sale_amendment is an extra depend, sale is a depend... i wish to update amendments field which is in sale model when using sale_amendment... so unless to switch sale_amendment from extras_depend, i get an error as amendments field doesn't exists. How to do this properly? | 08:49 |
cedk | mrichez: your custom module must depend on sale | 08:52 |
mrichez | cedk: yes...sale is in the depends... sale_amendment in extras_depend... but my custo concern amendments field in sale module... | 08:55 |
mrichez | cedk i have another file sale2.py ... with the customization and register this file in __init__.py with sale_amendment as depends | 08:56 |
mrichez | cedk: sorry i mean should i have another file sale2.py | 08:56 |
mrichez | cedk: something like this : https://pastebin.com/ps385F5P | 08:58 |
cedk | mrichez: I guess your code is depending on sale_amendment in some way | 09:09 |
mrichez | cedk: yes in some way... i'm just changing field visibility state... but this field is created by the module sale_amendment which is extras_depend... my problem is solved moving from extras_depend to depend.... | 09:14 |
mrichez | cedk: but having another file with same model as extras_depend like in my paste would be a solution ? | 09:15 |
scrapper | Hi folks, sorry for the noise but could need some help with PYSON Statement. I have a working Trigger Condition ["self.state", "=", "posted"] (Module: notification_email) thats fine! But what i try to achieve now is to extend that Trigger Condition with logical AND. Multiple trial and error of mine: please have a look at https://pastebin.com/z6hzw7bM | 09:17 |
cedk | mrichez: normally yes | 09:18 |
mrichez | cedk: ok :-) | 09:18 |
pokoli | scrapper: try4 is what is looks better good to my | 09:18 |
pokoli | scrapper: pyson has the And operation which should be used to build the logical and. For example: And(condition1, condition2) | 09:19 |
pokoli | scrapper: take in account that both conditions should return a boolean type | 09:19 |
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton | 09:22 | |
cedk | scrapper: it should be: (Eval('self', {}).get('layout_style') == 'layoutStyleTwo') & (Eval('self', {}).get('state') == 'posted') | 09:23 |
scrapper | cedk: Error "Condition" is required. image tells more than words https://pasteboard.co/IM6w1CA.png | 09:31 |
scrapper | pokoli: thanks for your hints, but no luck until now. | 09:32 |
cedk | scrapper: from sao, you can not use the "operators" so it should be: | 09:36 |
cedk | And(Equal(Eval('self', {}).get('layout_style'), 'layoutStyleTwo'), Eval('self', {}).get('state') == 'posted') | 09:36 |
scrapper | cedk: I test and report back, but thank you already SAO was not able exactly as you said to save that data... but tryton-client is working fine. | 09:46 |
cedk | that's because in JS we can not override operators like in Python | 09:48 |
scrapper | cedk: sure, now i do understand the cause of this case. Thank you very much! | 09:51 |
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton | 10:20 | |
-!- mariomop(~quassel@181.228.29.59) has joined #tryton | 10:43 | |
-!- rpit1(~rpit@p200300C88F32F600A22070230F535743.dip0.t-ipconnect.de) has joined #tryton | 14:13 | |
-!- McFloss(~McFloss@cpc121904-irvi3-2-0-cust131.14-1.cable.virginm.net) has joined #tryton | 18:02 | |
-!- thaneor1(~lenovo3@r167-56-173-65.dialup.adsl.anteldata.net.uy) has joined #tryton | 18:20 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!