[MIG] account_spread_cost_revenue to V12

This commit is contained in:
Andrea
2018-12-20 10:21:14 +01:00
committed by Andrea Stirpe
parent f0e84cebd9
commit 773b8f48e7
12 changed files with 125 additions and 119 deletions

View File

@@ -75,8 +75,8 @@ class AccountInvoiceSpreadLine(models.Model):
company_currency = spread.company_id.currency_id
current_currency = spread.currency_id
not_same_curr = company_currency != current_currency
amount = current_currency.with_context(date=spread_date).compute(
self.amount, company_currency)
amount = current_currency._convert(
self.amount, company_currency, spread.company_id, spread_date)
line_ids = [(0, 0, {
'name': spread.name.split('\n')[0][:64],