diff --git a/ecommerce_integrations/unicommerce/delivery_note.py b/ecommerce_integrations/unicommerce/delivery_note.py index 3e695acb..c578f6ab 100644 --- a/ecommerce_integrations/unicommerce/delivery_note.py +++ b/ecommerce_integrations/unicommerce/delivery_note.py @@ -1,4 +1,5 @@ import frappe + from ecommerce_integrations.unicommerce.api_client import UnicommerceAPIClient from ecommerce_integrations.unicommerce.constants import ORDER_CODE_FIELD, SETTINGS_DOCTYPE from ecommerce_integrations.unicommerce.utils import create_unicommerce_log diff --git a/ecommerce_integrations/unicommerce/doctype/unicommerce_settings/unicommerce_settings.py b/ecommerce_integrations/unicommerce/doctype/unicommerce_settings/unicommerce_settings.py index f9e384df..20717e86 100644 --- a/ecommerce_integrations/unicommerce/doctype/unicommerce_settings/unicommerce_settings.py +++ b/ecommerce_integrations/unicommerce/doctype/unicommerce_settings/unicommerce_settings.py @@ -36,12 +36,12 @@ PACKAGE_TYPE_FIELD, PRODUCT_CATEGORY_FIELD, RETURN_CODE_FIELD, + SHIPPIND_ID, SHIPPING_METHOD_FIELD, SHIPPING_PACKAGE_CODE_FIELD, SHIPPING_PACKAGE_STATUS_FIELD, SHIPPING_PROVIDER_CODE, TRACKING_CODE_FIELD, - SHIPPIND_ID, ) from ecommerce_integrations.unicommerce.utils import create_unicommerce_log diff --git a/ecommerce_integrations/unicommerce/order.py b/ecommerce_integrations/unicommerce/order.py index 31157ace..a21eb982 100644 --- a/ecommerce_integrations/unicommerce/order.py +++ b/ecommerce_integrations/unicommerce/order.py @@ -11,8 +11,8 @@ from ecommerce_integrations.unicommerce.constants import ( CHANNEL_ID_FIELD, CHANNEL_TAX_ACCOUNT_FIELD_MAP, - INVOICE_CODE_FIELD, FACILITY_CODE_FIELD, + INVOICE_CODE_FIELD, IS_COD_CHECKBOX, MODULE_NAME, ORDER_CODE_FIELD, diff --git a/ecommerce_integrations/unicommerce/tests/test_delivery_note.py b/ecommerce_integrations/unicommerce/tests/test_delivery_note.py index bee9f05f..205ad8e1 100644 --- a/ecommerce_integrations/unicommerce/tests/test_delivery_note.py +++ b/ecommerce_integrations/unicommerce/tests/test_delivery_note.py @@ -1,7 +1,9 @@ -import unittest import base64 -import responses +import unittest + import frappe +import responses +from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry from ecommerce_integrations.unicommerce.constants import ( FACILITY_CODE_FIELD, @@ -9,11 +11,10 @@ ORDER_CODE_FIELD, SHIPPING_PACKAGE_CODE_FIELD, ) -from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry -from ecommerce_integrations.unicommerce.invoice import create_sales_invoice, bulk_generate_invoices +from ecommerce_integrations.unicommerce.delivery_note import create_delivery_note +from ecommerce_integrations.unicommerce.invoice import bulk_generate_invoices, create_sales_invoice from ecommerce_integrations.unicommerce.order import create_order from ecommerce_integrations.unicommerce.tests.test_client import TestCaseApiClient -from ecommerce_integrations.unicommerce.delivery_note import create_delivery_note class TestDeliveryNote(TestCaseApiClient): @@ -25,8 +26,6 @@ def test_create_invoice_and_delivery_note(self): """Use mocked invoice json to create and assert synced fields""" from ecommerce_integrations.unicommerce import invoice - si_data = self.load_fixture("invoice-SDU0026")["invoice"] - # HACK to allow invoicing test invoice.INVOICED_STATE.append("CREATED") self.responses.add(