IRC logs of #tryton for Friday, 2020-12-18

chat.freenode.net #tryton log beginning Fri Dec 18 12:00:01 AM CET 2020
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton00:58
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton05:55
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton06:15
-!- Timitos(~kpreisler@2001:a61:578:ee01:762b:62ff:fe84:ed7e) has joined #tryton06:43
-!- rpit(~rpit@p200300c88f4cbb00cea2955fb3b32f1a.dip0.t-ipconnect.de) has joined #tryton08:06
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton08:18
-!- Springwurm_(~Springwur@5.104.149.54) has joined #tryton08:40
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:06
mrichezHi, back with my yesterday problem about warning on validate. I change the warning key (switch id with lot.number and lot.product). Still the warning loop on create. See video here: https://filebin.net/f8h5fhdjtbr0kz4i/simplescreenrecorder-2020-12-18_09.58.01.mp4?t=mn6y02f409:13
cedkmrichez: maybe the validation happens twice09:15
cedkit may be good to delay the delete of record in Warning.check09:15
mrichezcedk: Will add a delay. Here's my code: https://pastebin.com/JLUnqiwC09:18
mrichezcedk: don't see another validation def... validation is looping at creation09:22
mrichezcedk: could it be linked on decorator on "write" ? https://hg.tryton.org/modules/stock_lot/file/tip/stock.py#l7909:24
mrichezcedk: validate is called each time i click on "yes" in the Warning.09:39
cedkmrichez: validate must be called each time a record is modified09:43
cedkmrichez: but it could happen that the record is modified multiple times09:43
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton09:47
mrichezcedk: i'll try with a new simple model with a validate and a warning to see if this warning loop happens in this case or if it's only linked to my stock.lot model09:47
mrichezcedk: without Warning, validate is called once. Clicking yes on Warning Popup could call validate again ?10:07
cedkmrichez: I do not understand10:08
mrichezcedk: i just remove the Warning test (lines 65-66-67) in my code : https://pastebin.com/JLUnqiwC . So there's stil a "validate" but without warning message. I add a print in validate for debug. When i save my model, "validate" is just called once.10:11
mrichezIt seems when raising the warning, validate is called again after the "yes" on the popup warning10:12
cedkmrichez: yes it is normal10:15
mrichezcedk: ok, and how to exit the process to prevent to validate again ?10:18
cedkmrichez: you can not prevent the validation10:20
cedkmrichez: the warning should just be ignored10:20
-!- mariomop(~quassel@190.193.24.112) has joined #tryton10:49
-!- ioanp(~ioanp@78-69-28-182-no206.tbcn.telia.com) has joined #tryton13:07
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton13:08
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton14:02
-!- mariomop(~quassel@190.193.24.112) has joined #tryton18:59
-!- mariomop(~quassel@190.193.24.112) has joined #tryton21:07

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