Commit 488d5a90 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: SlapOSTestCaseMixin set ledger on created Sale Invoice

parent c3828844
......@@ -860,15 +860,19 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
portal_type='Wechat Event',
reference='PAY-%s' % self.generateNewId())
def createStoppedSaleInvoiceTransaction(self, destination_section=None, price=2, payment_mode="payzen"):
def createStoppedSaleInvoiceTransaction(self, destination_section_value=None,
destination_project_value=None,
price=2, payment_mode="payzen"):
new_source_reference = self.generateNewId()
new_destination_reference = self.generateNewId()
invoice = self.createSaleInvoiceTransaction(
start_date=DateTime(),
source_reference=new_source_reference,
destination_reference=new_destination_reference,
destination_section=destination_section,
destination_section_value=destination_section_value,
destination_project_value=destination_project_value,
payment_mode=payment_mode,
ledger="automated",
specialise="sale_trade_condition_module/slapos_aggregated_trade_condition_v3",
created_by_builder=1 # to prevent init script to create lines
)
......
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