[FIX] account_asset: currency conversion inverted
During the conversion of the module `account_asset` to the new API, the currency conversion in `create_move` has been inverted. ``` amount = currency_obj.compute(cr, uid, current_currency, company_currency, line.amount, context=context) ``` has been converted to ``` amount = company_currency.compute(line.amount, current_currency) ``` while it should have been converted to ``` amount = current_currency.compute(line.amount, company_currency) ``` See: https://github.com/odoo/odoo/commit/6120bab#diff-e35933343c229da0afceb2a3b9e3639bR356 opw-669568
This commit is contained in:
@@ -353,7 +353,7 @@ class AccountAssetDepreciationLine(models.Model):
|
||||
periods = self.env['account.period'].find(depreciation_date)
|
||||
company_currency = line.asset_id.company_id.currency_id
|
||||
current_currency = line.asset_id.currency_id
|
||||
amount = company_currency.compute(line.amount, current_currency)
|
||||
amount = current_currency.compute(line.amount, company_currency)
|
||||
sign = (line.asset_id.category_id.journal_id.type == 'purchase' or line.asset_id.category_id.journal_id.type == 'sale' and 1) or -1
|
||||
asset_name = "/"
|
||||
reference = line.asset_id.name
|
||||
|
||||
Reference in New Issue
Block a user