Order change manager: Allow to disable invoice issuing

This commit is contained in:
Raphael Michel
2019-10-10 12:19:06 +02:00
parent fb3fc05522
commit d4d046ca60
5 changed files with 24 additions and 3 deletions

View File

@@ -1219,6 +1219,15 @@ class OrderChangeManagerTests(TestCase):
self.ocm.commit()
assert self.order.invoices.count() == 3
@classscope(attr='o')
def test_reissue_invoice_disabled(self):
self.ocm.reissue_invoice = False
generate_invoice(self.order)
assert self.order.invoices.count() == 1
self.ocm.add_position(self.ticket, None, Decimal('0.00'))
self.ocm.commit()
assert self.order.invoices.count() == 1
@classscope(attr='o')
def test_dont_reissue_invoice_on_free_product_changes(self):
self.event.settings.invoice_include_free = False