From fdf0d910872b8533ca0f5bc8eec46d52380efa09 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 27 May 2019 15:17:47 +0530 Subject: [PATCH] fix: add shopify_supplier_id custom field while setting up shopify --- .../shopify_settings/shopify_settings.py | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/erpnext/erpnext_integrations/doctype/shopify_settings/shopify_settings.py b/erpnext/erpnext_integrations/doctype/shopify_settings/shopify_settings.py index 82560979be..7f4b7bab0a 100644 --- a/erpnext/erpnext_integrations/doctype/shopify_settings/shopify_settings.py +++ b/erpnext/erpnext_integrations/doctype/shopify_settings/shopify_settings.py @@ -107,10 +107,18 @@ def get_series(): def setup_custom_fields(): custom_fields = { - "Customer": [dict(fieldname='shopify_customer_id', label='Shopify Customer Id', - fieldtype='Data', insert_after='series', read_only=1, print_hide=1)], - "Address": [dict(fieldname='shopify_address_id', label='Shopify Address Id', - fieldtype='Data', insert_after='fax', read_only=1, print_hide=1)], + "Customer": [ + dict(fieldname='shopify_customer_id', label='Shopify Customer Id', + fieldtype='Data', insert_after='series', read_only=1, print_hide=1) + ], + "Supplier": [ + dict(fieldname='shopify_supplier_id', label='Shopify Supplier Id', + fieldtype='Data', insert_after='supplier_name', read_only=1, print_hide=1) + ], + "Address": [ + dict(fieldname='shopify_address_id', label='Shopify Address Id', + fieldtype='Data', insert_after='fax', read_only=1, print_hide=1) + ], "Item": [ dict(fieldname='shopify_variant_id', label='Shopify Variant Id', fieldtype='Data', insert_after='item_code', read_only=1, print_hide=1), @@ -119,16 +127,20 @@ def setup_custom_fields(): dict(fieldname='shopify_description', label='Shopify Description', fieldtype='Text Editor', insert_after='description', read_only=1, print_hide=1) ], - "Sales Order": [dict(fieldname='shopify_order_id', label='Shopify Order Id', - fieldtype='Data', insert_after='title', read_only=1, print_hide=1)], + "Sales Order": [ + dict(fieldname='shopify_order_id', label='Shopify Order Id', + fieldtype='Data', insert_after='title', read_only=1, print_hide=1) + ], "Delivery Note":[ dict(fieldname='shopify_order_id', label='Shopify Order Id', fieldtype='Data', insert_after='title', read_only=1, print_hide=1), dict(fieldname='shopify_fulfillment_id', label='Shopify Fulfillment Id', fieldtype='Data', insert_after='title', read_only=1, print_hide=1) ], - "Sales Invoice": [dict(fieldname='shopify_order_id', label='Shopify Order Id', - fieldtype='Data', insert_after='title', read_only=1, print_hide=1)] + "Sales Invoice": [ + dict(fieldname='shopify_order_id', label='Shopify Order Id', + fieldtype='Data', insert_after='title', read_only=1, print_hide=1) + ] } create_custom_fields(custom_fields)