Commit 896df1f6 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_subscription_request: Do not overwrite source, use the defined value from the template

parent a074f376
...@@ -19,7 +19,6 @@ if current_invoice is None: ...@@ -19,7 +19,6 @@ if current_invoice is None:
payment_transaction = invoice_template = portal.restrictedTraverse(payment) payment_transaction = invoice_template = portal.restrictedTraverse(payment)
current_invoice.edit( current_invoice.edit(
title="Reservation Fee", title="Reservation Fee",
source_value=context.getDestinationSection(),
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(),
......
...@@ -16,7 +16,6 @@ if current_invoice is None: ...@@ -16,7 +16,6 @@ if current_invoice is None:
current_payment.edit( current_payment.edit(
title="Payment for Reservation Fee", title="Payment for Reservation Fee",
source_value=context.getDestinationSection(),
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(),
......
...@@ -511,7 +511,8 @@ class TestSubscriptionRequest_requestPaymentTransaction(TestSubscriptionSkinsMix ...@@ -511,7 +511,8 @@ class TestSubscriptionRequest_requestPaymentTransaction(TestSubscriptionSkinsMix
self.tic() self.tic()
self.assertNotEqual(None, current_payment) self.assertNotEqual(None, current_payment)
self.assertEqual(current_payment.getTitle(), "Payment for Reservation Fee") self.assertEqual(current_payment.getTitle(), "Payment for Reservation Fee")
self.assertEqual(current_payment.getSourceValue(), person) self.assertEqual(current_payment.getSourceValue(), self.slapos_organisation)
self.assertEqual(current_payment.getSourceSectionValue(), self.slapos_organisation)
self.assertEqual(current_payment.getDestinationValue(), person) self.assertEqual(current_payment.getDestinationValue(), person)
self.assertEqual(current_payment.getDestinationSectionValue(), person) self.assertEqual(current_payment.getDestinationSectionValue(), person)
self.assertEqual(current_payment.getDestinationDecisionValue(), person) self.assertEqual(current_payment.getDestinationDecisionValue(), person)
...@@ -541,7 +542,8 @@ class TestSubscriptionRequest_requestPaymentTransaction(TestSubscriptionSkinsMix ...@@ -541,7 +542,8 @@ class TestSubscriptionRequest_requestPaymentTransaction(TestSubscriptionSkinsMix
self.tic() self.tic()
self.assertNotEqual(None, current_payment) self.assertNotEqual(None, current_payment)
self.assertEqual(current_payment.getTitle(), "Payment for Reservation Fee") self.assertEqual(current_payment.getTitle(), "Payment for Reservation Fee")
self.assertEqual(current_payment.getSourceValue(), person) self.assertEqual(current_payment.getSourceValue(), self.slapos_organisation)
self.assertEqual(current_payment.getSourceSectionValue(), self.slapos_organisation)
self.assertEqual(current_payment.getDestinationValue(), person) self.assertEqual(current_payment.getDestinationValue(), person)
self.assertEqual(current_payment.getDestinationSectionValue(), person) self.assertEqual(current_payment.getDestinationSectionValue(), person)
self.assertEqual(current_payment.getDestinationDecisionValue(), person) self.assertEqual(current_payment.getDestinationDecisionValue(), person)
...@@ -643,7 +645,8 @@ class TestSubscriptionRequest_createRelatedSaleInvoiceTransaction(TestSubscripti ...@@ -643,7 +645,8 @@ class TestSubscriptionRequest_createRelatedSaleInvoiceTransaction(TestSubscripti
self.assertEqual(current_invoice, subscription_invoice) self.assertEqual(current_invoice, subscription_invoice)
self.assertEqual(current_invoice.getTitle(), "Reservation Fee") self.assertEqual(current_invoice.getTitle(), "Reservation Fee")
self.assertEqual(current_invoice.getSourceValue(), person) self.assertEqual(current_invoice.getSourceValue(), self.slapos_organisation)
self.assertEqual(current_invoice.getSourceSectionValue(), self.slapos_organisation)
self.assertEqual(current_invoice.getDestinationValue(), person) self.assertEqual(current_invoice.getDestinationValue(), person)
self.assertEqual(current_invoice.getDestinationSectionValue(), person) self.assertEqual(current_invoice.getDestinationSectionValue(), person)
self.assertEqual(current_invoice.getDestinationDecisionValue(), person) self.assertEqual(current_invoice.getDestinationDecisionValue(), person)
......
...@@ -100,11 +100,13 @@ ...@@ -100,11 +100,13 @@
</record> </record>
<record id="4" aka="AAAAAAAAAAQ="> <record id="4" aka="AAAAAAAAAAQ=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle> </pickle>
<pickle> <pickle>
<tuple> <dictionary>
<none/> <item>
<key> <string>_log</string> </key>
<value>
<list> <list>
<dictionary> <dictionary>
<item> <item>
...@@ -117,8 +119,9 @@ ...@@ -117,8 +119,9 @@
</item> </item>
</dictionary> </dictionary>
</list> </list>
<none/> </value>
</tuple> </item>
</dictionary>
</pickle> </pickle>
</record> </record>
</ZopeData> </ZopeData>
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