Do not use builtin type in function

This commit is contained in:
Akim Juillerat
2018-10-01 17:58:34 +02:00
committed by OCA-git-bot
parent ef761c1eba
commit dc816fee61

View File

@@ -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