From 688934e9a3f1ff8dc93e98a2b2c997858aaed867 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Thu, 30 Oct 2014 14:53:58 +0100 Subject: [PATCH] New phrase to pay fully an invoice --- .../scenarios/features/steps/account_voucher.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/account_credit_control/scenarios/features/steps/account_voucher.py b/account_credit_control/scenarios/features/steps/account_voucher.py index e0d32f36e..921278ceb 100644 --- a/account_credit_control/scenarios/features/steps/account_voucher.py +++ b/account_credit_control/scenarios/features/steps/account_voucher.py @@ -3,6 +3,16 @@ from support import * import datetime + +@step('I pay the full amount on the invoice "{inv_name}"') +def impl(ctx, inv_name): + Invoice = model('account.invoice') + invoice = Invoice.get([('name', '=', inv_name)]) + assert invoice + ctx.execute_steps(""" + When I pay %f on the invoice "%s" + """ % (invoice.residual, inv_name)) + @step('I pay {amount:f} on the invoice "{inv_name}"') def impl(ctx, amount, inv_name): Partner = model('res.partner')