diff --git a/modules/account_cash_rounding/tests/scenario_account_cash_rounding_alternate_currency.rst b/modules/account_cash_rounding/tests/scenario_account_cash_rounding_alternate_currency.rst index e771e27331..e38afad0b3 100644 --- a/modules/account_cash_rounding/tests/scenario_account_cash_rounding_alternate_currency.rst +++ b/modules/account_cash_rounding/tests/scenario_account_cash_rounding_alternate_currency.rst @@ -19,6 +19,8 @@ Activate modules:: >>> config = activate_modules(['account_cash_rounding', 'account_invoice']) + >>> Configuration = Model.get('account.configuration') + Set alternate currencies:: >>> currency = get_currency('USD') @@ -42,6 +44,16 @@ Create chart of accounts:: >>> _ = create_chart(company) >>> accounts = get_accounts(company) +Configure currency exchange:: + + >>> currency_exchange_account, = ( + ... accounts['revenue'].duplicate( + ... default={'name': "Currency Exchange"})) + >>> configuration = Configuration(1) + >>> configuration.currency_exchange_debit_account = ( + ... currency_exchange_account) + >>> configuration.save() + Set cash rounding:: >>> cash_rounding_credit = Account(name="Cash Rounding") @@ -98,6 +110,6 @@ Post invoice:: >>> line_to_pay, = invoice.lines_to_pay >>> line_to_pay.debit, line_to_pay.credit - (Decimal('21.03'), Decimal('0')) + (Decimal('21.02'), Decimal('0')) >>> line_to_pay.amount_second_currency Decimal('42.05')