|
@ -720,10 +720,14 @@ class AccountAssetDepreciationLine(models.Model): |
|
|
'depreciation_date') or line.depreciation_date or |
|
|
'depreciation_date') or line.depreciation_date or |
|
|
fields.Date.context_today( |
|
|
fields.Date.context_today( |
|
|
self)) |
|
|
self)) |
|
|
|
|
|
today_date = self._context.get('date') or fields.Date.today() |
|
|
|
|
|
company = self.env['res.company'].browse( |
|
|
|
|
|
self._context.get('company_id')) or self.env.company |
|
|
company_currency = line.asset_id.company_id.currency_id |
|
|
company_currency = line.asset_id.company_id.currency_id |
|
|
current_currency = line.asset_id.currency_id |
|
|
current_currency = line.asset_id.currency_id |
|
|
amount = current_currency.with_context( |
|
|
amount = current_currency.with_context( |
|
|
date=depreciation_date).compute(line.amount, company_currency) |
|
|
date=depreciation_date)._convert(line.amount, company_currency, |
|
|
|
|
|
company, today_date) |
|
|
asset_name = line.asset_id.name + ' (%s/%s)' % ( |
|
|
asset_name = line.asset_id.name + ' (%s/%s)' % ( |
|
|
line.sequence, len(line.asset_id.depreciation_line_ids)) |
|
|
line.sequence, len(line.asset_id.depreciation_line_ids)) |
|
|
partner = self.env['res.partner']._find_accounting_partner( |
|
|
partner = self.env['res.partner']._find_accounting_partner( |
|
|