diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 37a6b27042..05723caaad 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -231,4 +231,5 @@ erpnext.patches.v6_4.fix_expense_included_in_valuation execute:frappe.delete_doc_if_exists("Report", "Item-wise Last Purchase Rate") erpnext.patches.v6_6.fix_website_image erpnext.patches.v6_6.remove_fiscal_year_from_leave_allocation -execute:frappe.delete_doc_if_exists("DocType", "Stock UOM Replace Utility") \ No newline at end of file +execute:frappe.delete_doc_if_exists("DocType", "Stock UOM Replace Utility") +erpnext.patches.v6_8.make_webform_standard diff --git a/erpnext/patches/v6_8/__init__.py b/erpnext/patches/v6_8/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/patches/v6_8/make_webform_standard.py b/erpnext/patches/v6_8/make_webform_standard.py new file mode 100644 index 0000000000..d4e1484b2a --- /dev/null +++ b/erpnext/patches/v6_8/make_webform_standard.py @@ -0,0 +1,9 @@ +import frappe + +def execute(): + frappe.reload_doctype("Web Form") + frappe.delete_doc("Web Form", "Issues") + frappe.delete_doc("Web Form", "Addresses") + + from erpnext.setup.install import add_web_forms + add_web_forms() diff --git a/erpnext/setup/fixtures/web_form/addresses.json b/erpnext/setup/fixtures/web_form/addresses.json index 8051c726e0..1830dab6e4 100644 --- a/erpnext/setup/fixtures/web_form/addresses.json +++ b/erpnext/setup/fixtures/web_form/addresses.json @@ -1,167 +1,168 @@ [ { - "allow_comments": 0, - "allow_delete": 0, - "allow_edit": 1, - "allow_multiple": 1, - "breadcrumbs": null, - "doc_type": "Address", - "docstatus": 0, - "doctype": "Web Form", - "introduction_text": null, - "login_required": 1, - "modified": "2015-06-01 06:53:43.699336", - "name": "addresses", - "page_name": "addresses", - "published": 1, - "success_message": null, - "success_url": "/addresses", - "title": "Addresses", + "allow_comments": 0, + "allow_delete": 0, + "allow_edit": 1, + "allow_multiple": 1, + "breadcrumbs": null, + "doc_type": "Address", + "docstatus": 0, + "doctype": "Web Form", + "introduction_text": null, + "is_standard": 1, + "login_required": 1, + "modified": "2015-06-01 06:53:43.699336", + "name": "addresses", + "page_name": "addresses", + "published": 1, + "success_message": null, + "success_url": "/addresses", + "title": "Addresses", "web_form_fields": [ { - "default": null, - "description": "", - "fieldname": "address_title", - "fieldtype": "Data", - "hidden": 0, - "label": "Address Title", - "options": null, - "read_only": 0, + "default": null, + "description": "", + "fieldname": "address_title", + "fieldtype": "Data", + "hidden": 0, + "label": "Address Title", + "options": null, + "read_only": 0, "reqd": 0 - }, + }, { - "default": null, - "description": null, - "fieldname": "address_type", - "fieldtype": "Select", - "hidden": 0, - "label": "Address Type", - "options": "Billing\nShipping\nOffice\nPersonal\nPlant\nPostal\nShop\nSubsidiary\nWarehouse\nOther", - "read_only": 0, + "default": null, + "description": null, + "fieldname": "address_type", + "fieldtype": "Select", + "hidden": 0, + "label": "Address Type", + "options": "Billing\nShipping\nOffice\nPersonal\nPlant\nPostal\nShop\nSubsidiary\nWarehouse\nOther", + "read_only": 0, "reqd": 1 - }, + }, { - "default": null, - "description": null, - "fieldname": "address_line1", - "fieldtype": "Data", - "hidden": 0, - "label": "Address Line 1", - "options": null, - "read_only": 0, + "default": null, + "description": null, + "fieldname": "address_line1", + "fieldtype": "Data", + "hidden": 0, + "label": "Address Line 1", + "options": null, + "read_only": 0, "reqd": 1 - }, + }, { - "default": null, - "description": null, - "fieldname": "address_line2", - "fieldtype": "Data", - "hidden": 0, - "label": "Address Line 2", - "options": null, - "read_only": 0, + "default": null, + "description": null, + "fieldname": "address_line2", + "fieldtype": "Data", + "hidden": 0, + "label": "Address Line 2", + "options": null, + "read_only": 0, "reqd": 0 - }, + }, { - "default": null, - "description": null, - "fieldname": "city", - "fieldtype": "Data", - "hidden": 0, - "label": "City/Town", - "options": null, - "read_only": 0, + "default": null, + "description": null, + "fieldname": "city", + "fieldtype": "Data", + "hidden": 0, + "label": "City/Town", + "options": null, + "read_only": 0, "reqd": 1 - }, + }, { - "default": null, - "description": null, - "fieldname": "state", - "fieldtype": "Data", - "hidden": 0, - "label": "State", - "options": null, - "read_only": 0, + "default": null, + "description": null, + "fieldname": "state", + "fieldtype": "Data", + "hidden": 0, + "label": "State", + "options": null, + "read_only": 0, "reqd": 0 - }, + }, { - "default": null, - "description": null, - "fieldname": "pincode", - "fieldtype": "Data", - "hidden": 0, - "label": "Pincode", - "options": null, - "read_only": 0, + "default": null, + "description": null, + "fieldname": "pincode", + "fieldtype": "Data", + "hidden": 0, + "label": "Pincode", + "options": null, + "read_only": 0, "reqd": 0 - }, + }, { - "default": null, - "description": null, - "fieldname": "country", - "fieldtype": "Data", - "hidden": 0, - "label": "Country", - "options": "Country", - "read_only": 0, + "default": null, + "description": null, + "fieldname": "country", + "fieldtype": "Data", + "hidden": 0, + "label": "Country", + "options": "Country", + "read_only": 0, "reqd": 1 - }, + }, { - "default": null, - "description": null, - "fieldname": null, - "fieldtype": "Column Break", - "hidden": null, - "label": null, - "options": null, - "read_only": null, + "default": null, + "description": null, + "fieldname": null, + "fieldtype": "Column Break", + "hidden": null, + "label": null, + "options": null, + "read_only": null, "reqd": null - }, + }, { - "default": null, - "description": null, - "fieldname": "email_id", - "fieldtype": "Data", - "hidden": 0, - "label": "Email Id", - "options": null, - "read_only": 0, + "default": null, + "description": null, + "fieldname": "email_id", + "fieldtype": "Data", + "hidden": 0, + "label": "Email Id", + "options": null, + "read_only": 0, "reqd": 0 - }, + }, { - "default": null, - "description": null, - "fieldname": "phone", - "fieldtype": "Data", - "hidden": 0, - "label": "Phone", - "options": null, - "read_only": 0, + "default": null, + "description": null, + "fieldname": "phone", + "fieldtype": "Data", + "hidden": 0, + "label": "Phone", + "options": null, + "read_only": 0, "reqd": 1 - }, + }, { - "default": "0", - "description": "", - "fieldname": "is_primary_address", - "fieldtype": "Check", - "hidden": 0, - "label": "Preferred Billing Address", - "options": null, - "read_only": 0, + "default": "0", + "description": "", + "fieldname": "is_primary_address", + "fieldtype": "Check", + "hidden": 0, + "label": "Preferred Billing Address", + "options": null, + "read_only": 0, "reqd": 0 - }, + }, { - "default": "0", - "description": "", - "fieldname": "is_shipping_address", - "fieldtype": "Check", - "hidden": 0, - "label": "Preferred Shipping Address", - "options": null, - "read_only": 0, + "default": "0", + "description": "", + "fieldname": "is_shipping_address", + "fieldtype": "Check", + "hidden": 0, + "label": "Preferred Shipping Address", + "options": null, + "read_only": 0, "reqd": 0 } - ], + ], "web_page_link_text": null } -] \ No newline at end of file +] diff --git a/erpnext/setup/fixtures/web_form/issues.json b/erpnext/setup/fixtures/web_form/issues.json index 84ff1c2001..b452affdbf 100644 --- a/erpnext/setup/fixtures/web_form/issues.json +++ b/erpnext/setup/fixtures/web_form/issues.json @@ -1,68 +1,69 @@ [ { - "allow_comments": 1, - "allow_delete": 1, - "allow_edit": 1, - "allow_multiple": 1, - "breadcrumbs": "[{\"title\":\"Issues\", \"name\":\"issues\"}]", - "doc_type": "Issue", - "docstatus": 0, - "doctype": "Web Form", - "introduction_text": null, - "login_required": 1, - "modified": "2015-06-01 08:14:26.350792", - "name": "issues", - "page_name": "issues", - "published": 1, - "success_message": "", - "success_url": "/issues", - "title": "Issues", + "allow_comments": 1, + "allow_delete": 1, + "allow_edit": 1, + "allow_multiple": 1, + "breadcrumbs": "[{\"title\":\"Issues\", \"name\":\"issues\"}]", + "doc_type": "Issue", + "docstatus": 0, + "doctype": "Web Form", + "is_standard": 1, + "introduction_text": null, + "login_required": 1, + "modified": "2015-06-01 08:14:26.350792", + "name": "issues", + "page_name": "issues", + "published": 1, + "success_message": "", + "success_url": "/issues", + "title": "Issues", "web_form_fields": [ { - "default": null, - "description": null, - "fieldname": "subject", - "fieldtype": "Data", - "hidden": 0, - "label": "Subject", - "options": null, - "read_only": 0, + "default": null, + "description": null, + "fieldname": "subject", + "fieldtype": "Data", + "hidden": 0, + "label": "Subject", + "options": null, + "read_only": 0, "reqd": 1 - }, + }, { - "default": "Open", - "description": null, - "fieldname": "status", - "fieldtype": "Select", - "hidden": null, - "label": "Status", - "options": "Open\nReplied\nHold\nClosed", - "read_only": 1, + "default": "Open", + "description": null, + "fieldname": "status", + "fieldtype": "Select", + "hidden": null, + "label": "Status", + "options": "Open\nReplied\nHold\nClosed", + "read_only": 1, "reqd": 0 - }, + }, { - "default": null, - "description": null, - "fieldname": "description", - "fieldtype": "Text", - "hidden": 0, - "label": "Description", - "options": null, - "read_only": 0, + "default": null, + "description": null, + "fieldname": "description", + "fieldtype": "Text", + "hidden": 0, + "label": "Description", + "options": null, + "read_only": 0, "reqd": 0 - }, + }, { - "default": null, - "description": null, - "fieldname": "attachment", - "fieldtype": "Attach", - "hidden": null, - "label": "Attachment", - "options": null, - "read_only": null, + "default": null, + "description": null, + "fieldname": "attachment", + "fieldtype": "Attach", + "hidden": null, + "label": "Attachment", + "options": null, + "read_only": null, "reqd": null } - ], + ], "web_page_link_text": null } -] \ No newline at end of file +]