From 03418626d39801d86ccdd87c47cd879a795d0fd7 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Wed, 5 Jul 2023 09:49:37 +0200 Subject: [PATCH] [FIX] account_asset_management: pass for context correct active_id. If not specified the value of active_id will be that of account.asset.line. --- account_asset_management/wizard/wiz_asset_move_reverse.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/account_asset_management/wizard/wiz_asset_move_reverse.py b/account_asset_management/wizard/wiz_asset_move_reverse.py index 7fd420b1..75f03721 100644 --- a/account_asset_management/wizard/wiz_asset_move_reverse.py +++ b/account_asset_management/wizard/wiz_asset_move_reverse.py @@ -40,7 +40,9 @@ class WizAssetMoveReverse(models.TransientModel): move = self.line_id.move_id move_reversal = ( self.env["account.move.reversal"] - .with_context(active_model="account.move", active_ids=move.ids) + .with_context( + active_model="account.move", active_ids=move.ids, active_id=move.id + ) .create( { "date": fields.Date.today(),