Do not use builtin type in function

This commit is contained in:
Akim Juillerat
2018-10-01 17:58:34 +02:00
committed by Luc De Meyer
parent 143bbfdbf3
commit a78a0dc8ba

View File

@@ -184,14 +184,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