Validate Select field values

This commit is contained in:
Anand Doshi 2014-06-19 15:52:19 +05:30
parent da342c7855
commit a5cfc59d81
6 changed files with 552 additions and 552 deletions

View File

@ -91,7 +91,7 @@
"label": "Account Type", "label": "Account Type",
"oldfieldname": "account_type", "oldfieldname": "account_type",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "\nBank\nCash\nTax\nChargeable\nWarehouse\nReceivable\nPayable\nEquity\nFixed Asset\nCost of Goods Sold\nExpense Account\nIncome Account\nStock Received But Not Billed\nExpenses Included In Valuation\nStock Adjustment", "options": "\nBank\nCash\nTax\nChargeable\nWarehouse\nReceivable\nPayable\nEquity\nFixed Asset\nCost of Goods Sold\nExpense Account\nIncome Account\nStock Received But Not Billed\nExpenses Included In Valuation\nStock Adjustment\nStock",
"permlevel": 0, "permlevel": 0,
"search_index": 0 "search_index": 0
}, },
@ -210,7 +210,7 @@
"icon": "icon-money", "icon": "icon-money",
"idx": 1, "idx": 1,
"in_create": 1, "in_create": 1,
"modified": "2014-06-03 18:27:58.109303", "modified": "2014-06-19 18:27:58.109303",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Account", "name": "Account",

View File

