Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][FIX] account_asset_management: no create asset reversal move #1933

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions account_asset_management/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ def _prepare_asset_vals(self, aml):

def _post(self, soft=True):
ret_val = super()._post(soft=soft)
# Skip asset creation if we are reversing the move
if self.env.context.get("move_reverse_cancel"):
return ret_val

for move in self:
for aml in move.line_ids.filtered(
lambda line: line.asset_profile_id and not line.tax_line_id
Expand Down
Loading