From 90eb3b797563e949b7d2461c9e7bcc9f4cbe8c92 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 17 May 2017 16:46:59 +0200 Subject: [PATCH] Add test for credit invoies with non line lines --- tests/scenario_invoice.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/scenario_invoice.rst b/tests/scenario_invoice.rst index d332fa5c09..dc99e44e86 100644 --- a/tests/scenario_invoice.rst +++ b/tests/scenario_invoice.rst @@ -343,3 +343,20 @@ The invoice is posted when the reconciliation is deleted:: >>> invoice.state u'posted' >>> invoice.tax_identifier + +Credit invoice with non line lines:: + + >>> invoice = Invoice() + >>> invoice.party = party + >>> invoice.payment_term = payment_term + >>> line = invoice.lines.new() + >>> line.product = product + >>> line.quantity = 5 + >>> line.unit_price = Decimal('40') + >>> line = invoice.lines.new() + >>> line.type = 'comment' + >>> line.description = 'Comment' + >>> invoice.click('post') + >>> credit = Wizard('account.invoice.credit', [invoice]) + >>> credit.form.with_refund = True + >>> credit.execute('credit')