@ -1,226 +1,226 @@
{ {
"autoname": "GL.#######", "autoname": "GL.#######",
"creation": "2013-01-10 16:34:06", "creation": "2013-01-10 16:34:06",
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"fields": [ "fields": [
{ {
"fieldname": "posting_date", "fieldname": "posting_date",
"fieldtype": "Date", "fieldtype": "Date",
"in_filter": 1, "in_filter": 1,
"in_list_view": 1, "in_list_view": 1,
"label": "Posting Date", "label": "Posting Date",
"oldfieldname": "posting_date", "oldfieldname": "posting_date",
"oldfieldtype": "Date", "oldfieldtype": "Date",
"permlevel": 0, "permlevel": 0,
"search_index": 1 "search_index": 1
}, },
{ {
"fieldname": "transaction_date", "fieldname": "transaction_date",
"fieldtype": "Date", "fieldtype": "Date",
"in_list_view": 1, "in_list_view": 1,
"label": "Transaction Date", "label": "Transaction Date",
"oldfieldname": "transaction_date", "oldfieldname": "transaction_date",
"oldfieldtype": "Date", "oldfieldtype": "Date",
"permlevel": 0 "permlevel": 0
}, },
{ {
"fieldname": "aging_date", "fieldname": "aging_date",
"fieldtype": "Date", "fieldtype": "Date",
"in_filter": 1, "in_filter": 1,
"in_list_view": 1, "in_list_view": 1,
"label": "Aging Date", "label": "Aging Date",
"oldfieldname": "aging_date", "oldfieldname": "aging_date",
"oldfieldtype": "Date", "oldfieldtype": "Date",
"permlevel": 0, "permlevel": 0,
"search_index": 0 "search_index": 0
}, },
{ {
"fieldname": "account", "fieldname": "account",
"fieldtype": "Link", "fieldtype": "Link",
"in_filter": 1, "in_filter": 1,
"in_list_view": 1, "in_list_view": 1,
"label": "Account", "label": "Account",
"oldfieldname": "account", "oldfieldname": "account",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Account", "options": "Account",
"permlevel": 0, "permlevel": 0,
"search_index": 1 "search_index": 1
}, },
{ {
"fieldname": "cost_center", "fieldname": "cost_center",
"fieldtype": "Link", "fieldtype": "Link",
"in_filter": 1, "in_filter": 1,
"in_list_view": 1, "in_list_view": 1,
"label": "Cost Center", "label": "Cost Center",
"oldfieldname": "cost_center", "oldfieldname": "cost_center",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Cost Center", "options": "Cost Center",
"permlevel": 0, "permlevel": 0,
"search_index": 0 "search_index": 0
}, },
{ {
"fieldname": "debit", "fieldname": "debit",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Debit Amt", "label": "Debit Amt",
"oldfieldname": "debit", "oldfieldname": "debit",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"permlevel": 0 "permlevel": 0
}, },
{ {
"fieldname": "credit", "fieldname": "credit",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Credit Amt", "label": "Credit Amt",
"oldfieldname": "credit", "oldfieldname": "credit",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"permlevel": 0 "permlevel": 0
}, },
{ {
"fieldname": "against", "fieldname": "against",
"fieldtype": "Text", "fieldtype": "Text",
"in_filter": 1, "in_filter": 1,
"label": "Against", "label": "Against",
"oldfieldname": "against", "oldfieldname": "against",
"oldfieldtype": "Text", "oldfieldtype": "Text",
"permlevel": 0 "permlevel": 0
}, },
{ {
"fieldname": "against_voucher", "fieldname": "against_voucher",
"fieldtype": "Data", "fieldtype": "Data",
"in_filter": 1, "in_filter": 1,
"label": "Against Voucher", "label": "Against Voucher",
"oldfieldname": "against_voucher", "oldfieldname": "against_voucher",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0, "permlevel": 0,
"search_index": 0 "search_index": 0
}, },
{ {
"fieldname": "against_voucher_type", "fieldname": "against_voucher_type",
"fieldtype": "Data", "fieldtype": "Data",
"in_filter": 0, "in_filter": 0,
"label": "Against Voucher Type", "label": "Against Voucher Type",
"oldfieldname": "against_voucher_type", "oldfieldname": "against_voucher_type",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0, "permlevel": 0,
"search_index": 0 "search_index": 0
}, },
{ {
"fieldname": "voucher_type", "fieldname": "voucher_type",
"fieldtype": "Select", "fieldtype": "Select",
"in_filter": 1, "in_filter": 1,
"label": "Voucher Type", "label": "Voucher Type",
"oldfieldname": "voucher_type", "oldfieldname": "voucher_type",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "Journal Voucher\nSales Invoice\nPurchase Invoice", "options": "Journal Voucher\nSales Invoice\nPurchase Invoice\nPeriod Closing Voucher\nPurchase Receipt\nDelivery Note\nStock Entry\nStock Reconciliation",
"permlevel": 0, "permlevel": 0,
"search_index": 0 "search_index": 0
}, },
{ {
"fieldname": "voucher_no", "fieldname": "voucher_no",
"fieldtype": "Data", "fieldtype": "Data",
"in_filter": 1, "in_filter": 1,
"label": "Voucher No", "label": "Voucher No",
"oldfieldname": "voucher_no", "oldfieldname": "voucher_no",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0, "permlevel": 0,
"search_index": 1 "search_index": 1
}, },
{ {
"fieldname": "remarks", "fieldname": "remarks",
"fieldtype": "Text", "fieldtype": "Text",
"in_filter": 1, "in_filter": 1,
"label": "Remarks", "label": "Remarks",
"no_copy": 1, "no_copy": 1,
"oldfieldname": "remarks", "oldfieldname": "remarks",
"oldfieldtype": "Text", "oldfieldtype": "Text",
"permlevel": 0, "permlevel": 0,
"search_index": 0 "search_index": 0
}, },
{ {
"fieldname": "is_opening", "fieldname": "is_opening",
"fieldtype": "Select", "fieldtype": "Select",
"in_filter": 1, "in_filter": 1,
"label": "Is Opening", "label": "Is Opening",
"oldfieldname": "is_opening", "oldfieldname": "is_opening",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "No\nYes", "options": "No\nYes",
"permlevel": 0, "permlevel": 0,
"search_index": 0 "search_index": 0
}, },
{ {
"fieldname": "is_advance", "fieldname": "is_advance",
"fieldtype": "Select", "fieldtype": "Select",
"in_filter": 0, "in_filter": 0,
"label": "Is Advance", "label": "Is Advance",
"oldfieldname": "is_advance", "oldfieldname": "is_advance",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "No\nYes", "options": "No\nYes",
"permlevel": 0, "permlevel": 0,
"search_index": 0 "search_index": 0
}, },
{ {
"fieldname": "fiscal_year", "fieldname": "fiscal_year",
"fieldtype": "Link", "fieldtype": "Link",
"in_filter": 1, "in_filter": 1,
"label": "Fiscal Year", "label": "Fiscal Year",
"oldfieldname": "fiscal_year", "oldfieldname": "fiscal_year",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "Fiscal Year", "options": "Fiscal Year",
"permlevel": 0, "permlevel": 0,
"search_index": 0 "search_index": 0
}, },
{ {
"fieldname": "company", "fieldname": "company",
"fieldtype": "Link", "fieldtype": "Link",
"in_filter": 1, "in_filter": 1,
"label": "Company", "label": "Company",
"oldfieldname": "company", "oldfieldname": "company",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Company", "options": "Company",
"permlevel": 0, "permlevel": 0,
"search_index": 0 "search_index": 0
} }
], ],
"icon": "icon-list", "icon": "icon-list",
"idx": 1, "idx": 1,
"in_create": 1, "in_create": 1,
"modified": "2014-06-09 01:51:29.340077", "modified": "2014-06-19 01:51:29.340077",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "GL Entry", "name": "GL Entry",
"owner": "Administrator", "owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 0, "amend": 0,
"apply_user_permissions": 1, "apply_user_permissions": 1,
"create": 0, "create": 0,
"email": 1, "email": 1,
"export": 1, "export": 1,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Accounts User", "role": "Accounts User",
"submit": 0, "submit": 0,
"write": 0 "write": 0
}, },
{ {
"amend": 0, "amend": 0,
"create": 0, "create": 0,
"email": 1, "email": 1,
"export": 1, "export": 1,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Accounts Manager", "role": "Accounts Manager",
"submit": 0, "submit": 0,
"write": 0 "write": 0
} }
], ],
"search_fields": "voucher_no,account,posting_date,against_voucher", "search_fields": "voucher_no,account,posting_date,against_voucher",
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC" "sort_order": "DESC"
} }

