Commit f92c38f1 authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: set Ban Account from the trade condition source payment

parent ba781676
......@@ -41,7 +41,7 @@ current_payment = portal.accounting_module.newContent(
ledger=current_invoice.getLedger(),
start_date=current_invoice.getStartDate(),
stop_date=current_invoice.getStopDate(),
source_payment='%s/bank_account' % current_invoice.getSourceSection(), # the other place defnied: business process
source_payment=current_invoice.getSourcePayment(),
# Workarround to not create default lines.
created_by_builder=1
)
......
......@@ -29,6 +29,9 @@ class TestSlapOSEntityCreatePaymentMixin(SlapOSTestCaseMixin):
organisation = self.portal.organisation_module.newContent(
portal_type="Organisation"
)
bank_account = organisation.newContent(
portal_type="Bank Account"
)
currency = self.portal.currency_module.newContent(
portal_type="Currency"
)
......@@ -39,6 +42,7 @@ class TestSlapOSEntityCreatePaymentMixin(SlapOSTestCaseMixin):
invoice = self.createSaleInvoiceTransaction(
source_value=organisation,
source_section_value=organisation,
source_payment_value=bank_account,
destination_section_value=person,
destination_project_value=project,
resource_value=currency,
......@@ -94,7 +98,7 @@ class TestSlapOSEntityCreatePaymentMixin(SlapOSTestCaseMixin):
'destination_project/%s' % invoice.getDestinationProject(),
'price_currency/%s' % invoice.getPriceCurrency(),
'resource/%s' % invoice.getResource(),
'source_payment/%s/bank_account' % invoice.getSourceSection(),
'source_payment/%s' % invoice.getSourcePayment(),
'payment_mode/%s' % self.payment_mode,
'source_section/%s' % invoice.getSourceSection(),
#'source_project/%s' % invoice.getSourceProject(),
......
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