How to update a field which is set from another doctype?

I was trying to set a value from another doctype. and once it is set through py and if I go back to the window by clicking the back button of the browser it is not getting updated in the corresponding field until I reload the page.

Can anyone please help me to solve this?