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,25 +100,28 @@ ...@@ -100,25 +100,28 @@
</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>
<list> <key> <string>_log</string> </key>
<dictionary> <value>
<item> <list>
<key> <string>action</string> </key> <dictionary>
<value> <string>validate</string> </value> <item>
</item> <key> <string>action</string> </key>
<item> <value> <string>validate</string> </value>
<key> <string>validation_state</string> </key> </item>
<value> <string>validated</string> </value> <item>
</item> <key> <string>validation_state</string> </key>
</dictionary> <value> <string>validated</string> </value>
</list> </item>
<none/> </dictionary>
</tuple> </list>
</value>
</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