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 #tryton01:12
-!- yangoon1(~mathiasb@166-72-142-46.pool.kielnet.net) has joined #tryton04:12
-!- thaneor(~lenovo3@r179-24-36-80.dialup.adsl.anteldata.net.uy) has joined #tryton07:12
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton07:12
-!- rpit(~rpit@p200300C88F32F600A22070230F535743.dip0.t-ipconnect.de) has joined #tryton08:12
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton08:12
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton08:12
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton09:12
-!- josesalvador(~josesalva@84.124.29.26.static.user.ono.com) has joined #tryton09:12
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" ?09:12
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:12
pokolimrichez: since version 5.4 we ensure that on_change work also from One2Many fields (where _parent_ is used)09:12
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 clients09:12
mrichezpokoli: ok, thanks for explanation :-)09:12
mrichezpokoli: now got this error : AssertionError: Invalid empty "_parent_sale" in "sale.amendment"."customer"."on_change_with"09:12
mrichezoups forgot party :-)09:12
pokolimrichez: did you add '_parent_sale.party'? or what you added?09:12
mrichezpokoli: indeed i forgot party09:12
mrichezpokoli: working now09:12
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?09:12
cedkmrichez: your custom module must depend on sale09:12
mrichezcedk: yes...sale is in the depends... sale_amendment in extras_depend... but my custo concern amendments field in sale module...09:12
mrichezcedk i have another file sale2.py ... with the customization  and register this file in __init__.py with sale_amendment as depends09:12
mrichezcedk: sorry i mean should i have another file sale2.py09:12
mrichezcedk: something like this : https://pastebin.com/ps385F5P09:12
cedkmrichez: I guess your code is depending on sale_amendment in some way10:12
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....10:12
mrichezcedk: but having another file with same model as extras_depend like in my paste would be a solution ?10:12
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/z6hzw7bM10:12
cedkmrichez: normally yes10:12
mrichezcedk: ok :-)10:12
pokoliscrapper: try4 is what is looks better good to my10:12
pokoliscrapper: pyson has the And operation which should be used to build the logical and. For example: And(condition1, condition2)10:12
pokoliscrapper: take in account that both conditions should return a boolean type10:12
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton10:12
cedkscrapper: it should be: (Eval('self', {}).get('layout_style') == 'layoutStyleTwo') & (Eval('self', {}).get('state') == 'posted')10:12
scrappercedk: Error "Condition" is required. image tells more than words https://pasteboard.co/IM6w1CA.png10:12
scrapperpokoli: thanks for your hints, but no luck until now.10:12
cedkscrapper: from sao, you can not use the "operators" so it should be:10:12
cedkAnd(Equal(Eval('self', {}).get('layout_style'), 'layoutStyleTwo'), Eval('self', {}).get('state') == 'posted')10:12
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.10:12
cedkthat's because in JS we can not override operators like in Python10:12
scrappercedk: sure, now i do understand the cause of this case. Thank you very much!10:12
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton11:12
-!- mariomop(~quassel@181.228.29.59) has joined #tryton11:12
-!- rpit1(~rpit@p200300C88F32F600A22070230F535743.dip0.t-ipconnect.de) has joined #tryton15:12
-!- McFloss(~McFloss@cpc121904-irvi3-2-0-cust131.14-1.cable.virginm.net) has joined #tryton19:12
-!- thaneor1(~lenovo3@r167-56-173-65.dialup.adsl.anteldata.net.uy) has joined #tryton19:12

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