IRC logs of #tryton for Friday, 2019-12-20

chat.freenode.net #tryton log beginning Fri 20 Dec 2019 12:00:01 AM CET
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton00:37
-!- yangoon1(~mathiasb@166-72-142-46.pool.kielnet.net) has joined #tryton03:18
-!- thaneor(~lenovo3@r179-24-36-80.dialup.adsl.anteldata.net.uy) has joined #tryton06:17
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton06:30
-!- rpit(~rpit@p200300C88F32F600A22070230F535743.dip0.t-ipconnect.de) has joined #tryton07:11
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton07:20
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton07:59
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton08:06
-!- josesalvador(~josesalva@84.124.29.26.static.user.ono.com) has joined #tryton08:17
mrichezhi, 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 #tryton08:30
pokolimrichez: since version 5.4 we ensure that on_change work also from One2Many fields (where _parent_ is used)08:40
pokolimrichez: 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 clients08:41
mrichezpokoli: ok, thanks for explanation :-)08:43
mrichezpokoli: now got this error : AssertionError: Invalid empty "_parent_sale" in "sale.amendment"."customer"."on_change_with"08:44
mrichezoups forgot party :-)08:44
pokolimrichez: did you add '_parent_sale.party'? or what you added?08:44
mrichezpokoli: indeed i forgot party08:45
mrichezpokoli: working now08:45
mrichezanother 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
cedkmrichez: your custom module must depend on sale08:52
mrichezcedk: yes...sale is in the depends... sale_amendment in extras_depend... but my custo concern amendments field in sale module...08:55
mrichezcedk i have another file sale2.py ... with the customization  and register this file in __init__.py with sale_amendment as depends08:56
mrichezcedk: sorry i mean should i have another file sale2.py08:56
mrichezcedk: something like this : https://pastebin.com/ps385F5P08:58
cedkmrichez: I guess your code is depending on sale_amendment in some way09:09
mrichezcedk: 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
mrichezcedk: but having another file with same model as extras_depend like in my paste would be a solution ?09:15
scrapperHi 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/z6hzw7bM09:17
cedkmrichez: normally yes09:18
mrichezcedk: ok :-)09:18
pokoliscrapper: try4 is what is looks better good to my09:18
pokoliscrapper: pyson has the And operation which should be used to build the logical and. For example: And(condition1, condition2)09:19
pokoliscrapper: take in account that both conditions should return a boolean type09:19
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton09:22
cedkscrapper: it should be: (Eval('self', {}).get('layout_style') == 'layoutStyleTwo') & (Eval('self', {}).get('state') == 'posted')09:23
scrappercedk: Error "Condition" is required. image tells more than words https://pasteboard.co/IM6w1CA.png09:31
scrapperpokoli: thanks for your hints, but no luck until now.09:32
cedkscrapper: from sao, you can not use the "operators" so it should be:09:36
cedkAnd(Equal(Eval('self', {}).get('layout_style'), 'layoutStyleTwo'), Eval('self', {}).get('state') == 'posted')09:36
scrappercedk: 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
cedkthat's because in JS we can not override operators like in Python09:48
scrappercedk: sure, now i do understand the cause of this case. Thank you very much!09:51
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton10:20
-!- mariomop(~quassel@181.228.29.59) has joined #tryton10:43
-!- rpit1(~rpit@p200300C88F32F600A22070230F535743.dip0.t-ipconnect.de) has joined #tryton14:13
-!- McFloss(~McFloss@cpc121904-irvi3-2-0-cust131.14-1.cable.virginm.net) has joined #tryton18:02
-!- thaneor1(~lenovo3@r167-56-173-65.dialup.adsl.anteldata.net.uy) has joined #tryton18:20

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