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