forked from CGM_Public/pretix_original
Pluggable invoice transmission methods (#5020)
* Flexible invoice transmission
* UI work
* Add peppol and output
* API support
* Profile integration
* Simplify form for individuals
* Remove sent_to_customer usage
* more steps
* Revert "Bank transfer: Allow to send the invoice direclty to the accounting department (#2975)"
This reverts commit cea6c340be.
* minor fixes
* Fixes after rebase
* update stati
* Backend view
* Transmit and show status
* status, retransmission
* API retransmission
* More fields
* API docs
* Plugin docs
* Update migration
* Add missing license headers
* Remove dead code, fix current tests
* Run isort
* Update regex
* Rebase migration
* Fix migration
* Add tests, fix bugs
* Rebase migration
* Apply suggestion from @luelista
Co-authored-by: luelista <weller@rami.io>
* Apply suggestion from @luelista
Co-authored-by: luelista <weller@rami.io>
* Apply suggestion from @luelista
Co-authored-by: luelista <weller@rami.io>
* Apply suggestion from @luelista
Co-authored-by: luelista <weller@rami.io>
* Apply suggestion from @luelista
Co-authored-by: luelista <weller@rami.io>
* Make migration reversible
* Add TransmissionType.enforce_transmission
* Fix registries API usage after rebase
* Remove code I forgot to delete
* Update transmission status display depending on type
* Add testmode_supported
* Update src/pretix/static/pretixbase/js/addressform.js
Co-authored-by: luelista <weller@rami.io>
* Update src/pretix/static/pretixbase/js/addressform.js
Co-authored-by: luelista <weller@rami.io>
* Update src/pretix/static/pretixbase/js/addressform.js
Co-authored-by: luelista <weller@rami.io>
* New mechanism for non-required invoice forms
* Update src/pretix/base/invoicing/transmission.py
Co-authored-by: luelista <weller@rami.io>
* Declare testmode_supported for email
* Make transmission_email_other an implementation detail
* Fix failing tests and add new ones
* Update src/pretix/base/services/invoices.py
Co-authored-by: luelista <weller@rami.io>
* Add emails to email history
* Fix comma error
* More generic default email text
* Cleanup
* Remove "email invoices" button and refine logic
* Rebase migration
* Fix edge case
---------
Co-authored-by: luelista <weller@rami.io>
This commit is contained in:
@@ -208,14 +208,20 @@ def test_invoice_address_shredder(event, order):
|
||||
'pretix.event.order.modified',
|
||||
data={
|
||||
"data": [{"attendee_name": "Hans", "question_1": "Test"}],
|
||||
"invoice_data": {"name": "Peter", "country": "DE", "is_business": False, "internal_reference": "",
|
||||
"state": "",
|
||||
"company": "ACME", "street": "Sesam Street", "city": "Sample City", "zipcode": "12345"}
|
||||
"invoice_data": {
|
||||
"name": "Peter", "country": "DE", "is_business": False, "internal_reference": "",
|
||||
"state": "", "company": "ACME", "street": "Sesam Street", "city": "Sample City", "zipcode": "12345",
|
||||
"transmission_type": "email", "transmission_info": {"transmission_email_address": "other@example.org"}
|
||||
}
|
||||
}
|
||||
)
|
||||
ia = InvoiceAddress.objects.create(
|
||||
company='Acme Company', street='221B Baker Street',
|
||||
zipcode='12345', city='London', country='UK',
|
||||
order=order, transmission_type="email", transmission_info={
|
||||
"transmission_email_address": "other@example.org"
|
||||
}
|
||||
)
|
||||
ia = InvoiceAddress.objects.create(company='Acme Company', street='221B Baker Street',
|
||||
zipcode='12345', city='London', country='UK',
|
||||
order=order)
|
||||
s = InvoiceAddressShredder(event)
|
||||
f = list(s.generate_files())
|
||||
assert json.loads(f[0][2]) == {
|
||||
@@ -233,7 +239,9 @@ def test_invoice_address_shredder(event, order):
|
||||
'street': '221B Baker Street',
|
||||
'vat_id': '',
|
||||
'vat_id_validated': False,
|
||||
'zipcode': '12345'
|
||||
'zipcode': '12345',
|
||||
"transmission_type": "email",
|
||||
"transmission_info": {"transmission_email_address": "other@example.org"}
|
||||
}
|
||||
}
|
||||
s.shred_data()
|
||||
@@ -243,7 +251,9 @@ def test_invoice_address_shredder(event, order):
|
||||
assert l1.parsed_data == {
|
||||
"data": [{"attendee_name": "Hans", "question_1": "Test"}],
|
||||
"invoice_data": {"name": "█", "country": "█", "is_business": False, "internal_reference": "", "company": "█",
|
||||
"street": "█", "city": "█", "zipcode": "█", "state": ""}
|
||||
"street": "█", "city": "█", "zipcode": "█", "state": "",
|
||||
"transmission_type": "email",
|
||||
"transmission_info": {"_shredded": True}}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user