From 7e204d4635b34f2fe8af935e753eed552bf114f9 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 16 Mar 2016 13:25:36 +0100 Subject: [PATCH] Add scenario to test base rounding issue5370 review21771002 --- tests/scenario_invoice.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/scenario_invoice.rst b/tests/scenario_invoice.rst index d3933af7f3..c393d7910f 100644 --- a/tests/scenario_invoice.rst +++ b/tests/scenario_invoice.rst @@ -286,3 +286,21 @@ Create empty invoice:: >>> invoice.click('post') >>> invoice.state u'paid' + +Create some complex invoice and test its taxes base rounding:: + + >>> invoice = Invoice() + >>> invoice.party = party + >>> invoice.payment_term = payment_term + >>> invoice.invoice_date = today + >>> line = invoice.lines.new() + >>> line.product = product + >>> line.quantity = 1 + >>> line.unit_price = Decimal('0.0035') + >>> line = invoice.lines.new() + >>> line.product = product + >>> line.quantity = 1 + >>> line.unit_price = Decimal('0.0035') + >>> invoice.save() + >>> invoice.taxes[0].base == invoice.untaxed_amount + True