Open Luke1982 opened 3 years ago
what are the reasons? why is it happening?
Don't know yet. As always I only notice this after the fact and need to find a common trait that binds them. If and when I do find them I'll report back.
I just added a couple of changes that may be related
https://github.com/tsolucio/corebos/commit/146405b39c580abcbcacfaa0c7db51c1e0353897
https://github.com/tsolucio/corebos/commit/7b496d55c8e88452a5455707251f68c12be33ebe
while looking into the quote/SO/invoice status change history I found that inventory details are being saved a LOT and the global request gets changed during those saves. The two changes above reduce those context changes and it seems to work better, but you need to validate as I have not been informed of this behavior by anyone else.
Let me know how it goes
I will. Yes, the global/request variable thing related to inventorylines is a VERY precarious thing which I think is a problem. The mechanism is so dependent on these that someone who writes a lot of code that manipulates salesorders (like I do) will likely run into scenario's where you accidentally wipe them. This is the same with product taxes and multicurrency: if you don't mimic the correct request you risk losing a lot of data. This is one of the reasons I'm working on a new inventory mechanism using inventorydetails.
This problem keeps occuring for various reasons. I again have some salesorders where all the lines are gone.