Is there a way to avoid the #ERROR in the tree view when we delete one record with a wizard action on it ? Just before the ‘reload’ the user could see a moment with lines deleted by the wizard with #ERROR. This view is linked with a class with a table_query method.
This text means there is some error on while loading the some field of the view.
You should review your server logs and fix the errors show there. Once the errors are fixes the error is fixed.
the wizard delete some of the selected records, modify the other and create new ones. It’s the deleted ones that contain the #ERROR but disappear after the reload.
What is the mecanism, the end of the wizard is sending a refresh to the view ?
A wizard is not supposed to delete record on which it is running because at the end of the execution, the client reload all the selected record but it does not know that some has been deleted.
Yes this was my point, the mecanism between the view and the wizard in term of reload. I use the code above with return ‘reload’. It’s nice to present to the user the result of the wizard without he has to reload manually, it works for new lines, updated lines but not for deleted. In term of functionnality I start from a quantity to affect in the wizard and if it’s a part of the quantity, it’s an update. Could be a split with new lines but if you use all the quantity I need to delete the line …
I can just temporary hide the line by setting a flag ‘visible’ (table_query should have it in the where clause) to false and deleting later …
=> No it doesn’t work ! Same thing #ERROR by changing the flag
So I’m curious Cédric how you’ll handle this, a list of physical quantities let’s say your stock. You can select one and then apply action of decrease quantity (update line), split (create new lines) or use it totally (delete the line). so what you select in the report, you’re not sure that it will be here at the end of the action.
The problem is that the user can decide to split by 10 for 10 sales and finally 5 min after wanted to split just in 4. An action called ‘Unsplit’ will put 0 for 6 lines and the user for sure will tell me “Could you please drop the line with quantity = 0”
You was talking about implicit reload, do you think it’s possible to shunt it without modifying the core module ?