Merge pull request #24947 from deepeshgarg007/multi_currency_lcv_issues_v13

fix: Allow user to update exchange rate in Multi-currency LCV
This commit is contained in:
Deepesh Garg 2021-03-18 21:21:57 +05:30 committed by GitHub
commit 23af1ed372
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -779,7 +779,7 @@ class init_landed_taxes_and_totals(object):
for d in self.doc.get(self.tax_field):
if d.account_currency == company_currency:
d.exchange_rate = 1
elif not d.exchange_rate or d.exchange_rate == 1 or self.doc.posting_date:
elif not d.exchange_rate:
d.exchange_rate = get_exchange_rate(self.doc.posting_date, account=d.expense_account,
account_currency=d.account_currency, company=self.doc.company)