Merge pull request #4315 from rmehta/standard-in-web-form

Web form, make standard
This commit is contained in:
Anand Doshi 2015-11-16 16:24:14 +05:30
commit 34af16140e
5 changed files with 202 additions and 190 deletions

View File

@ -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") execute:frappe.delete_doc_if_exists("Report", "Item-wise Last Purchase Rate")
erpnext.patches.v6_6.fix_website_image erpnext.patches.v6_6.fix_website_image
erpnext.patches.v6_6.remove_fiscal_year_from_leave_allocation erpnext.patches.v6_6.remove_fiscal_year_from_leave_allocation
execute:frappe.delete_doc_if_exists("DocType", "Stock UOM Replace Utility") execute:frappe.delete_doc_if_exists("DocType", "Stock UOM Replace Utility")
erpnext.patches.v6_8.make_webform_standard

View File

View File

@ -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()

View File

@ -1,167 +1,168 @@
[ [
{ {
"allow_comments": 0, "allow_comments": 0,
"allow_delete": 0, "allow_delete": 0,
"allow_edit": 1, "allow_edit": 1,
"allow_multiple": 1, "allow_multiple": 1,
"breadcrumbs": null, "breadcrumbs": null,
"doc_type": "Address", "doc_type": "Address",
"docstatus": 0, "docstatus": 0,
"doctype": "Web Form", "doctype": "Web Form",
"introduction_text": null, "introduction_text": null,
"login_required": 1, "is_standard": 1,
"modified": "2015-06-01 06:53:43.699336", "login_required": 1,
"name": "addresses", "modified": "2015-06-01 06:53:43.699336",
"page_name": "addresses", "name": "addresses",
"published": 1, "page_name": "addresses",
"success_message": null, "published": 1,
"success_url": "/addresses", "success_message": null,
"title": "Addresses", "success_url": "/addresses",
"title": "Addresses",
"web_form_fields": [ "web_form_fields": [
{ {
"default": null, "default": null,
"description": "", "description": "",
"fieldname": "address_title", "fieldname": "address_title",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
"label": "Address Title", "label": "Address Title",
"options": null, "options": null,
"read_only": 0, "read_only": 0,
"reqd": 0 "reqd": 0
}, },
{ {
"default": null, "default": null,
"description": null, "description": null,
"fieldname": "address_type", "fieldname": "address_type",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0, "hidden": 0,
"label": "Address Type", "label": "Address Type",
"options": "Billing\nShipping\nOffice\nPersonal\nPlant\nPostal\nShop\nSubsidiary\nWarehouse\nOther", "options": "Billing\nShipping\nOffice\nPersonal\nPlant\nPostal\nShop\nSubsidiary\nWarehouse\nOther",
"read_only": 0, "read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"default": null, "default": null,
"description": null, "description": null,
"fieldname": "address_line1", "fieldname": "address_line1",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
"label": "Address Line 1", "label": "Address Line 1",
"options": null, "options": null,
"read_only": 0, "read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"default": null, "default": null,
"description": null, "description": null,
"fieldname": "address_line2", "fieldname": "address_line2",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
"label": "Address Line 2", "label": "Address Line 2",
"options": null, "options": null,
"read_only": 0, "read_only": 0,
"reqd": 0 "reqd": 0
}, },
{ {
"default": null, "default": null,
"description": null, "description": null,
"fieldname": "city", "fieldname": "city",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
"label": "City/Town", "label": "City/Town",
"options": null, "options": null,
"read_only": 0, "read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"default": null, "default": null,
"description": null, "description": null,
"fieldname": "state", "fieldname": "state",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
"label": "State", "label": "State",
"options": null, "options": null,
"read_only": 0, "read_only": 0,
"reqd": 0 "reqd": 0
}, },
{ {
"default": null, "default": null,
"description": null, "description": null,
"fieldname": "pincode", "fieldname": "pincode",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
"label": "Pincode", "label": "Pincode",
"options": null, "options": null,
"read_only": 0, "read_only": 0,
"reqd": 0 "reqd": 0
}, },
{ {
"default": null, "default": null,
"description": null, "description": null,
"fieldname": "country", "fieldname": "country",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
"label": "Country", "label": "Country",
"options": "Country", "options": "Country",
"read_only": 0, "read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"default": null, "default": null,
"description": null, "description": null,
"fieldname": null, "fieldname": null,
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": null, "hidden": null,
"label": null, "label": null,
"options": null, "options": null,
"read_only": null, "read_only": null,
"reqd": null "reqd": null
}, },
{ {
"default": null, "default": null,
"description": null, "description": null,
"fieldname": "email_id", "fieldname": "email_id",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
"label": "Email Id", "label": "Email Id",
"options": null, "options": null,
"read_only": 0, "read_only": 0,
"reqd": 0 "reqd": 0
}, },
{ {
"default": null, "default": null,
"description": null, "description": null,
"fieldname": "phone", "fieldname": "phone",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
"label": "Phone", "label": "Phone",
"options": null, "options": null,
"read_only": 0, "read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"default": "0", "default": "0",
"description": "", "description": "",
"fieldname": "is_primary_address", "fieldname": "is_primary_address",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
"label": "Preferred Billing Address", "label": "Preferred Billing Address",
"options": null, "options": null,
"read_only": 0, "read_only": 0,
"reqd": 0 "reqd": 0
}, },
{ {
"default": "0", "default": "0",
"description": "", "description": "",
"fieldname": "is_shipping_address", "fieldname": "is_shipping_address",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "hidden": 0,
"label": "Preferred Shipping Address", "label": "Preferred Shipping Address",
"options": null, "options": null,
"read_only": 0, "read_only": 0,
"reqd": 0 "reqd": 0
} }
], ],
"web_page_link_text": null "web_page_link_text": null
} }
] ]

