Merge pull request #1820 from anandpdoshi/anand-wip
Validate Select Fields
This commit is contained in:
commit
a2f5a7f3cd
@ -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",
|
||||
|
@ -113,7 +113,7 @@
|
||||
"label": "Voucher Type",
|
||||
"oldfieldname": "voucher_type",
|
||||
"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,
|
||||
"search_index": 0
|
||||
},
|
||||
@ -186,7 +186,7 @@
|
||||
"icon": "icon-list",
|
||||
"idx": 1,
|
||||
"in_create": 1,
|
||||
"modified": "2014-06-09 01:51:29.340077",
|
||||
"modified": "2014-06-19 01:51:29.340077",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "GL Entry",
|
||||
|
@ -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,
|
||||
|
@ -42,7 +42,7 @@
|
||||
],
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"grand_total_import": 0,
|
||||
"naming_series": "BILL",
|
||||
"naming_series": "_T-BILL",
|
||||
"other_charges": [
|
||||
{
|
||||
"account_head": "_Test Account Shipping Charges - _TC",
|
||||
|
@ -9,6 +9,7 @@
|
||||
"fieldtype": "Select",
|
||||
"in_list_view": 1,
|
||||
"label": "Feed Type",
|
||||
"options": "\nComment\nLogin",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
@ -48,7 +49,7 @@
|
||||
],
|
||||
"icon": "icon-rss",
|
||||
"idx": 1,
|
||||
"modified": "2014-05-27 03:49:10.882587",
|
||||
"modified": "2014-06-18 03:49:10.882587",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Home",
|
||||
"name": "Feed",
|
||||
|
@ -13,7 +13,7 @@
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"default": "PRO",
|
||||
"default": "PRO-",
|
||||
"fieldname": "naming_series",
|
||||
"fieldtype": "Select",
|
||||
"label": "Series",
|
||||
|
@ -16,7 +16,7 @@
|
||||
"doctype": "Lead",
|
||||
"email_id": "test_lead2@example.com",
|
||||
"lead_name": "_Test Lead 2",
|
||||
"status": "Contacted"
|
||||
"status": "Lead"
|
||||
},
|
||||
{
|
||||
"doctype": "Lead",
|
||||
|
@ -51,14 +51,14 @@
|
||||
"fieldtype": "Select",
|
||||
"in_list_view": 1,
|
||||
"label": "Number Format",
|
||||
"options": "\n#,###.##\n#.###,##\n# ###.##\n#,###.###\n#,##,###.##\n#.###\n#,###",
|
||||
"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": "2014-06-18 03:49:09.038451",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Setup",
|
||||
"name": "Currency",
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user