mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
Do not use builtin type in function
This commit is contained in:
committed by
OCA-git-bot
parent
ef761c1eba
commit
dc816fee61
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user