Merge pull request #4905 from KanchanChauhan/web-forms
[fix] added web form fixtures
diff --git a/erpnext/fixtures/web_form.json b/erpnext/fixtures/web_form.json
new file mode 100644
index 0000000..a24107e38b
--- /dev/null
+++ b/erpnext/fixtures/web_form.json
@@ -0,0 +1,380 @@
+[
+ {
+ "allow_comments": 0,
+ "allow_delete": 0,
+ "allow_edit": 0,
+ "allow_multiple": 0,
+ "breadcrumbs": null,
+ "doc_type": "Lead",
+ "docstatus": 0,
+ "doctype": "Web Form",
+ "introduction_text": "To contact us sales persons",
+ "is_standard": 0,
+ "login_required": 0,
+ "modified": "2015-01-22 10:43:02.928698",
+ "name": "contact",
+ "page_name": "contact",
+ "published": 1,
+ "success_message": "Thanks for contact us. We will soon get back to you.",
+ "success_url": "/contact",
+ "title": "Contact",
+ "web_form_fields": [
+ {
+ "default": null,
+ "description": null,
+ "fieldname": "lead_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "label": "Contact Name",
+ "options": null,
+ "read_only": 0,
+ "reqd": 1
+ },
+ {
+ "default": null,
+ "description": null,
+ "fieldname": "company_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "label": "Organization Name",
+ "options": null,
+ "read_only": 0,
+ "reqd": 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": "website",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "label": "Website",
+ "options": null,
+ "read_only": 0,
+ "reqd": 0
+ }
+ ],
+ "web_page_link_text": null
+ },
+ {
+ "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,
+ "is_standard": 1,
+ "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,
+ "reqd": 1
+ },
+ {
+ "default": "Open",
+ "description": null,
+ "fieldname": "status",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "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,
+ "reqd": 0
+ },
+ {
+ "default": null,
+ "description": null,
+ "fieldname": "attachment",
+ "fieldtype": "Attach",
+ "hidden": 0,
+ "label": "Attachment",
+ "options": null,
+ "read_only": 0,
+ "reqd": 0
+ }
+ ],
+ "web_page_link_text": null
+ },
+ {
+ "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-11-23 08:21:53.924318",
+ "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,
+ "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,
+ "reqd": 1
+ },
+ {
+ "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,
+ "reqd": 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,
+ "reqd": 0
+ },
+ {
+ "default": null,
+ "description": null,
+ "fieldname": "pincode",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "label": "Postal Code",
+ "options": null,
+ "read_only": 0,
+ "reqd": 0
+ },
+ {
+ "default": null,
+ "description": null,
+ "fieldname": "country",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "label": "Country",
+ "options": "Country",
+ "read_only": 0,
+ "reqd": 1
+ },
+ {
+ "default": null,
+ "description": null,
+ "fieldname": null,
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "label": null,
+ "options": null,
+ "read_only": 0,
+ "reqd": 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,
+ "reqd": 1
+ },
+ {
+ "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,
+ "reqd": 0
+ }
+ ],
+ "web_page_link_text": null
+ },
+ {
+ "allow_comments": 0,
+ "allow_delete": 0,
+ "allow_edit": 0,
+ "allow_multiple": 0,
+ "breadcrumbs": "[{\"title\":\"Jobs\", \"name\":\"jobs\"}]",
+ "doc_type": "Job Applicant",
+ "docstatus": 0,
+ "doctype": "Web Form",
+ "introduction_text": null,
+ "is_standard": 0,
+ "login_required": 0,
+ "modified": "2016-02-19 16:46:57.448416",
+ "name": "job_application",
+ "page_name": "job_application",
+ "published": 1,
+ "success_message": "Thank you for applying.",
+ "success_url": "/jobs",
+ "title": "Job Application",
+ "web_form_fields": [
+ {
+ "default": null,
+ "description": null,
+ "fieldname": "job_title",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "label": "Job Title",
+ "options": "",
+ "read_only": 1,
+ "reqd": 0
+ },
+ {
+ "default": null,
+ "description": null,
+ "fieldname": "applicant_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "label": "Applicant Name",
+ "options": null,
+ "read_only": 0,
+ "reqd": 1
+ },
+ {
+ "default": null,
+ "description": null,
+ "fieldname": "email_id",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "label": "Email Id",
+ "options": "Email",
+ "read_only": 0,
+ "reqd": 0
+ },
+ {
+ "default": "Cover Letter/Message",
+ "description": null,
+ "fieldname": "message",
+ "fieldtype": "Text",
+ "hidden": 0,
+ "label": "Message",
+ "options": null,
+ "read_only": 0,
+ "reqd": 1
+ },
+ {
+ "default": null,
+ "description": null,
+ "fieldname": "upload_cv",
+ "fieldtype": "Attach",
+ "hidden": 0,
+ "label": "Upload CV",
+ "options": null,
+ "read_only": 0,
+ "reqd": 0
+ }
+ ],
+ "web_page_link_text": null
+ }
+]
\ No newline at end of file
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index ab3d393..f47185e 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -40,6 +40,8 @@
calendars = ["Task", "Production Order", "Time Log", "Leave Application", "Sales Order", "Holiday List"]
+fixtures = ["Web Form"]
+
website_generators = ["Item Group", "Item", "Sales Partner"]
website_context = {