Commit ff436d48 authored by Romain Courteaud's avatar Romain Courteaud

slapos_subscription_request: hardcode automated ledger category for the newly...

slapos_subscription_request: hardcode automated ledger category for the newly created accounting transactions
parent c4d76f84
...@@ -13,6 +13,7 @@ if current_invoice is None: ...@@ -13,6 +13,7 @@ if current_invoice is None:
invoice_template = portal.restrictedTraverse(template) invoice_template = portal.restrictedTraverse(template)
current_invoice = invoice_template.Base_createCloneDocument(batch_mode=1) current_invoice = invoice_template.Base_createCloneDocument(batch_mode=1)
assert current_invoice is not None assert current_invoice is not None
current_invoice.manage_delObjects([x for x in current_invoice.manage_delObjects([x for x in
current_invoice.contentIds() if x != "1"]) current_invoice.contentIds() if x != "1"])
current_invoice.edit( current_invoice.edit(
...@@ -38,6 +39,7 @@ if current_invoice is None: ...@@ -38,6 +39,7 @@ if current_invoice is None:
payment_transaction = portal.restrictedTraverse(payment) payment_transaction = portal.restrictedTraverse(payment)
current_invoice.edit( current_invoice.edit(
title="Reservation Fee", title="Reservation Fee",
ledger_value=portal.portal_categories.ledger.accounting.automated,
destination_value=context.getDestinationSection(), destination_value=context.getDestinationSection(),
destination_section_value=context.getDestinationSection(), destination_section_value=context.getDestinationSection(),
destination_decision_value=context.getDestinationSection(), destination_decision_value=context.getDestinationSection(),
......
...@@ -33,6 +33,7 @@ if current_invoice is None: ...@@ -33,6 +33,7 @@ if current_invoice is None:
now = DateTime() now = DateTime()
current_payment.edit( current_payment.edit(
title="Payment for Reservation Fee", title="Payment for Reservation Fee",
ledger_value=portal.portal_categories.ledger.accounting.automated,
specialise_value=trade_condition, specialise_value=trade_condition,
destination_value=context.getDestinationSection(), destination_value=context.getDestinationSection(),
destination_section_value=context.getDestinationSection(), destination_section_value=context.getDestinationSection(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment