-
- Downloads
[FIX] web: image widget is dependent on its record's last_update
As a way to optimize loading, images are not necessarily fetched in db. They have, in their url a "unique" parameter, which is the last_update date on **the record** and controls on the python-side whether it should get the image from a cache or from the db. Before this commit, this __last_update field wasn't present in the view, so it wasn't fetched, and writes on a model's image worked but did not refresh. The image displayed was the old one. After this commit, when the image field widget is present, we force the loading of the __last_update field of the record. Upon update, the image displayed is the new one. OPW 777552 closes #20457
Showing
- addons/web/static/src/js/fields/abstract_field.js 9 additions, 0 deletionsaddons/web/static/src/js/fields/abstract_field.js
- addons/web/static/src/js/fields/basic_fields.js 6 additions, 1 deletionaddons/web/static/src/js/fields/basic_fields.js
- addons/web/static/src/js/services/data_manager.js 14 additions, 0 deletionsaddons/web/static/src/js/services/data_manager.js
- addons/web/static/tests/fields/basic_fields_tests.js 7 additions, 2 deletionsaddons/web/static/tests/fields/basic_fields_tests.js
Loading
Please register or sign in to comment