From dc816fee616f7e83b7f20b040eb8dfff87900c64 Mon Sep 17 00:00:00 2001 From: Akim Juillerat Date: Mon, 1 Oct 2018 17:58:34 +0200 Subject: [PATCH] Do not use builtin type in function --- account_asset_management/models/account_asset_line.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/account_asset_management/models/account_asset_line.py b/account_asset_management/models/account_asset_line.py index 0e75e4eb1..10e062974 100644 --- a/account_asset_management/models/account_asset_line.py +++ b/account_asset_management/models/account_asset_line.py @@ -183,14 +183,14 @@ class AccountAssetLine(models.Model): } return move_data - def _setup_move_line_data(self, depreciation_date, account, type, move): + def _setup_move_line_data(self, depreciation_date, account, ml_type, move): asset = self.asset_id amount = self.amount analytic_id = False - if type == 'depreciation': + if ml_type == 'depreciation': debit = amount < 0 and -amount or 0.0 credit = amount > 0 and amount or 0.0 - elif type == 'expense': + elif ml_type == 'expense': debit = amount > 0 and amount or 0.0 credit = amount < 0 and -amount or 0.0 analytic_id = asset.account_analytic_id.id