View File

@ -1,206 +1,206 @@
[ [
{ {
"bill_no": "NA", "bill_no": "NA",
"buying_price_list": "_Test Price List", "buying_price_list": "_Test Price List",
"company": "_Test Company", "company": "_Test Company",
"conversion_rate": 1, "conversion_rate": 1,
"credit_to": "_Test Supplier - _TC", "credit_to": "_Test Supplier - _TC",
"currency": "INR", "currency": "INR",
"doctype": "Purchase Invoice", "doctype": "Purchase Invoice",
"entries": [ "entries": [
{ {
"amount": 500, "amount": 500,
"base_amount": 500, "base_amount": 500,
"base_rate": 50, "base_rate": 50,
"conversion_factor": 1.0, "conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC", "cost_center": "_Test Cost Center - _TC",
"doctype": "Purchase Invoice Item", "doctype": "Purchase Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC", "expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 100", "item_code": "_Test Item Home Desktop 100",
"item_name": "_Test Item Home Desktop 100", "item_name": "_Test Item Home Desktop 100",
"item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}", "item_tax_rate": "{\"_Test Account Excise Duty - _TC\": 10}",
"parentfield": "entries", "parentfield": "entries",
"qty": 10, "qty": 10,
"rate": 50, "rate": 50,
"uom": "_Test UOM" "uom": "_Test UOM"
}, },
{ {
"amount": 750, "amount": 750,
"base_amount": 750, "base_amount": 750,
"base_rate": 150, "base_rate": 150,
"conversion_factor": 1.0, "conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC", "cost_center": "_Test Cost Center - _TC",
"doctype": "Purchase Invoice Item", "doctype": "Purchase Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC", "expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item Home Desktop 200", "item_code": "_Test Item Home Desktop 200",
"item_name": "_Test Item Home Desktop 200", "item_name": "_Test Item Home Desktop 200",
"parentfield": "entries", "parentfield": "entries",
"qty": 5, "qty": 5,
"rate": 150, "rate": 150,
"uom": "_Test UOM" "uom": "_Test UOM"
} }
], ],
"fiscal_year": "_Test Fiscal Year 2013", "fiscal_year": "_Test Fiscal Year 2013",
"grand_total_import": 0, "grand_total_import": 0,
"naming_series": "BILL", "naming_series": "_T-BILL",
"other_charges": [ "other_charges": [
{ {
"account_head": "_Test Account Shipping Charges - _TC", "account_head": "_Test Account Shipping Charges - _TC",
"add_deduct_tax": "Add", "add_deduct_tax": "Add",
"category": "Valuation and Total", "category": "Valuation and Total",
"charge_type": "Actual", "charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC", "cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges", "description": "Shipping Charges",
"doctype": "Purchase Taxes and Charges", "doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges", "parentfield": "other_charges",
"rate": 100 "rate": 100
}, },
{ {
"account_head": "_Test Account Customs Duty - _TC", "account_head": "_Test Account Customs Duty - _TC",
"add_deduct_tax": "Add", "add_deduct_tax": "Add",
"category": "Valuation", "category": "Valuation",
"charge_type": "On Net Total", "charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC", "cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty", "description": "Customs Duty",
"doctype": "Purchase Taxes and Charges", "doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges", "parentfield": "other_charges",
"rate": 10 "rate": 10
}, },
{ {
"account_head": "_Test Account Excise Duty - _TC", "account_head": "_Test Account Excise Duty - _TC",
"add_deduct_tax": "Add", "add_deduct_tax": "Add",
"category": "Total", "category": "Total",
"charge_type": "On Net Total", "charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC", "cost_center": "_Test Cost Center - _TC",
"description": "Excise Duty", "description": "Excise Duty",
"doctype": "Purchase Taxes and Charges", "doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges", "parentfield": "other_charges",
"rate": 12 "rate": 12
}, },
{ {
"account_head": "_Test Account Education Cess - _TC", "account_head": "_Test Account Education Cess - _TC",
"add_deduct_tax": "Add", "add_deduct_tax": "Add",
"category": "Total", "category": "Total",
"charge_type": "On Previous Row Amount", "charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC", "cost_center": "_Test Cost Center - _TC",
"description": "Education Cess", "description": "Education Cess",
"doctype": "Purchase Taxes and Charges", "doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges", "parentfield": "other_charges",
"rate": 2, "rate": 2,
"row_id": 3 "row_id": 3
}, },
{ {
"account_head": "_Test Account S&H Education Cess - _TC", "account_head": "_Test Account S&H Education Cess - _TC",
"add_deduct_tax": "Add", "add_deduct_tax": "Add",
"category": "Total", "category": "Total",
"charge_type": "On Previous Row Amount", "charge_type": "On Previous Row Amount",
"cost_center": "_Test Cost Center - _TC", "cost_center": "_Test Cost Center - _TC",
"description": "S&H Education Cess", "description": "S&H Education Cess",
"doctype": "Purchase Taxes and Charges", "doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges", "parentfield": "other_charges",
"rate": 1, "rate": 1,
"row_id": 3 "row_id": 3
}, },
{ {
"account_head": "_Test Account CST - _TC", "account_head": "_Test Account CST - _TC",
"add_deduct_tax": "Add", "add_deduct_tax": "Add",
"category": "Total", "category": "Total",
"charge_type": "On Previous Row Total", "charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC", "cost_center": "_Test Cost Center - _TC",
"description": "CST", "description": "CST",
"doctype": "Purchase Taxes and Charges", "doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges", "parentfield": "other_charges",
"rate": 2, "rate": 2,
"row_id": 5 "row_id": 5
}, },
{ {
"account_head": "_Test Account VAT - _TC", "account_head": "_Test Account VAT - _TC",
"add_deduct_tax": "Add", "add_deduct_tax": "Add",
"category": "Total", "category": "Total",
"charge_type": "On Net Total", "charge_type": "On Net Total",
"cost_center": "_Test Cost Center - _TC", "cost_center": "_Test Cost Center - _TC",
"description": "VAT", "description": "VAT",
"doctype": "Purchase Taxes and Charges", "doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges", "parentfield": "other_charges",
"rate": 12.5 "rate": 12.5
}, },
{ {
"account_head": "_Test Account Discount - _TC", "account_head": "_Test Account Discount - _TC",
"add_deduct_tax": "Deduct", "add_deduct_tax": "Deduct",
"category": "Total", "category": "Total",
"charge_type": "On Previous Row Total", "charge_type": "On Previous Row Total",
"cost_center": "_Test Cost Center - _TC", "cost_center": "_Test Cost Center - _TC",
"description": "Discount", "description": "Discount",
"doctype": "Purchase Taxes and Charges", "doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges", "parentfield": "other_charges",
"rate": 10, "rate": 10,
"row_id": 7 "row_id": 7
} }
], ],
"posting_date": "2013-02-03", "posting_date": "2013-02-03",
"supplier_name": "_Test Supplier" "supplier_name": "_Test Supplier"
}, },
{ {
"bill_no": "NA", "bill_no": "NA",
"buying_price_list": "_Test Price List", "buying_price_list": "_Test Price List",
"company": "_Test Company", "company": "_Test Company",
"conversion_rate": 1.0, "conversion_rate": 1.0,
"credit_to": "_Test Supplier - _TC", "credit_to": "_Test Supplier - _TC",
"currency": "INR", "currency": "INR",
"doctype": "Purchase Invoice", "doctype": "Purchase Invoice",
"entries": [ "entries": [
{ {
"conversion_factor": 1.0, "conversion_factor": 1.0,
"cost_center": "_Test Cost Center - _TC", "cost_center": "_Test Cost Center - _TC",
"doctype": "Purchase Invoice Item", "doctype": "Purchase Invoice Item",
"expense_account": "_Test Account Cost for Goods Sold - _TC", "expense_account": "_Test Account Cost for Goods Sold - _TC",
"item_code": "_Test Item", "item_code": "_Test Item",
"item_name": "_Test Item", "item_name": "_Test Item",
"parentfield": "entries", "parentfield": "entries",
"qty": 10.0, "qty": 10.0,
"rate": 50.0, "rate": 50.0,
"uom": "_Test UOM" "uom": "_Test UOM"
} }
], ],
"fiscal_year": "_Test Fiscal Year 2013", "fiscal_year": "_Test Fiscal Year 2013",
"grand_total_import": 0, "grand_total_import": 0,
"naming_series": "_T-Purchase Invoice-", "naming_series": "_T-Purchase Invoice-",
"other_charges": [ "other_charges": [
{ {
"account_head": "_Test Account Shipping Charges - _TC", "account_head": "_Test Account Shipping Charges - _TC",
"add_deduct_tax": "Add", "add_deduct_tax": "Add",
"category": "Valuation and Total", "category": "Valuation and Total",
"charge_type": "Actual", "charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC", "cost_center": "_Test Cost Center - _TC",
"description": "Shipping Charges", "description": "Shipping Charges",
"doctype": "Purchase Taxes and Charges", "doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges", "parentfield": "other_charges",
"rate": 100.0 "rate": 100.0
}, },
{ {
"account_head": "_Test Account VAT - _TC", "account_head": "_Test Account VAT - _TC",
"add_deduct_tax": "Add", "add_deduct_tax": "Add",
"category": "Total", "category": "Total",
"charge_type": "Actual", "charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC", "cost_center": "_Test Cost Center - _TC",
"description": "VAT", "description": "VAT",
"doctype": "Purchase Taxes and Charges", "doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges", "parentfield": "other_charges",
"rate": 120.0 "rate": 120.0
}, },
{ {
"account_head": "_Test Account Customs Duty - _TC", "account_head": "_Test Account Customs Duty - _TC",
"add_deduct_tax": "Add", "add_deduct_tax": "Add",
"category": "Valuation", "category": "Valuation",
"charge_type": "Actual", "charge_type": "Actual",
"cost_center": "_Test Cost Center - _TC", "cost_center": "_Test Cost Center - _TC",
"description": "Customs Duty", "description": "Customs Duty",
"doctype": "Purchase Taxes and Charges", "doctype": "Purchase Taxes and Charges",
"parentfield": "other_charges", "parentfield": "other_charges",
"rate": 150.0 "rate": 150.0
} }
], ],
"posting_date": "2013-02-03", "posting_date": "2013-02-03",
"supplier_name": "_Test Supplier" "supplier_name": "_Test Supplier"
} }
] ]

