The goal of this commit is to restore the behaviour of the legacy
attach_document widget.
How to reproduce :
- clicking on the attach_document button and selecting a file
In legacy:
We have a full reload of the view (Render and reload the record).
Before this commit:
Render the view without reloading the record.
After this commit:
We reload the model which causes a rendering of the view and a reload of
the record.
Why do we have to reload the record ?
If the action linked to the attach_document button modifies the record,
we want this modification to be applied in the view and not only on the
server side. To do this, we need to reload the record data to ensure
that all the changes are displayed in the view.
closesodoo/odoo#103891
X-original-commit: 82d4f0cd2f0265393cf66cd7be1a0a714584400c
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>