Update account asset history, since the asset is on debit, the history lines should show the credit account move line, the line with the category account_depreciation_id. If the date is not in the context try first to get the date from the depreciation line, it will respect the date mentioned in depreciation line, instead of current date. I took the depreciation line date, because the cases of posting de asset depreciation in previous accounting periods is bigger that cases when you will post many depreciation lines in the current period, for the same asset.