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 #tryton01:12
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton06:12
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton07:12
-!- Timitos(~kpreisler@2001:a61:578:ee01:762b:62ff:fe84:ed7e) has joined #tryton07:12
-!- rpit(~rpit@p200300c88f4cbb00cea2955fb3b32f1a.dip0.t-ipconnect.de) has joined #tryton09:12
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton09:12
-!- Springwurm_(~Springwur@5.104.149.54) has joined #tryton09:12
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton10:12
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=mn6y02f410:12
cedkmrichez: maybe the validation happens twice10:12
cedkit may be good to delay the delete of record in Warning.check10:12
mrichezcedk: Will add a delay. Here's my code: https://pastebin.com/JLUnqiwC10:12
mrichezcedk: don't see another validation def... validation is looping at creation10:12
mrichezcedk: could it be linked on decorator on "write" ? https://hg.tryton.org/modules/stock_lot/file/tip/stock.py#l7910:12
mrichezcedk: validate is called each time i click on "yes" in the Warning.10:12
cedkmrichez: validate must be called each time a record is modified10:12
cedkmrichez: but it could happen that the record is modified multiple times10:12
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton10:12
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 model10:12
mrichezcedk: without Warning, validate is called once. Clicking yes on Warning Popup could call validate again ?11:12
cedkmrichez: I do not understand11:12
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.11:12
mrichezIt seems when raising the warning, validate is called again after the "yes" on the popup warning11:12
cedkmrichez: yes it is normal11:12
mrichezcedk: ok, and how to exit the process to prevent to validate again ?11:12
cedkmrichez: you can not prevent the validation11:12
cedkmrichez: the warning should just be ignored11:12
-!- mariomop(~quassel@190.193.24.112) has joined #tryton11:12
-!- ioanp(~ioanp@78-69-28-182-no206.tbcn.telia.com) has joined #tryton14:12
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton14:12
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton15:12
-!- mariomop(~quassel@190.193.24.112) has joined #tryton19:12
-!- mariomop(~quassel@190.193.24.112) has joined #tryton22:12

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