View File

@ -1,68 +1,69 @@
[ [
{ {
"allow_comments": 1, "allow_comments": 1,
"allow_delete": 1, "allow_delete": 1,
"allow_edit": 1, "allow_edit": 1,
"allow_multiple": 1, "allow_multiple": 1,
"breadcrumbs": "[{\"title\":\"Issues\", \"name\":\"issues\"}]", "breadcrumbs": "[{\"title\":\"Issues\", \"name\":\"issues\"}]",
"doc_type": "Issue", "doc_type": "Issue",
"docstatus": 0, "docstatus": 0,
"doctype": "Web Form", "doctype": "Web Form",
"introduction_text": null, "is_standard": 1,
"login_required": 1, "introduction_text": null,
"modified": "2015-06-01 08:14:26.350792", "login_required": 1,
"name": "issues", "modified": "2015-06-01 08:14:26.350792",
"page_name": "issues", "name": "issues",
"published": 1, "page_name": "issues",
"success_message": "", "published": 1,
"success_url": "/issues", "success_message": "",
"title": "Issues", "success_url": "/issues",
"title": "Issues",
"web_form_fields": [ "web_form_fields": [
{ {
"default": null, "default": null,
"description": null, "description": null,
"fieldname": "subject", "fieldname": "subject",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
"label": "Subject", "label": "Subject",
"options": null, "options": null,
"read_only": 0, "read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"default": "Open", "default": "Open",
"description": null, "description": null,
"fieldname": "status", "fieldname": "status",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": null, "hidden": null,
"label": "Status", "label": "Status",
"options": "Open\nReplied\nHold\nClosed", "options": "Open\nReplied\nHold\nClosed",
"read_only": 1, "read_only": 1,
"reqd": 0 "reqd": 0
}, },
{ {
"default": null, "default": null,
"description": null, "description": null,
"fieldname": "description", "fieldname": "description",
"fieldtype": "Text", "fieldtype": "Text",
"hidden": 0, "hidden": 0,
"label": "Description", "label": "Description",
"options": null, "options": null,
"read_only": 0, "read_only": 0,
"reqd": 0 "reqd": 0
}, },
{ {
"default": null, "default": null,
"description": null, "description": null,
"fieldname": "attachment", "fieldname": "attachment",
"fieldtype": "Attach", "fieldtype": "Attach",
"hidden": null, "hidden": null,
"label": "Attachment", "label": "Attachment",
"options": null, "options": null,
"read_only": null, "read_only": null,
"reqd": null "reqd": null
} }
], ],
"web_page_link_text": null "web_page_link_text": null
} }
] ]