View File

@ -1,256 +1,256 @@
{ {
"allow_import": 1, "allow_import": 1,
"autoname": "naming_series:", "autoname": "naming_series:",
"creation": "2013-01-10 16:34:16", "creation": "2013-01-10 16:34:16",
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"fields": [ "fields": [
{ {
"fieldname": "item", "fieldname": "item",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Item", "label": "Item",
"options": "icon-gift", "options": "icon-gift",
"permlevel": 0 "permlevel": 0
}, },
{ {
"default": "PRO", "default": "PRO-",
"fieldname": "naming_series", "fieldname": "naming_series",
"fieldtype": "Select", "fieldtype": "Select",
"label": "Series", "label": "Series",
"options": "PRO-", "options": "PRO-",
"permlevel": 0, "permlevel": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"depends_on": "eval:!doc.__islocal", "depends_on": "eval:!doc.__islocal",
"fieldname": "status", "fieldname": "status",
"fieldtype": "Select", "fieldtype": "Select",
"in_filter": 1, "in_filter": 1,
"in_list_view": 1, "in_list_view": 1,
"label": "Status", "label": "Status",
"no_copy": 1, "no_copy": 1,
"oldfieldname": "status", "oldfieldname": "status",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "\nDraft\nSubmitted\nStopped\nIn Process\nCompleted\nCancelled", "options": "\nDraft\nSubmitted\nStopped\nIn Process\nCompleted\nCancelled",
"permlevel": 0, "permlevel": 0,
"read_only": 1, "read_only": 1,
"reqd": 1, "reqd": 1,
"search_index": 1 "search_index": 1
}, },
{ {
"fieldname": "production_item", "fieldname": "production_item",
"fieldtype": "Link", "fieldtype": "Link",
"in_filter": 1, "in_filter": 1,
"in_list_view": 1, "in_list_view": 1,
"label": "Item To Manufacture", "label": "Item To Manufacture",
"oldfieldname": "production_item", "oldfieldname": "production_item",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Item", "options": "Item",
"permlevel": 0, "permlevel": 0,
"read_only": 0, "read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"depends_on": "production_item", "depends_on": "production_item",
"description": "Bill of Material to be considered for manufacturing", "description": "Bill of Material to be considered for manufacturing",
"fieldname": "bom_no", "fieldname": "bom_no",
"fieldtype": "Link", "fieldtype": "Link",
"in_list_view": 1, "in_list_view": 1,
"label": "BOM No", "label": "BOM No",
"oldfieldname": "bom_no", "oldfieldname": "bom_no",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "BOM", "options": "BOM",
"permlevel": 0, "permlevel": 0,
"read_only": 0, "read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"default": "1", "default": "1",
"description": "If checked, BOM for sub-assembly items will be considered for getting raw materials. Otherwise, all sub-assembly items will be treated as a raw material.", "description": "If checked, BOM for sub-assembly items will be considered for getting raw materials. Otherwise, all sub-assembly items will be treated as a raw material.",
"fieldname": "use_multi_level_bom", "fieldname": "use_multi_level_bom",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Use Multi-Level BOM", "label": "Use Multi-Level BOM",
"permlevel": 0 "permlevel": 0
}, },
{ {
"fieldname": "column_break1", "fieldname": "column_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"oldfieldtype": "Column Break", "oldfieldtype": "Column Break",
"permlevel": 0, "permlevel": 0,
"read_only": 0, "read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
"description": "Manufacture against Sales Order", "description": "Manufacture against Sales Order",
"fieldname": "sales_order", "fieldname": "sales_order",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Sales Order", "label": "Sales Order",
"options": "Sales Order", "options": "Sales Order",
"permlevel": 0, "permlevel": 0,
"read_only": 0 "read_only": 0
}, },
{ {
"depends_on": "production_item", "depends_on": "production_item",
"fieldname": "qty", "fieldname": "qty",
"fieldtype": "Float", "fieldtype": "Float",
"in_list_view": 1, "in_list_view": 1,
"label": "Qty To Manufacture", "label": "Qty To Manufacture",
"oldfieldname": "qty", "oldfieldname": "qty",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"permlevel": 0, "permlevel": 0,
"read_only": 0, "read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"depends_on": "eval:doc.docstatus==1", "depends_on": "eval:doc.docstatus==1",
"description": "Automatically updated via Stock Entry of type Manufacture/Repack", "description": "Automatically updated via Stock Entry of type Manufacture/Repack",
"fieldname": "produced_qty", "fieldname": "produced_qty",
"fieldtype": "Float", "fieldtype": "Float",
"label": "Manufactured Qty", "label": "Manufactured Qty",
"no_copy": 1, "no_copy": 1,
"oldfieldname": "produced_qty", "oldfieldname": "produced_qty",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
}, },
{ {
"depends_on": "sales_order", "depends_on": "sales_order",
"fieldname": "expected_delivery_date", "fieldname": "expected_delivery_date",
"fieldtype": "Date", "fieldtype": "Date",
"label": "Expected Delivery Date", "label": "Expected Delivery Date",
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
}, },
{ {
"fieldname": "warehouses", "fieldname": "warehouses",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Warehouses", "label": "Warehouses",
"options": "icon-building", "options": "icon-building",
"permlevel": 0 "permlevel": 0
}, },
{ {
"depends_on": "production_item", "depends_on": "production_item",
"description": "Manufactured quantity will be updated in this warehouse", "description": "Manufactured quantity will be updated in this warehouse",
"fieldname": "fg_warehouse", "fieldname": "fg_warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"in_list_view": 0, "in_list_view": 0,
"label": "For Warehouse", "label": "For Warehouse",
"options": "Warehouse", "options": "Warehouse",
"permlevel": 0, "permlevel": 0,
"read_only": 0, "read_only": 0,
"reqd": 0 "reqd": 0
}, },
{ {
"fieldname": "column_break_12", "fieldname": "column_break_12",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "permlevel": 0
}, },
{ {
"fieldname": "wip_warehouse", "fieldname": "wip_warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Work-in-Progress Warehouse", "label": "Work-in-Progress Warehouse",
"options": "Warehouse", "options": "Warehouse",
"permlevel": 0, "permlevel": 0,
"reqd": 0 "reqd": 0
}, },
{ {
"fieldname": "more_info", "fieldname": "more_info",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "More Info", "label": "More Info",
"options": "icon-file-text", "options": "icon-file-text",
"permlevel": 0, "permlevel": 0,
"read_only": 0 "read_only": 0
}, },
{ {
"fieldname": "description", "fieldname": "description",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"label": "Item Description", "label": "Item Description",
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
}, },
{ {
"fieldname": "project_name", "fieldname": "project_name",
"fieldtype": "Link", "fieldtype": "Link",
"in_filter": 1, "in_filter": 1,
"label": "Project Name", "label": "Project Name",
"oldfieldname": "project_name", "oldfieldname": "project_name",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Project", "options": "Project",
"permlevel": 0, "permlevel": 0,
"read_only": 0 "read_only": 0
}, },
{ {
"fieldname": "column_break2", "fieldname": "column_break2",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0, "permlevel": 0,
"read_only": 0, "read_only": 0,
"width": "50%" "width": "50%"
}, },
{ {
"depends_on": "production_item", "depends_on": "production_item",
"fieldname": "stock_uom", "fieldname": "stock_uom",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Stock UOM", "label": "Stock UOM",
"oldfieldname": "stock_uom", "oldfieldname": "stock_uom",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"options": "UOM", "options": "UOM",
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
}, },
{ {
"fieldname": "company", "fieldname": "company",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Company", "label": "Company",
"oldfieldname": "company", "oldfieldname": "company",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Company", "options": "Company",
"permlevel": 0, "permlevel": 0,
"read_only": 0, "read_only": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"fieldname": "amended_from", "fieldname": "amended_from",
"fieldtype": "Data", "fieldtype": "Data",
"ignore_user_permissions": 1, "ignore_user_permissions": 1,
"label": "Amended From", "label": "Amended From",
"no_copy": 1, "no_copy": 1,
"oldfieldname": "amended_from", "oldfieldname": "amended_from",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
} }
], ],
"icon": "icon-cogs", "icon": "icon-cogs",
"idx": 1, "idx": 1,
"in_create": 0, "in_create": 0,
"is_submittable": 1, "is_submittable": 1,
"modified": "2014-05-27 03:49:15.008942", "modified": "2014-05-27 03:49:15.008942",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Manufacturing", "module": "Manufacturing",
"name": "Production Order", "name": "Production Order",
"owner": "Administrator", "owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 1, "amend": 1,
"apply_user_permissions": 1, "apply_user_permissions": 1,
"cancel": 1, "cancel": 1,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"permlevel": 0, "permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Manufacturing User", "role": "Manufacturing User",
"submit": 1, "submit": 1,
"write": 1 "write": 1
}, },
{ {
"apply_user_permissions": 1, "apply_user_permissions": 1,
"permlevel": 0, "permlevel": 0,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Material User" "role": "Material User"
} }
] ]
} }

View File

@ -16,7 +16,7 @@
"doctype": "Lead", "doctype": "Lead",
"email_id": "test_lead2@example.com", "email_id": "test_lead2@example.com",
"lead_name": "_Test Lead 2", "lead_name": "_Test Lead 2",
"status": "Contacted" "status": "Lead"
}, },
{ {
"doctype": "Lead", "doctype": "Lead",

View File

@ -125,7 +125,7 @@ def create_lead(email_id):
"doctype": "Lead", "doctype": "Lead",
"email_id": email_id, "email_id": email_id,
"lead_name": real_name or email_id, "lead_name": real_name or email_id,
"status": "Contacted", "status": "Lead",
"naming_series": get_default_naming_series("Lead"), "naming_series": get_default_naming_series("Lead"),
"company": frappe.db.get_default("company"), "company": frappe.db.get_default("company"),
"source": "Email" "source": "Email"