chat.freenode.net #tryton log beginning Fri Dec 18 12:00:01 AM CET 2020 | ||
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 00:58 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 05:55 | |
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton | 06:15 | |
-!- Timitos(~kpreisler@2001:a61:578:ee01:762b:62ff:fe84:ed7e) has joined #tryton | 06:43 | |
-!- rpit(~rpit@p200300c88f4cbb00cea2955fb3b32f1a.dip0.t-ipconnect.de) has joined #tryton | 08:06 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 08:18 | |
-!- Springwurm_(~Springwur@5.104.149.54) has joined #tryton | 08:40 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 09:06 | |
mrichez | Hi, 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=mn6y02f4 | 09:13 |
---|---|---|
cedk | mrichez: maybe the validation happens twice | 09:15 |
cedk | it may be good to delay the delete of record in Warning.check | 09:15 |
mrichez | cedk: Will add a delay. Here's my code: https://pastebin.com/JLUnqiwC | 09:18 |
mrichez | cedk: don't see another validation def... validation is looping at creation | 09:22 |
mrichez | cedk: could it be linked on decorator on "write" ? https://hg.tryton.org/modules/stock_lot/file/tip/stock.py#l79 | 09:24 |
mrichez | cedk: validate is called each time i click on "yes" in the Warning. | 09:39 |
cedk | mrichez: validate must be called each time a record is modified | 09:43 |
cedk | mrichez: but it could happen that the record is modified multiple times | 09:43 |
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton | 09:47 | |
mrichez | cedk: 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 model | 09:47 |
mrichez | cedk: without Warning, validate is called once. Clicking yes on Warning Popup could call validate again ? | 10:07 |
cedk | mrichez: I do not understand | 10:08 |
mrichez | cedk: 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 |
mrichez | It seems when raising the warning, validate is called again after the "yes" on the popup warning | 10:12 |
cedk | mrichez: yes it is normal | 10:15 |
mrichez | cedk: ok, and how to exit the process to prevent to validate again ? | 10:18 |
cedk | mrichez: you can not prevent the validation | 10:20 |
cedk | mrichez: the warning should just be ignored | 10:20 |
-!- mariomop(~quassel@190.193.24.112) has joined #tryton | 10:49 | |
-!- ioanp(~ioanp@78-69-28-182-no206.tbcn.telia.com) has joined #tryton | 13:07 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 13:08 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 14:02 | |
-!- mariomop(~quassel@190.193.24.112) has joined #tryton | 18:59 | |
-!- mariomop(~quassel@190.193.24.112) has joined #tryton | 21:07 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!