Allow to require invoice name only

This commit is contained in:
Raphael Michel
2018-05-11 12:52:11 +02:00
parent 1b9bfb5b62
commit 008b4a134b
12 changed files with 181 additions and 38 deletions

View File

@@ -61,6 +61,15 @@ class InvoiceAddressForm(BaseInvoiceAddressForm):
vat_warning = True
class InvoiceNameForm(InvoiceAddressForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
for f in list(self.fields.keys()):
if f != 'name':
del self.fields[f]
class QuestionsForm(BaseQuestionsForm):
"""
This form class is responsible for asking order-related questions. This includes