more fixes to perms, floats and default enabled / disabled in search
This commit is contained in:
parent
efe8102351
commit
6382a42dbe
@ -1,230 +1,217 @@
|
||||
[
|
||||
{
|
||||
"owner": "Administrator",
|
||||
"creation": "2013-01-10 16:34:07",
|
||||
"docstatus": 0,
|
||||
"creation": "2012-06-11 12:09:53",
|
||||
"modified": "2013-01-22 16:55:20",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2012-07-16 16:27:51"
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"section_style": "Simple",
|
||||
"module": "Accounts",
|
||||
"doctype": "DocType",
|
||||
"server_code_error": " ",
|
||||
"autoname": "POS/.####",
|
||||
"name": "__common__",
|
||||
"colour": "White:FFF",
|
||||
"_last_update": "1322549700",
|
||||
"show_in_menu": 0,
|
||||
"version": 1
|
||||
"doctype": "DocType",
|
||||
"module": "Accounts",
|
||||
"name": "__common__"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"name": "__common__",
|
||||
"parent": "POS Setting",
|
||||
"doctype": "DocField",
|
||||
"parentfield": "fields",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"name": "__common__",
|
||||
"parent": "POS Setting",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"parentfield": "fields"
|
||||
},
|
||||
{
|
||||
"name": "__common__",
|
||||
"parent": "POS Setting",
|
||||
"read": 1,
|
||||
"doctype": "DocPerm",
|
||||
"parenttype": "DocType",
|
||||
"report": 1,
|
||||
"permlevel": 0,
|
||||
"parentfield": "permissions"
|
||||
},
|
||||
{
|
||||
"name": "POS Setting",
|
||||
"doctype": "DocType"
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Link",
|
||||
"doctype": "DocField",
|
||||
"label": "User",
|
||||
"oldfieldname": "user",
|
||||
"fieldname": "user",
|
||||
"fieldtype": "Link",
|
||||
"options": "Profile"
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Link",
|
||||
"doctype": "DocField",
|
||||
"label": "Territory",
|
||||
"oldfieldname": "territory",
|
||||
"fieldname": "territory",
|
||||
"fieldtype": "Link",
|
||||
"reqd": 1,
|
||||
"options": "Territory"
|
||||
},
|
||||
{
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Select",
|
||||
"doctype": "DocField",
|
||||
"label": "Series",
|
||||
"oldfieldname": "naming_series",
|
||||
"fieldname": "naming_series",
|
||||
"fieldtype": "Select",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Select",
|
||||
"doctype": "DocField",
|
||||
"label": "Currency",
|
||||
"oldfieldname": "currency",
|
||||
"fieldname": "currency",
|
||||
"fieldtype": "Select",
|
||||
"reqd": 1,
|
||||
"options": "link:Currency"
|
||||
},
|
||||
{
|
||||
"default": "1",
|
||||
"oldfieldtype": "Currency",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Conversion Rate",
|
||||
"oldfieldname": "conversion_rate",
|
||||
"fieldname": "conversion_rate",
|
||||
"fieldtype": "Float",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Select",
|
||||
"doctype": "DocField",
|
||||
"label": "Price List",
|
||||
"oldfieldname": "price_list_name",
|
||||
"fieldname": "price_list_name",
|
||||
"fieldtype": "Select",
|
||||
"reqd": 1,
|
||||
"options": "link:Price List"
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Link",
|
||||
"doctype": "DocField",
|
||||
"label": "Company",
|
||||
"oldfieldname": "company",
|
||||
"fieldname": "company",
|
||||
"fieldtype": "Link",
|
||||
"reqd": 1,
|
||||
"options": "Company"
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Column Break",
|
||||
"fieldname": "column_break0",
|
||||
"fieldtype": "Column Break",
|
||||
"doctype": "DocField"
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Link",
|
||||
"doctype": "DocField",
|
||||
"label": "Customer Account",
|
||||
"oldfieldname": "customer_account",
|
||||
"fieldname": "customer_account",
|
||||
"fieldtype": "Link",
|
||||
"reqd": 0,
|
||||
"options": "Account"
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Link",
|
||||
"doctype": "DocField",
|
||||
"label": "Cash/Bank Account",
|
||||
"oldfieldname": "cash_bank_account",
|
||||
"fieldname": "cash_bank_account",
|
||||
"fieldtype": "Link",
|
||||
"reqd": 1,
|
||||
"options": "Account"
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Link",
|
||||
"doctype": "DocField",
|
||||
"label": "Income Account",
|
||||
"oldfieldname": "income_account",
|
||||
"fieldname": "income_account",
|
||||
"fieldtype": "Link",
|
||||
"reqd": 1,
|
||||
"options": "Account"
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Link",
|
||||
"doctype": "DocField",
|
||||
"label": "Warehouse",
|
||||
"oldfieldname": "warehouse",
|
||||
"fieldname": "warehouse",
|
||||
"fieldtype": "Link",
|
||||
"reqd": 1,
|
||||
"options": "Warehouse"
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Link",
|
||||
"doctype": "DocField",
|
||||
"label": "Cost Center",
|
||||
"oldfieldname": "cost_center",
|
||||
"fieldname": "cost_center",
|
||||
"fieldtype": "Link",
|
||||
"reqd": 1,
|
||||
"options": "Cost Center"
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Link",
|
||||
"doctype": "DocField",
|
||||
"label": "Charge",
|
||||
"oldfieldname": "charge",
|
||||
"fieldname": "charge",
|
||||
"fieldtype": "Link",
|
||||
"options": "Sales Taxes and Charges Master"
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Select",
|
||||
"doctype": "DocField",
|
||||
"label": "Letter Head",
|
||||
"oldfieldname": "letter_head",
|
||||
"fieldname": "letter_head",
|
||||
"fieldtype": "Select",
|
||||
"options": "link:Letter Head"
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Link",
|
||||
"doctype": "DocField",
|
||||
"label": "Terms and Conditions",
|
||||
"oldfieldname": "tc_name",
|
||||
"fieldname": "tc_name",
|
||||
"fieldtype": "Link",
|
||||
"options": "Terms and Conditions"
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Select",
|
||||
"doctype": "DocField",
|
||||
"label": "Select Print Heading",
|
||||
"oldfieldname": "select_print_heading",
|
||||
"fieldname": "select_print_heading",
|
||||
"fieldtype": "Select",
|
||||
"options": "link:Print Heading",
|
||||
"in_filter": 0
|
||||
},
|
||||
{
|
||||
"write": 1,
|
||||
"create": 1,
|
||||
"role": "System Manager",
|
||||
"doctype": "DocPerm",
|
||||
"submit": 0
|
||||
},
|
||||
{
|
||||
"write": 1,
|
||||
"doctype": "DocType",
|
||||
"name": "POS Setting"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "user",
|
||||
"fieldtype": "Link",
|
||||
"label": "User",
|
||||
"oldfieldname": "user",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Profile"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "territory",
|
||||
"fieldtype": "Link",
|
||||
"label": "Territory",
|
||||
"oldfieldname": "territory",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Territory",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "naming_series",
|
||||
"fieldtype": "Select",
|
||||
"label": "Series",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "naming_series",
|
||||
"oldfieldtype": "Select",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "currency",
|
||||
"fieldtype": "Link",
|
||||
"label": "Currency",
|
||||
"oldfieldname": "currency",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Currency",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"default": "1",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "conversion_rate",
|
||||
"fieldtype": "Float",
|
||||
"label": "Conversion Rate",
|
||||
"oldfieldname": "conversion_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "price_list_name",
|
||||
"fieldtype": "Select",
|
||||
"label": "Price List",
|
||||
"oldfieldname": "price_list_name",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "link:Price List",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "company",
|
||||
"fieldtype": "Link",
|
||||
"label": "Company",
|
||||
"oldfieldname": "company",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Company",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break0",
|
||||
"fieldtype": "Column Break",
|
||||
"oldfieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "customer_account",
|
||||
"fieldtype": "Link",
|
||||
"label": "Customer Account",
|
||||
"oldfieldname": "customer_account",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Account",
|
||||
"reqd": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "cash_bank_account",
|
||||
"fieldtype": "Link",
|
||||
"label": "Cash/Bank Account",
|
||||
"oldfieldname": "cash_bank_account",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Account",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "income_account",
|
||||
"fieldtype": "Link",
|
||||
"label": "Income Account",
|
||||
"oldfieldname": "income_account",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Account",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "warehouse",
|
||||
"fieldtype": "Link",
|
||||
"label": "Warehouse",
|
||||
"oldfieldname": "warehouse",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Warehouse",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "cost_center",
|
||||
"fieldtype": "Link",
|
||||
"label": "Cost Center",
|
||||
"oldfieldname": "cost_center",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Cost Center",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "charge",
|
||||
"fieldtype": "Link",
|
||||
"label": "Charge",
|
||||
"oldfieldname": "charge",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Sales Taxes and Charges Master"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "letter_head",
|
||||
"fieldtype": "Select",
|
||||
"label": "Letter Head",
|
||||
"oldfieldname": "letter_head",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "link:Letter Head",
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "tc_name",
|
||||
"fieldtype": "Link",
|
||||
"label": "Terms and Conditions",
|
||||
"oldfieldname": "tc_name",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Terms and Conditions"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "select_print_heading",
|
||||
"fieldtype": "Select",
|
||||
"in_filter": 0,
|
||||
"label": "Select Print Heading",
|
||||
"oldfieldname": "select_print_heading",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "link:Print Heading"
|
||||
},
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"role": "System Manager",
|
||||
"doctype": "DocPerm"
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"write": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"role": "Accounts Manager",
|
||||
"doctype": "DocPerm"
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"role": "Accounts User",
|
||||
"doctype": "DocPerm"
|
||||
"doctype": "DocPerm",
|
||||
"role": "Accounts User"
|
||||
}
|
||||
]
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-21 18:19:17",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 14:56:42",
|
||||
"modified": "2013-01-22 16:55:20",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -238,11 +238,11 @@
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Currency",
|
||||
"oldfieldname": "currency",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:08",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 15:03:42",
|
||||
"modified": "2013-01-22 16:55:23",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -319,9 +319,9 @@
|
||||
"description": "Select the currency in which price list is maintained",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "price_list_currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Price List Currency",
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"print_hide": 1,
|
||||
"reqd": 1
|
||||
},
|
||||
@ -343,11 +343,11 @@
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Currency",
|
||||
"oldfieldname": "currency",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"print_hide": 1,
|
||||
"reqd": 1
|
||||
},
|
||||
|
@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-01-21 18:19:18",
|
||||
"creation": "2013-01-22 15:11:37",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 14:56:42",
|
||||
"modified": "2013-01-22 16:55:21",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -242,12 +242,12 @@
|
||||
"description": "Supplier's currency",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Currency",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "currency",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"print_hide": 1,
|
||||
"reqd": 1
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:11",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 14:57:25",
|
||||
"modified": "2013-01-22 16:55:25",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -162,10 +162,10 @@
|
||||
"description": "This currency will get fetched in Purchase transactions of this supplier",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "default_currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Default Currency",
|
||||
"no_copy": 1,
|
||||
"options": "link:Currency"
|
||||
"options": "Currency"
|
||||
},
|
||||
{
|
||||
"description": "Statutory info and other general information about your Supplier",
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-21 18:19:20",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 14:57:25",
|
||||
"modified": "2013-01-22 16:55:26",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -196,12 +196,12 @@
|
||||
"description": "Supplier's currency",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Currency",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "currency",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"print_hide": 1,
|
||||
"reqd": 1
|
||||
},
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:13",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 14:18:28",
|
||||
"modified": "2013-01-22 17:36:37",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:branch",
|
||||
"doctype": "DocType",
|
||||
"document_type": "Master",
|
||||
|
16
patches/december_2012/enable_currencies.py
Normal file
16
patches/december_2012/enable_currencies.py
Normal file
@ -0,0 +1,16 @@
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
# get all currencies
|
||||
webnotes.reload_doc("setup", "doctype", "currency")
|
||||
clist = [webnotes.conn.get_default("currency")]
|
||||
for f in webnotes.conn.sql("""select parent, fieldname from tabDocField
|
||||
where options in ('Currency', 'link:Currency')""", as_dict=1):
|
||||
if not webnotes.conn.get_value("DocType", f.parent, "issingle"):
|
||||
clist += [c[0] for c in webnotes.conn.sql("""select distinct `%s`
|
||||
from `tab%s`""" % (f.fieldname, f.parent))]
|
||||
|
||||
clist = list(set(clist))
|
||||
for c in clist:
|
||||
if c:
|
||||
webnotes.conn.sql("""update tabCurrency set `enabled`=1 where name=%s""", c)
|
@ -155,4 +155,5 @@ patch_list = [
|
||||
"patches.january_2013.purchase_price_list",
|
||||
"execute:webnotes.reload_doc('accounts','Print Format','Payment Receipt Voucher')",
|
||||
"patches.january_2013.update_fraction_for_usd",
|
||||
"patches.january_2013.enable_currencies",
|
||||
]
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:18",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 15:06:09",
|
||||
"modified": "2013-01-22 16:54:47",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -238,10 +238,10 @@
|
||||
"description": "This currency will get fetched in Sales transactions of this customer",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "default_currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Default Currency",
|
||||
"no_copy": 1,
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:19",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 14:57:22",
|
||||
"modified": "2013-01-22 16:55:23",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -313,9 +313,9 @@
|
||||
"description": "Select the currency in which price list is maintained",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "price_list_currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Price List Currency",
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"print_hide": 1,
|
||||
"reqd": 1
|
||||
},
|
||||
@ -338,12 +338,12 @@
|
||||
"description": "Customer's currency - If you want to select a currency that is not the default currency, then you must also specify the Currency Conversion Rate.",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"in_filter": 1,
|
||||
"label": "Currency",
|
||||
"oldfieldname": "currency",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"print_hide": 1,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
|
@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-01-10 16:34:20",
|
||||
"creation": "2013-01-22 15:24:17",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 13:52:58",
|
||||
"modified": "2013-01-22 16:55:24",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -331,9 +331,9 @@
|
||||
"description": "Select the currency in which price list is maintained",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "price_list_currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Price List Currency",
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"print_hide": 1,
|
||||
"reqd": 1
|
||||
},
|
||||
@ -356,11 +356,11 @@
|
||||
"description": "Customer's currency",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Currency",
|
||||
"oldfieldname": "currency",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"print_hide": 1,
|
||||
"reqd": 1,
|
||||
"width": "100px"
|
||||
|
@ -213,7 +213,9 @@ class DocType:
|
||||
cc = sql("select name from `tabCost Center` where cost_center_name = 'Root' and company_name = '%s'"%(self.doc.name))
|
||||
if not cc:
|
||||
self.create_default_cost_center()
|
||||
|
||||
|
||||
if self.doc.default_currency:
|
||||
webnotes.conn.set_value("Currency", self.doc.default_currency, "enabled", 1)
|
||||
|
||||
def on_trash(self):
|
||||
"""
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:22",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 14:55:58",
|
||||
"modified": "2013-01-22 16:54:47",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -86,9 +86,9 @@
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "default_currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Default Currency",
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
|
@ -1,2 +1,6 @@
|
||||
cur_frm.cscript.refresh = function(doc) {
|
||||
cur_frm.set_intro("");
|
||||
if(!cur_frm.doc.enabled) {
|
||||
cur_frm.set_intro(wn._("This Currency is disabled. Enable to use in transactions"))
|
||||
}
|
||||
}
|
19
setup/doctype/currency/currency_list.js
Normal file
19
setup/doctype/currency/currency_list.js
Normal file
@ -0,0 +1,19 @@
|
||||
wn.doclistviews['Currency'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabCurrency`.enabled",
|
||||
]);
|
||||
this.stats = this.stats.concat(['enabled']);
|
||||
this.order_by = "`tabCurrency`.`enabled` desc, `tabCurrency`.modified desc";
|
||||
},
|
||||
columns: [
|
||||
{width: '3%', content: 'check'},
|
||||
{width: '5%', content: 'avatar'},
|
||||
{width: '3%', content: "enabled"},
|
||||
{width: '70%', content: 'name'},
|
||||
{width: '20%', content:'modified',
|
||||
css: {'text-align': 'right', 'color': '#777'}},
|
||||
|
||||
]
|
||||
});
|
@ -65,7 +65,11 @@ class DocType:
|
||||
webnotes.conn.set_default('year_start_date', ysd.strftime('%Y-%m-%d'))
|
||||
webnotes.conn.set_default('year_end_date', \
|
||||
get_last_day(get_first_day(ysd,0,11)).strftime('%Y-%m-%d'))
|
||||
|
||||
|
||||
# enable default currency
|
||||
if self.doc.default_currency:
|
||||
webnotes.conn.set_value("Currency", self.doc.default_currency, "enabled", 1)
|
||||
|
||||
# clear cache
|
||||
webnotes.clear_cache()
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:23",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 14:56:02",
|
||||
"modified": "2013-01-22 16:54:48",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -101,9 +101,9 @@
|
||||
"default": "INR",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "default_currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Default Currency",
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
|
@ -53,6 +53,7 @@ class DocType:
|
||||
}}
|
||||
self.create_records(master_dict)
|
||||
|
||||
|
||||
# Company
|
||||
master_dict = {'Company': {
|
||||
'company_name':args.get('company_name'),
|
||||
@ -60,6 +61,10 @@ class DocType:
|
||||
'default_currency':args.get('currency')
|
||||
}}
|
||||
self.create_records(master_dict)
|
||||
|
||||
# enable default currency
|
||||
webnotes.conn.set_value("Currency", args.get("currency"), "enabled", 1)
|
||||
|
||||
|
||||
def_args = {
|
||||
'current_fiscal_year':curr_fiscal_year,
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:24",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 14:57:26",
|
||||
"modified": "2013-01-22 17:36:24",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:title",
|
||||
"description": "Standard Terms and Conditions that can be added to Sales and Purchases.\n\nExamples:\n\n1. Validity of the offer.\n1. Payment Terms (In Advance, On Credit, part advance etc).\n1. What is extra (or payable by the Customer).\n1. Safety / usage warning.\n1. Warranty if any.\n1. Returns Policy.\n1. Terms of shipping, if applicable.\n1. Ways of addressing disputes, indemnity, liability, etc.\n1. Address and Contact of your Company.",
|
||||
"doctype": "DocType",
|
||||
|
@ -19,7 +19,7 @@ wn.module_page["Setup"] = [
|
||||
{
|
||||
"doctype":"Currency",
|
||||
"label": wn._("Currency"),
|
||||
"description": wn._("Currency Master")
|
||||
"description": wn._("Enable / disable currencies.")
|
||||
},
|
||||
]
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:25",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 14:56:00",
|
||||
"modified": "2013-01-22 16:54:48",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -328,9 +328,9 @@
|
||||
"description": "Select the currency in which price list is maintained",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "price_list_currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Price List Currency",
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
@ -357,11 +357,11 @@
|
||||
"description": "Customer's Currency",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Currency",
|
||||
"oldfieldname": "currency",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"print_hide": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
|
@ -1,79 +1,79 @@
|
||||
[
|
||||
{
|
||||
"owner": "Administrator",
|
||||
"creation": "2013-01-21 18:19:14",
|
||||
"docstatus": 0,
|
||||
"creation": "2013-01-15 18:43:18",
|
||||
"modified": "2013-01-22 16:54:49",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2013-01-17 17:53:42"
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"read_only": 0,
|
||||
"istable": 1,
|
||||
"autoname": "RFD/.#####",
|
||||
"in_create": 1,
|
||||
"doctype": "DocType",
|
||||
"in_create": 1,
|
||||
"istable": 1,
|
||||
"module": "Stock",
|
||||
"name": "__common__"
|
||||
"name": "__common__",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"name": "__common__",
|
||||
"parent": "Item Price",
|
||||
"doctype": "DocField",
|
||||
"parentfield": "fields",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"parentfield": "fields"
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"name": "Item Price",
|
||||
"doctype": "DocType"
|
||||
"doctype": "DocType",
|
||||
"name": "Item Price"
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Select",
|
||||
"doctype": "DocField",
|
||||
"label": "Price List Name",
|
||||
"oldfieldname": "price_list_name",
|
||||
"fieldname": "price_list_name",
|
||||
"fieldtype": "Link",
|
||||
"search_index": 1,
|
||||
"reqd": 1,
|
||||
"in_filter": 1,
|
||||
"label": "Price List Name",
|
||||
"oldfieldname": "price_list_name",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Price List",
|
||||
"in_filter": 1
|
||||
"reqd": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Ref Rate",
|
||||
"oldfieldname": "ref_rate",
|
||||
"fieldname": "ref_rate",
|
||||
"fieldtype": "Currency",
|
||||
"search_index": 0,
|
||||
"in_filter": 1,
|
||||
"label": "Ref Rate",
|
||||
"oldfieldname": "ref_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
"reqd": 0,
|
||||
"in_filter": 1
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Select",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "ref_currency",
|
||||
"fieldtype": "Link",
|
||||
"in_filter": 1,
|
||||
"label": "Currency",
|
||||
"oldfieldname": "ref_currency",
|
||||
"fieldname": "ref_currency",
|
||||
"fieldtype": "Select",
|
||||
"search_index": 1,
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Currency",
|
||||
"reqd": 1,
|
||||
"options": "link:Currency",
|
||||
"in_filter": 1
|
||||
"search_index": 1
|
||||
},
|
||||
{
|
||||
"description": "Allow this price in sales related forms",
|
||||
"doctype": "DocField",
|
||||
"label": "For Selling",
|
||||
"fieldname": "selling",
|
||||
"fieldtype": "Check"
|
||||
"fieldtype": "Check",
|
||||
"label": "For Selling"
|
||||
},
|
||||
{
|
||||
"description": "Allow this price in purchase related forms",
|
||||
"doctype": "DocField",
|
||||
"label": "For Buying",
|
||||
"fieldname": "buying",
|
||||
"fieldtype": "Check"
|
||||
"fieldtype": "Check",
|
||||
"label": "For Buying"
|
||||
}
|
||||
]
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:28",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 14:56:03",
|
||||
"modified": "2013-01-22 16:54:49",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "wasim@webnotestech.com"
|
||||
},
|
||||
@ -67,9 +67,9 @@
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Currency",
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-01-21 18:19:24",
|
||||
"creation": "2013-01-22 15:24:18",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-22 14:56:43",
|
||||
"modified": "2013-01-22 16:55:22",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -267,11 +267,11 @@
|
||||
"description": "Supplier's currency",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "currency",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"label": "Currency",
|
||||
"oldfieldname": "currency",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "link:Currency",
|
||||
"options": "Currency",
|
||||
"print_hide": 1,
|
||||
"reqd": 1
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user