diff --git a/tests/scenario_sale_supply_drop_shipment_on_invoice.rst b/tests/scenario_sale_supply_drop_shipment_on_invoice.rst index 718ab2ff8b..84dc90e67a 100644 --- a/tests/scenario_sale_supply_drop_shipment_on_invoice.rst +++ b/tests/scenario_sale_supply_drop_shipment_on_invoice.rst @@ -36,10 +36,15 @@ Create chart of accounts:: >>> accounts = get_accounts(company) >>> Journal = Model.get('account.journal') + >>> PaymentMethod = Model.get('account.invoice.payment.method') >>> cash_journal, = Journal.find([('type', '=', 'cash')]) - >>> cash_journal.credit_account = accounts['cash'] - >>> cash_journal.debit_account = accounts['cash'] >>> cash_journal.save() + >>> payment_method = PaymentMethod() + >>> payment_method.name = 'Cash' + >>> payment_method.journal = cash_journal + >>> payment_method.credit_account = accounts['cash'] + >>> payment_method.debit_account = accounts['cash'] + >>> payment_method.save() Create parties:: @@ -111,7 +116,7 @@ Pay for 3 products:: >>> invoice_line.quantity = 3 >>> invoice.click('post') >>> pay = Wizard('account.invoice.pay', [invoice]) - >>> pay.form.journal = cash_journal + >>> pay.form.payment_method = payment_method >>> pay.execute('choice') Not yet a purchase request:: @@ -130,7 +135,7 @@ Pay for remaining products:: >>> _, invoice = sale.invoices >>> invoice.click('post') >>> pay = Wizard('account.invoice.pay', [invoice]) - >>> pay.form.journal = cash_journal + >>> pay.form.payment_method = payment_method >>> pay.execute('choice') Check drop shipment::