IRC logs of #tryton for Friday, 2019-12-20 #tryton log beginning Fri 20 Dec 2019 12:00:01 AM CET
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton00:37
-!- yangoon1( has joined #tryton03:18
-!- thaneor( has joined #tryton06:17
-!- springwurm(~Springwur@ has joined #tryton06:30
-!- rpit( has joined #tryton07:11
-!- mrichez( has joined #tryton07:20
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton07:59
-!- mrichez( has joined #tryton08:06
-!- josesalvador( has joined #tryton08:17
mrichezhi, when doing test on a custom code:    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 '' 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 ''? 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: 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 ... with the customization  and register this file in with sale_amendment as depends08:56
mrichezcedk: sorry i mean should i have another file sale2.py08:56
mrichezcedk: something like this :
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
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
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( has joined #tryton10:20
-!- mariomop(~quassel@ has joined #tryton10:43
-!- rpit1( has joined #tryton14:13
-!- McFloss( has joined #tryton18:02
-!- thaneor1( has joined #tryton18:20

Generated by 2.17.3 by Marius Gedminas - find it at!