Merge pull request #1820 from anandpdoshi/anand-wip

Validate Select Fields
This commit is contained in:
Rushabh Mehta 2014-06-19 16:32:50 +05:30
commit a2f5a7f3cd
9 changed files with 700 additions and 694 deletions

View File

@ -91,7 +91,7 @@
"label": "Account Type",
"oldfieldname": "account_type",
"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,
"search_index": 0
},
@ -210,7 +210,7 @@
"icon": "icon-money",
"idx": 1,
"in_create": 1,
"modified": "2014-06-03 18:27:58.109303",
"modified": "2014-06-19 18:27:58.109303",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account",

View File

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

View File

@ -186,9 +186,14 @@ class JournalVoucher(AccountsController):
def set_print_format_fields(self):
for d in self.get('entries'):
account_type, master_type = frappe.db.get_value("Account", d.account,
result = frappe.db.get_value("Account", d.account,
["account_type", "master_type"])
if not result:
continue
account_type, master_type = result
if master_type in ['Supplier', 'Customer']:
if not self.pay_to_recd_from:
self.pay_to_recd_from = frappe.db.get_value(master_type,

View File

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

View File

@ -1,72 +1,73 @@
{
"autoname": "hash",
"creation": "2012-07-03 13:29:42",
"docstatus": 0,
"doctype": "DocType",
"autoname": "hash",
"creation": "2012-07-03 13:29:42",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"fieldname": "feed_type",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Feed Type",
"fieldname": "feed_type",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Feed Type",
"options": "\nComment\nLogin",
"permlevel": 0
},
},
{
"fieldname": "doc_type",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Doc Type",
"fieldname": "doc_type",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Doc Type",
"permlevel": 0
},
},
{
"fieldname": "doc_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Doc Name",
"fieldname": "doc_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Doc Name",
"permlevel": 0
},
},
{
"fieldname": "subject",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Subject",
"fieldname": "subject",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Subject",
"permlevel": 0
},
},
{
"fieldname": "color",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Color",
"fieldname": "color",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Color",
"permlevel": 0
},
},
{
"fieldname": "full_name",
"fieldtype": "Data",
"label": "Full Name",
"fieldname": "full_name",
"fieldtype": "Data",
"label": "Full Name",
"permlevel": 0
}
],
"icon": "icon-rss",
"idx": 1,
"modified": "2014-05-27 03:49:10.882587",
"modified_by": "Administrator",
"module": "Home",
"name": "Feed",
"owner": "Administrator",
],
"icon": "icon-rss",
"idx": 1,
"modified": "2014-06-18 03:49:10.882587",
"modified_by": "Administrator",
"module": "Home",
"name": "Feed",
"owner": "Administrator",
"permissions": [
{
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager"
},
},
{
"apply_user_permissions": 1,
"permlevel": 0,
"read": 1,
"apply_user_permissions": 1,
"permlevel": 0,
"read": 1,
"role": "All"
}
]
}
}

View File

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

View File

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

View File

@ -1,117 +1,117 @@
{
"autoname": "field:currency_name",
"creation": "2013-01-28 10:06:02",
"description": "**Currency** Master",
"docstatus": 0,
"doctype": "DocType",
"autoname": "field:currency_name",
"creation": "2013-01-28 10:06:02",
"description": "**Currency** Master",
"docstatus": 0,
"doctype": "DocType",
"fields": [
{
"fieldname": "currency_name",
"fieldtype": "Data",
"label": "Currency Name",
"oldfieldname": "currency_name",
"oldfieldtype": "Data",
"permlevel": 0,
"fieldname": "currency_name",
"fieldtype": "Data",
"label": "Currency Name",
"oldfieldname": "currency_name",
"oldfieldtype": "Data",
"permlevel": 0,
"reqd": 1
},
},
{
"fieldname": "enabled",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Enabled",
"fieldname": "enabled",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Enabled",
"permlevel": 0
},
},
{
"description": "Sub-currency. For e.g. \"Cent\"",
"fieldname": "fraction",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Fraction",
"description": "Sub-currency. For e.g. \"Cent\"",
"fieldname": "fraction",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Fraction",
"permlevel": 0
},
},
{
"description": "1 Currency = [?] Fraction\nFor e.g. 1 USD = 100 Cent",
"fieldname": "fraction_units",
"fieldtype": "Int",
"in_list_view": 1,
"label": "Fraction Units",
"description": "1 Currency = [?] Fraction\nFor e.g. 1 USD = 100 Cent",
"fieldname": "fraction_units",
"fieldtype": "Int",
"in_list_view": 1,
"label": "Fraction Units",
"permlevel": 0
},
},
{
"description": "A symbol for this currency. For e.g. $",
"fieldname": "symbol",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Symbol",
"description": "A symbol for this currency. For e.g. $",
"fieldname": "symbol",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Symbol",
"permlevel": 0
},
},
{
"description": "How should this currency be formatted? If not set, will use system defaults",
"fieldname": "number_format",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Number Format",
"options": "\n#,###.##\n#.###,##\n# ###.##\n#,###.###\n#,##,###.##\n#.###\n#,###",
"description": "How should this currency be formatted? If not set, will use system defaults",
"fieldname": "number_format",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Number Format",
"options": "\n#,###.##\n#.###,##\n# ###.##\n# ###,##\n#'###.##\n#, ###.##\n#,##,###.##\n#,###.###\n#.###\n#,###",
"permlevel": 0
}
],
"icon": "icon-bitcoin",
"idx": 1,
"in_create": 0,
"modified": "2014-05-27 03:49:09.038451",
"modified_by": "Administrator",
"module": "Setup",
"name": "Currency",
"owner": "Administrator",
],
"icon": "icon-bitcoin",
"idx": 1,
"in_create": 0,
"modified": "2014-06-18 03:49:09.038451",
"modified_by": "Administrator",
"module": "Setup",
"name": "Currency",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"submit": 0,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"submit": 0,
"write": 1
},
},
{
"amend": 0,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Sales Master Manager",
"submit": 0,
"amend": 0,
"create": 1,
"delete": 1,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Sales Master Manager",
"submit": 0,
"write": 1
},
},
{
"amend": 0,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Purchase Master Manager",
"submit": 0,
"amend": 0,
"create": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Purchase Master Manager",
"submit": 0,
"write": 1
},
},
{
"apply_user_permissions": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"apply_user_permissions": 1,
"delete": 0,
"email": 1,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "All"
}
],
],
"read_only": 0
}
}

View File

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