test: shopify test custom field creation failing (#28544)

This commit is contained in:
Ankush Menat
2021-11-24 17:20:38 +05:30
committed by GitHub
parent 32855073ff
commit 88a8bc7ebc
2 changed files with 4 additions and 529 deletions

View File

@@ -1,527 +0,0 @@
[
{
"allow_on_submit": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"doctype": "Custom Field",
"dt": "Print Settings",
"fieldname": "compact_item_print",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"insert_after": "with_letterhead",
"label": "Compact Item Print",
"modified": "2016-06-06 15:18:17.025602",
"name": "Print Settings-compact_item_print",
"no_copy": 0,
"options": null,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"unique": 0,
"width": null
},
{
"allow_on_submit": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"doctype": "Custom Field",
"dt": "Customer",
"fieldname": "shopify_customer_id",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"insert_after": "naming_series",
"label": "Shopify Customer Id",
"modified": "2016-01-15 17:25:28.991818",
"name": "Customer-shopify_customer_id",
"no_copy": 1,
"options": null,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"unique": 0,
"width": null
},
{
"allow_on_submit": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"doctype": "Custom Field",
"dt": "Address",
"fieldname": "shopify_address_id",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"insert_after": "fax",
"label": "Shopify Address Id",
"modified": "2016-01-15 17:50:52.213743",
"name": "Address-shopify_address_id",
"no_copy": 1,
"options": null,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"unique": 0,
"width": null
},
{
"allow_on_submit": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"doctype": "Custom Field",
"dt": "Sales Order",
"fieldname": "shopify_order_id",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"insert_after": "title",
"label": "Shopify Order Id",
"modified": "2016-01-18 09:55:50.764524",
"name": "Sales Order-shopify_order_id",
"no_copy": 1,
"options": null,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"unique": 0,
"width": null
},
{
"allow_on_submit": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"doctype": "Custom Field",
"dt": "Item",
"fieldname": "shopify_product_id",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"insert_after": "item_code",
"label": "Shopify Product Id",
"modified": "2016-01-19 15:44:16.132952",
"name": "Item-shopify_product_id",
"no_copy": 1,
"options": null,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"unique": 0,
"width": null
},
{
"allow_on_submit": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"doctype": "Custom Field",
"dt": "Sales Invoice",
"fieldname": "shopify_order_id",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"insert_after": "naming_series",
"label": "Shopify Order Id",
"modified": "2016-01-19 16:30:12.261797",
"name": "Sales Invoice-shopify_order_id",
"no_copy": 1,
"options": null,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"unique": 0,
"width": null
},
{
"allow_on_submit": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"doctype": "Custom Field",
"dt": "Delivery Note",
"fieldname": "shopify_order_id",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"insert_after": "title",
"label": "Shopify Order Id",
"modified": "2016-01-19 16:30:31.201198",
"name": "Delivery Note-shopify_order_id",
"no_copy": 1,
"options": null,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"unique": 0,
"width": null
},
{
"allow_on_submit": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"doctype": "Custom Field",
"dt": "Item",
"fieldname": "stock_keeping_unit",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"insert_after": "stock_uom",
"label": "Stock Keeping Unit",
"modified": "2015-11-10 09:29:10.854943",
"name": "Item-stock_keeping_unit",
"no_copy": 1,
"options": null,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"unique": 0,
"width": null
},
{
"allow_on_submit": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"default": "0",
"depends_on": null,
"description": null,
"docstatus": 0,
"doctype": "Custom Field",
"dt": "Item",
"fieldname": "sync_with_shopify",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"insert_after": "is_stock_item",
"label": "Sync With Shopify",
"modified": "2015-10-12 15:54:31.997714",
"name": "Item-sync_with_shopify",
"no_copy": 0,
"options": null,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"unique": 0,
"width": null
},
{
"allow_on_submit": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"doctype": "Custom Field",
"dt": "Customer",
"fieldname": "sync_with_shopify",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"insert_after": "is_frozen",
"label": "Sync With Shopify",
"modified": "2015-10-01 17:31:55.758826",
"name": "Customer-sync_with_shopify",
"no_copy": 0,
"options": null,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"unique": 0,
"width": null
},
{
"allow_on_submit": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"doctype": "Custom Field",
"dt": "Item",
"fieldname": "shopify_variant_id",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"insert_after": "item_code",
"label": "Variant Id",
"modified": "2015-11-09 18:26:50.825858",
"name": "Item-shopify_variant_id",
"no_copy": 1,
"options": null,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"unique": 0,
"width": null
},
{
"allow_on_submit": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"doctype": "Custom Field",
"dt": "Item",
"fieldname": "sync_qty_with_shopify",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"insert_after": "item_code",
"label": "Sync Quantity With Shopify",
"modified": "2015-12-29 08:37:46.183295",
"name": "Item-sync_qty_with_shopify",
"no_copy": 0,
"options": null,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"unique": 0,
"width": null
},
{
"allow_on_submit": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"doctype": "Custom Field",
"dt": "Delivery Note",
"fieldname": "shopify_fulfillment_id",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"insert_after": "title",
"label": "Shopify Fulfillment Id",
"modified": "2016-01-20 23:50:35.609543",
"name": "Delivery Note-shopify_fulfillment_id",
"no_copy": 1,
"options": null,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"unique": 0,
"width": null
},
{
"allow_on_submit": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"doctype": "Custom Field",
"dt": "Supplier",
"fieldname": "shopify_supplier_id",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"insert_after": "supplier_name",
"label": "Shopify Supplier Id",
"modified": "2016-02-01 15:41:25.818306",
"name": "Supplier-shopify_supplier_id",
"no_copy": 1,
"options": null,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"unique": 0,
"width": null
},
{
"allow_on_submit": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"doctype": "Custom Field",
"dt": "Item",
"fieldname": "shopify_description",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"insert_after": "section_break_11",
"label": "shopify_description",
"modified": "2016-06-15 12:15:36.325581",
"name": "Item-shopify_description",
"no_copy": 0,
"options": null,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"unique": 0,
"width": null
}
]

View File

@@ -12,6 +12,9 @@ from frappe.core.doctype.data_import.data_import import import_doc
from frappe.utils import cint, cstr
from erpnext.erpnext_integrations.connectors.shopify_connection import create_order
from erpnext.erpnext_integrations.doctype.shopify_settings.shopify_settings import (
setup_custom_fields,
)
from erpnext.erpnext_integrations.doctype.shopify_settings.sync_customer import create_customer
from erpnext.erpnext_integrations.doctype.shopify_settings.sync_product import make_item
@@ -25,8 +28,7 @@ class ShopifySettings(unittest.TestCase):
if not cls.allow_negative_stock:
frappe.db.set_value('Stock Settings', None, 'allow_negative_stock', 1)
# use the fixture data
import_doc(path=frappe.get_app_path("erpnext", "erpnext_integrations/doctype/shopify_settings/test_data/custom_field.json"))
setup_custom_fields()
frappe.reload_doctype("Customer")
frappe.reload_doctype("Sales Order")