2
0

[FIX] account_asset_management: Missing field renaming

type > move_type, due to uncovered code.
This commit is contained in:
Pedro M. Baeza 2021-01-26 15:59:48 +01:00 committed by Rodrigo
parent bfdda99bf9
commit 1620d3a4d8
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@
{
"name": "Assets Management",
"version": "14.0.1.0.0",
"version": "14.0.1.0.1",
"license": "AGPL-3",
"depends": ["account"],
"excludes": ["account_asset"],

View File

@ -100,7 +100,7 @@ class AccountMove(models.Model):
def _reverse_move_vals(self, default_values, cancel=True):
move_vals = super()._reverse_move_vals(default_values, cancel)
if move_vals["type"] not in ("out_invoice", "out_refund"):
if move_vals["move_type"] not in ("out_invoice", "out_refund"):
for line_command in move_vals.get("line_ids", []):
line_vals = line_command[2] # (0, 0, {...})
asset = self.env["account.asset"].browse(line_vals["asset_id"])