Commit d6804d55 authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: test: use valid trade condition to generate the simulation

parent 127ca24f
......@@ -159,11 +159,19 @@ class TestSlapOSAccounting(SlapOSTestCaseMixin):
project = self.addProject()
person = self.makePerson(project, user=1)
sale_trade_condition = self.portal.sale_trade_condition_module.newContent(
portal_type="Sale Trade Condition",
reference=self.generateNewId(),
specialise="business_process_module/slapos_ultimate_business_process"
)
sale_trade_condition.validate()
template = self.portal.restrictedTraverse(
self.portal.portal_preferences.getPreferredDefaultPrePaymentSubscriptionInvoiceTemplate())
current_invoice = template.Base_createCloneDocument(batch_mode=1)
current_invoice.edit(
specialise_value=sale_trade_condition,
destination_value=person,
destination_section_value=person,
destination_decision_value=person,
......@@ -184,8 +192,7 @@ class TestSlapOSAccounting(SlapOSTestCaseMixin):
current_invoice.stop()
self.tic()
current_invoice.Delivery_manageBuildingCalculatingDelivery()
self.tic()
applied_rule = current_invoice.getCausalityRelated(portal_type="Applied Rule")
for sm in self.portal.portal_catalog(portal_type='Simulation Movement',
simulation_state=['draft', 'planned', None],
......
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