Commit 486b06bd authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

configure business_process only if exists (not exist in legacy test).

parent c8f25445
......@@ -398,15 +398,17 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
def afterSetUp(self):
super(TestAdvancedSaleInvoice, self).afterSetUp()
# register builders for advanced invoicing.
business_process = self.portal.business_process_module.erp5_default_business_process
business_process.invoice.setDeliveryBuilderList([
'portal_deliveries/advanced_purchase_invoice_builder',
'portal_deliveries/advanced_sale_invoice_builder',
])
business_process.account.setDeliveryBuilderList([
'portal_deliveries/advanced_purchase_invoice_transaction_builder',
'portal_deliveries/advanced_sale_invoice_transaction_builder',
])
business_process = self.portal.unrestrictedTraverse(
'business_process_module/erp5_default_business_process', None)
if business_process is not None:
business_process.invoice.setDeliveryBuilderList([
'portal_deliveries/advanced_purchase_invoice_builder',
'portal_deliveries/advanced_sale_invoice_builder',
])
business_process.account.setDeliveryBuilderList([
'portal_deliveries/advanced_purchase_invoice_transaction_builder',
'portal_deliveries/advanced_sale_invoice_transaction_builder',
])
# This is quite ugly, we should use late import/export functions of generators
self.portal.erp5_sql_transactionless_connection.manage_test(
"delete from portal_ids where \
......
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