Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta 2012-12-03 07:03:33 +01:00
commit fccdfb1ccf
14 changed files with 1862 additions and 2178 deletions

View File

@ -1,396 +1,324 @@
# DocType, Account
[ [
# These values are common in all dictionaries
{ {
'creation': '2012-07-03 13:30:50', "owner": "Administrator",
'docstatus': 0, "docstatus": 0,
'modified': '2012-07-11 13:58:44', "creation": "2012-11-16 10:32:50",
'modified_by': u'Administrator', "modified_by": "Administrator",
'owner': u'Administrator' "modified": "2012-12-03 11:26:49"
}, },
# These values are common for all DocType
{ {
'_last_update': u'1325570645', "in_create": 1,
'allow_copy': 1, "search_fields": "debit_or_credit, group_or_ledger",
'allow_trash': 1, "module": "Accounts",
'colour': u'White:FFF', "document_type": "Master",
'default_print_format': u'Standard', "description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.",
'description': u'An **Account** is heading under which financial and business transactions are carried on. For example, \u201cTravel Expense\u201d is an account, \u201cCustomer Zoe\u201d, \u201cSupplier Mae\u201d are accounts. \n\n**Note:** ERPNext creates accounts for Customers and Suppliers automatically.\n\n### Groups and Ledgers\n\nThere are two main kinds of Accounts in ERPNext - Group and Ledger. Groups can have sub-groups and ledgers within them, whereas ledgers are the leaf nodes of your chart and cannot be further classified.\n\nAccounting Transactions can only be made against Ledger Accounts (not Groups)\n', "name": "__common__",
'doctype': 'DocType', "default_print_format": "Standard",
'document_type': u'Master', "allow_rename": 1,
'in_create': 1, "doctype": "DocType",
'module': u'Accounts', "allow_copy": 1
'name': '__common__',
'search_fields': u'debit_or_credit, group_or_ledger',
'section_style': u'Tray',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 1
}, },
# These values are common for all DocField
{ {
'doctype': u'DocField', "name": "__common__",
'name': '__common__', "parent": "Account",
'parent': u'Account', "doctype": "DocField",
'parentfield': u'fields', "parenttype": "DocType",
'parenttype': u'DocType' "parentfield": "fields"
}, },
# These values are common for all DocPerm
{ {
'amend': 0, "name": "__common__",
'doctype': u'DocPerm', "parent": "Account",
'name': '__common__', "amend": 0,
'parent': u'Account', "submit": 0,
'parentfield': u'permissions', "doctype": "DocPerm",
'parenttype': u'DocType', "read": 1,
'read': 1, "parenttype": "DocType",
'submit': 0 "parentfield": "permissions"
}, },
# DocType, Account
{ {
'doctype': 'DocType', "name": "Account",
'name': u'Account' "doctype": "DocType"
}, },
# DocPerm
{ {
'cancel': 0, "oldfieldtype": "Section Break",
'create': 0, "doctype": "DocField",
'doctype': u'DocPerm', "label": "Account Details",
'permlevel': 0, "fieldname": "properties",
'role': u'Auditor', "fieldtype": "Section Break",
'write': 1 "permlevel": 0
}, },
# DocPerm
{ {
'cancel': 0, "doctype": "DocField",
'create': 0, "width": "50%",
'doctype': u'DocPerm', "fieldname": "column_break0",
'permlevel': 1, "fieldtype": "Column Break",
'role': u'Auditor', "permlevel": 0
'write': 0
}, },
# DocPerm
{ {
'cancel': 0, "no_copy": 1,
'create': 0, "oldfieldtype": "Data",
'doctype': u'DocPerm', "doctype": "DocField",
'permlevel': 2, "label": "Account Name",
'role': u'Auditor', "oldfieldname": "account_name",
'write': 0 "fieldname": "account_name",
"fieldtype": "Data",
"search_index": 1,
"reqd": 1,
"permlevel": 1,
"in_filter": 1
}, },
# DocPerm
{ {
'cancel': 0, "print_hide": 1,
'create': 0, "oldfieldtype": "Int",
'doctype': u'DocPerm', "doctype": "DocField",
'permlevel': 0, "label": "Level",
'role': u'Sales User', "oldfieldname": "level",
'write': 0 "fieldname": "level",
"fieldtype": "Int",
"hidden": 1,
"permlevel": 1
}, },
# DocPerm
{ {
'cancel': 0, "default": "Ledger",
'create': 0, "oldfieldtype": "Select",
'doctype': u'DocPerm', "doctype": "DocField",
'permlevel': 0, "label": "Group or Ledger",
'role': u'Purchase User', "oldfieldname": "group_or_ledger",
'write': 0 "permlevel": 1,
"fieldname": "group_or_ledger",
"fieldtype": "Select",
"search_index": 1,
"reqd": 1,
"options": "\nLedger\nGroup",
"in_filter": 1
}, },
# DocPerm
{ {
'cancel': 0, "oldfieldtype": "Data",
'create': 0, "doctype": "DocField",
'doctype': u'DocPerm', "label": "Debit or Credit",
'permlevel': 0, "oldfieldname": "debit_or_credit",
'role': u'Accounts User', "fieldname": "debit_or_credit",
'write': 1 "fieldtype": "Data",
"search_index": 1,
"permlevel": 1,
"in_filter": 1
}, },
# DocPerm
{ {
'cancel': 1, "oldfieldtype": "Select",
'create': 1, "doctype": "DocField",
'doctype': u'DocPerm', "label": "Is PL Account",
'permlevel': 0, "oldfieldname": "is_pl_account",
'role': u'Accounts Manager', "options": "Yes\nNo",
'write': 1 "fieldname": "is_pl_account",
"fieldtype": "Select",
"search_index": 1,
"permlevel": 1,
"in_filter": 1
}, },
# DocPerm
{ {
'cancel': 0, "oldfieldtype": "Link",
'create': 0, "doctype": "DocField",
'doctype': u'DocPerm', "label": "Company",
'permlevel': 1, "oldfieldname": "company",
'role': u'Accounts User', "options": "Company",
'write': 0 "fieldname": "company",
"fieldtype": "Link",
"search_index": 1,
"reqd": 1,
"permlevel": 1,
"in_filter": 1
}, },
# DocPerm
{ {
'cancel': 0, "doctype": "DocField",
'create': 0, "width": "50%",
'doctype': u'DocPerm', "fieldname": "column_break1",
'permlevel': 1, "fieldtype": "Column Break",
'role': u'Accounts Manager', "permlevel": 0
'write': 0
}, },
# DocPerm
{ {
'cancel': 0, "oldfieldtype": "Link",
'create': 0, "doctype": "DocField",
'doctype': u'DocPerm', "label": "Parent Account",
'permlevel': 2, "oldfieldname": "parent_account",
'role': u'Accounts Manager', "trigger": "Client",
'write': 1 "fieldname": "parent_account",
"fieldtype": "Link",
"search_index": 1,
"options": "Account",
"permlevel": 0
}, },
# DocPerm
{ {
'cancel': 0, "description": "Setting Account Type helps in selecting this Account in transactions.",
'create': 0, "oldfieldtype": "Select",
'doctype': u'DocPerm', "colour": "White:FFF",
'permlevel': 2, "doctype": "DocField",
'role': u'Accounts User', "label": "Account Type",
'write': 0 "oldfieldname": "account_type",
"permlevel": 0,
"trigger": "Client",
"fieldname": "account_type",
"fieldtype": "Select",
"search_index": 0,
"in_filter": 1,
"options": "\nFixed Asset Account\nBank or Cash\nExpense Account\nTax\nIncome Account\nChargeable"
}, },
# DocField
{ {
'doctype': u'DocField', "description": "Rate at which this tax is applied",
'fieldname': u'properties', "oldfieldtype": "Currency",
'fieldtype': u'Section Break', "colour": "White:FFF",
'label': u'Account Details', "doctype": "DocField",
'oldfieldtype': u'Section Break', "label": "Rate",
'permlevel': 0 "oldfieldname": "tax_rate",
"fieldname": "tax_rate",
"fieldtype": "Currency",
"reqd": 0,
"hidden": 0,
"permlevel": 0
}, },
# DocField
{ {
'doctype': u'DocField', "description": "If the account is frozen, entries are allowed for the \"Account Manager\" only.",
'fieldname': u'column_break0', "oldfieldtype": "Select",
'fieldtype': u'Column Break', "colour": "White:FFF",
'permlevel': 0, "doctype": "DocField",
'width': u'50%' "label": "Frozen",
"oldfieldname": "freeze_account",
"options": "No\nYes",
"fieldname": "freeze_account",
"fieldtype": "Select",
"permlevel": 2
}, },
# DocField
{ {
'doctype': u'DocField', "print_hide": 1,
'fieldname': u'account_name', "oldfieldtype": "Int",
'fieldtype': u'Data', "colour": "White:FFF",
'in_filter': 1, "doctype": "DocField",
'label': u'Account Name', "label": "Credit Days",
'no_copy': 1, "oldfieldname": "credit_days",
'oldfieldname': u'account_name', "fieldname": "credit_days",
'oldfieldtype': u'Data', "fieldtype": "Int",
'permlevel': 1, "hidden": 1,
'reqd': 1, "permlevel": 0
'search_index': 1
}, },
# DocField
{ {
'doctype': u'DocField', "print_hide": 1,
'fieldname': u'level', "oldfieldtype": "Currency",
'fieldtype': u'Int', "doctype": "DocField",
'hidden': 1, "label": "Credit Limit",
'label': u'Level', "oldfieldname": "credit_limit",
'oldfieldname': u'level', "fieldname": "credit_limit",
'oldfieldtype': u'Int', "fieldtype": "Currency",
'permlevel': 1, "hidden": 1,
'print_hide': 1 "permlevel": 0
}, },
# DocField
{ {
'default': u'Ledger', "description": "If this Account represents a Customer, Supplier or Employee, set it here.",
'doctype': u'DocField', "oldfieldtype": "Select",
'fieldname': u'group_or_ledger', "colour": "White:FFF",
'fieldtype': u'Select', "doctype": "DocField",
'in_filter': 1, "label": "Master Type",
'label': u'Group or Ledger', "oldfieldname": "master_type",
'oldfieldname': u'group_or_ledger', "options": "\nSupplier\nCustomer\nEmployee",
'oldfieldtype': u'Select', "fieldname": "master_type",
'options': u'\nLedger\nGroup', "fieldtype": "Select",
'permlevel': 1, "permlevel": 0
'reqd': 1,
'search_index': 1
}, },
# DocField
{ {
'doctype': u'DocField', "oldfieldtype": "Link",
'fieldname': u'debit_or_credit', "doctype": "DocField",
'fieldtype': u'Data', "label": "Master Name",
'in_filter': 1, "oldfieldname": "master_name",
'label': u'Debit or Credit', "trigger": "Client",
'oldfieldname': u'debit_or_credit', "fieldname": "master_name",
'oldfieldtype': u'Data', "fieldtype": "Link",
'permlevel': 1, "options": "[Select]",
'search_index': 1 "permlevel": 0
}, },
# DocField
{ {
'doctype': u'DocField', "create": 0,
'fieldname': u'is_pl_account', "doctype": "DocPerm",
'fieldtype': u'Select', "write": 1,
'in_filter': 1, "cancel": 0,
'label': u'Is PL Account', "role": "Auditor",
'oldfieldname': u'is_pl_account', "permlevel": 0
'oldfieldtype': u'Select',
'options': u'Yes\nNo',
'permlevel': 1,
'search_index': 1
}, },
# DocField
{ {
'doctype': u'DocField', "create": 0,
'fieldname': u'company', "doctype": "DocPerm",
'fieldtype': u'Link', "write": 0,
'in_filter': 1, "cancel": 0,
'label': u'Company', "role": "Auditor",
'oldfieldname': u'company', "permlevel": 2
'oldfieldtype': u'Link',
'options': u'Company',
'permlevel': 1,
'reqd': 1,
'search_index': 1
}, },
# DocField
{ {
'doctype': u'DocField', "create": 0,
'fieldname': u'column_break1', "doctype": "DocPerm",
'fieldtype': u'Column Break', "write": 0,
'permlevel': 0, "cancel": 0,
'width': u'50%' "role": "Auditor",
"permlevel": 1
}, },
# DocField
{ {
'doctype': u'DocField', "create": 0,
'fieldname': u'parent_account', "doctype": "DocPerm",
'fieldtype': u'Link', "write": 0,
'label': u'Parent Account', "cancel": 0,
'oldfieldname': u'parent_account', "role": "Sales User",
'oldfieldtype': u'Link', "permlevel": 0
'options': u'Account',
'permlevel': 0,
'search_index': 1,
'trigger': u'Client'
}, },
# DocField
{ {
'colour': u'White:FFF', "create": 0,
'description': u'Setting Account Type helps in selecting this Account in transactions.', "doctype": "DocPerm",
'doctype': u'DocField', "write": 0,
'fieldname': u'account_type', "cancel": 0,
'fieldtype': u'Select', "role": "Purchase User",
'in_filter': 1, "permlevel": 0
'label': u'Account Type',
'oldfieldname': u'account_type',
'oldfieldtype': u'Select',
'options': u'\nFixed Asset Account\nBank or Cash\nExpense Account\nTax\nIncome Account\nChargeable',
'permlevel': 0,
'search_index': 0,
'trigger': u'Client'
}, },
# DocField
{ {
'colour': u'White:FFF', "create": 0,
'description': u'Rate at which this tax is applied', "doctype": "DocPerm",
'doctype': u'DocField', "write": 1,
'fieldname': u'tax_rate', "cancel": 0,
'fieldtype': u'Currency', "role": "Accounts User",
'hidden': 0, "permlevel": 0
'label': u'Rate',
'oldfieldname': u'tax_rate',
'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 0
}, },
# DocField
{ {
'colour': u'White:FFF', "create": 1,
'description': u'If the account is frozen, entries are allowed for the "Account Manager" only.', "doctype": "DocPerm",
'doctype': u'DocField', "write": 1,
'fieldname': u'freeze_account', "cancel": 1,
'fieldtype': u'Select', "role": "Accounts Manager",
'label': u'Frozen', "permlevel": 0
'oldfieldname': u'freeze_account',
'oldfieldtype': u'Select',
'options': u'No\nYes',
'permlevel': 2
}, },
# DocField
{ {
'colour': u'White:FFF', "create": 0,
'doctype': u'DocField', "doctype": "DocPerm",
'fieldname': u'credit_days', "write": 0,
'fieldtype': u'Int', "cancel": 0,
'hidden': 1, "role": "Accounts User",
'label': u'Credit Days', "permlevel": 1
'oldfieldname': u'credit_days',
'oldfieldtype': u'Int',
'permlevel': 0,
'print_hide': 1
}, },
# DocField
{ {
'doctype': u'DocField', "create": 0,
'fieldname': u'credit_limit', "doctype": "DocPerm",
'fieldtype': u'Currency', "write": 0,
'hidden': 1, "cancel": 0,
'label': u'Credit Limit', "role": "Accounts Manager",
'oldfieldname': u'credit_limit', "permlevel": 1
'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1
}, },
# DocField
{ {
'colour': u'White:FFF', "create": 0,
'description': u'If this Account represents a Customer, Supplier or Employee, set it here.', "doctype": "DocPerm",
'doctype': u'DocField', "write": 1,
'fieldname': u'master_type', "cancel": 0,
'fieldtype': u'Select', "role": "Accounts Manager",
'label': u'Master Type', "permlevel": 2
'oldfieldname': u'master_type',
'oldfieldtype': u'Select',
'options': u'\nSupplier\nCustomer\nEmployee',
'permlevel': 0
}, },
# DocField
{ {
'doctype': u'DocField', "create": 0,
'fieldname': u'master_name', "doctype": "DocPerm",
'fieldtype': u'Link', "write": 0,
'label': u'Master Name', "cancel": 0,
'oldfieldname': u'master_name', "role": "Accounts User",
'oldfieldtype': u'Link', "permlevel": 2
'permlevel': 0,
'trigger': u'Client'
} }
] ]

View File

@ -498,7 +498,7 @@ cur_frm.cscript.view_ledger_entry = function(){
cur_frm.cscript.on_submit = function(doc, cdt, cdn) { cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
if(cint(wn.boot.notification_settings.sales_invoice)) { if(cint(wn.boot.notification_settings.sales_invoice)) {
cur_frm.email_doc(wn.boot.notification_settings.sales_invoice); cur_frm.email_doc(wn.boot.notification_settings.sales_invoice_message);
} }
} }

View File

@ -1,12 +1,18 @@
<div class="layout-wrapper layout-wrapper-background"> <div class="layout-wrapper layout-wrapper-background">
<div class="appframe-area"></div> <div class="appframe-area"></div>
<div class="layout-main-section"> <div class="layout-main">
<div class="tree-area"></div> <div class="tree-area"></div>
</div> <hr>
<div class="layout-side-section"> <div class="well">
<div class="help">1. To add child nodes, explore tree and click on the node under which you want to add more nodes.<br><br> <h4>Quick Help</h4>
2. Please do NOT create accounts (ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.<br> <ol>
<li>To add child nodes, explore tree and click on the node under which you want to add more nodes.
<li>Accounting Entries can be made against leaf nodes, called <b>Ledgers</b>. Entries against <b>Groups</b> are not allowed.
<li>Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.
<li><b>To create a Bank Account:</b> Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts) and create a new Account Ledger (by clicking on Add Child) of type "Bank or Cash"
<li><b>To create a Tax Account:</b> Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties) and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.
</ol>
<p>Please setup your chart of accounts before you start Accounting Entries</p>
</div> </div>
</div> </div>
<div class="clear"></div>
</div> </div>

View File

@ -220,6 +220,6 @@ cur_frm.pformat.indent_no = function(doc, cdt, cdn){
cur_frm.cscript.on_submit = function(doc, cdt, cdn) { cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
if(cint(wn.boot.notification_settings.purchase_order)) { if(cint(wn.boot.notification_settings.purchase_order)) {
cur_frm.email_doc(wn.boot.notification_settings.purchase_order); cur_frm.email_doc(wn.boot.notification_settings.purchase_order_message);
} }
} }

View File

@ -2,17 +2,19 @@
{ {
"owner": "Administrator", "owner": "Administrator",
"docstatus": 0, "docstatus": 0,
"creation": "2012-11-02 17:17:04", "creation": "2012-12-03 10:31:02",
"modified_by": "Administrator", "modified_by": "Administrator",
"modified": "2012-11-30 10:53:32" "modified": "2012-12-03 11:25:12"
}, },
{ {
"autoname": "naming_series:", "autoname": "naming_series:",
"name": "__common__", "description": "Supplier of Goods or Services.",
"allow_rename": 1,
"search_fields": "supplier_name,supplier_type", "search_fields": "supplier_name,supplier_type",
"module": "Buying", "module": "Buying",
"doctype": "DocType", "doctype": "DocType",
"document_type": "Master" "document_type": "Master",
"name": "__common__"
}, },
{ {
"name": "__common__", "name": "__common__",
@ -243,6 +245,26 @@
"fieldtype": "Small Text", "fieldtype": "Small Text",
"permlevel": 1 "permlevel": 1
}, },
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"role": "Purchase Manager",
"cancel": 0,
"permlevel": 1
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"role": "Purchase Manager",
"cancel": 0,
"permlevel": 0
},
{ {
"doctype": "DocPerm", "doctype": "DocPerm",
"role": "Purchase Master Manager", "role": "Purchase Master Manager",
@ -257,25 +279,5 @@
"role": "Purchase Master Manager", "role": "Purchase Master Manager",
"cancel": 1, "cancel": 1,
"permlevel": 0 "permlevel": 0
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"role": "Purchase Manager",
"cancel": 0,
"permlevel": 1
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"role": "Purchase Manager",
"cancel": 0,
"permlevel": 0
} }
] ]

View File

@ -247,7 +247,7 @@ cur_frm.cscript.update_voucher = function(doc){
cur_frm.cscript.on_submit = function(doc, cdt, cdn) { cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
if(cint(wn.boot.notification_settings.expense_claim)) { if(cint(wn.boot.notification_settings.expense_claim)) {
cur_frm.email_doc(wn.boot.notification_settings.expense_claim); cur_frm.email_doc(wn.boot.notification_settings.expense_claim_message);
} }
} }

View File

@ -2,19 +2,21 @@
{ {
"owner": "Administrator", "owner": "Administrator",
"docstatus": 0, "docstatus": 0,
"creation": "2012-11-02 17:16:46", "creation": "2012-12-03 10:31:05",
"modified_by": "Administrator", "modified_by": "Administrator",
"modified": "2012-11-30 10:54:38" "modified": "2012-12-03 11:25:29"
}, },
{ {
"autoname": "naming_series:", "description": "Buyer of Goods and Services.",
"name": "__common__",
"default_print_format": "Standard",
"allow_print": 0, "allow_print": 0,
"search_fields": "customer_name,customer_group,country,territory", "search_fields": "customer_name,customer_group,country,territory",
"module": "Selling", "module": "Selling",
"doctype": "DocType", "document_type": "Master",
"document_type": "Master" "autoname": "naming_series:",
"name": "__common__",
"default_print_format": "Standard",
"allow_rename": 1,
"doctype": "DocType"
}, },
{ {
"name": "__common__", "name": "__common__",
@ -364,44 +366,54 @@
"fieldtype": "Small Text", "fieldtype": "Small Text",
"permlevel": 1 "permlevel": 1
}, },
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"cancel": 0,
"role": "Sales Manager",
"permlevel": 1
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"cancel": 0,
"role": "Sales Manager",
"permlevel": 0
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"cancel": 0,
"role": "Sales User",
"permlevel": 1
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"cancel": 0,
"role": "Sales User",
"permlevel": 0
},
{ {
"amend": 0, "amend": 0,
"create": 1, "create": 1,
"doctype": "DocPerm", "doctype": "DocPerm",
"submit": 0, "submit": 0,
"write": 1, "write": 1,
"role": "Sales Master Manager",
"cancel": 1, "cancel": 1,
"permlevel": 0
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"role": "Sales Master Manager", "role": "Sales Master Manager",
"cancel": 0,
"permlevel": 1
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"role": "Sales Manager",
"cancel": 0,
"permlevel": 1
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"role": "Sales Manager",
"cancel": 0,
"permlevel": 0 "permlevel": 0
}, },
{ {
@ -410,18 +422,18 @@
"doctype": "DocPerm", "doctype": "DocPerm",
"submit": 0, "submit": 0,
"write": 0, "write": 0,
"role": "Sales User",
"cancel": 0, "cancel": 0,
"role": "Sales Master Manager",
"permlevel": 1 "permlevel": 1
}, },
{ {
"amend": 0, "amend": 0,
"create": 0, "create": 1,
"doctype": "DocPerm", "doctype": "DocPerm",
"submit": 0, "submit": 0,
"write": 0, "write": 1,
"role": "Sales User",
"cancel": 0, "cancel": 0,
"role": "Purchase User",
"permlevel": 0 "permlevel": 0
}, },
{ {

View File

@ -369,6 +369,6 @@ cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
cur_frm.cscript.on_submit = function(doc, cdt, cdn) { cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
if(cint(wn.boot.notification_settings.sales_order)) { if(cint(wn.boot.notification_settings.sales_order)) {
cur_frm.email_doc(wn.boot.notification_settings.sales_order); cur_frm.email_doc(wn.boot.notification_settings.sales_order_message);
} }
} }

View File

@ -1,377 +1,307 @@
# DocType, Company
[ [
# These values are common in all dictionaries
{ {
'creation': '2012-05-15 12:15:00', "owner": "Administrator",
'docstatus': 0, "docstatus": 0,
'modified': '2012-08-10 12:15:45', "creation": "2012-08-10 13:00:45",
'modified_by': u'Administrator', "modified_by": "Administrator",
'owner': u'Administrator' "modified": "2012-12-03 11:26:05"
}, },
# These values are common for all DocType
{ {
'_last_update': u'1323855292', "autoname": "field:company_name",
'allow_trash': 1, "description": "Legal Entity / Subsidiary with a separate Chart of Accounts belonging to the Organization.",
'autoname': u'field:company_name', "allow_rename": 1,
'colour': u'White:FFF', "doctype": "DocType",
'doctype': 'DocType', "module": "Setup",
'document_type': u'Master', "document_type": "Master",
'module': u'Setup', "name": "__common__"
'name': '__common__',
'section_style': u'Tabbed',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 1
}, },
# These values are common for all DocField
{ {
'doctype': u'DocField', "name": "__common__",
'name': '__common__', "parent": "Company",
'parent': u'Company', "doctype": "DocField",
'parentfield': u'fields', "parenttype": "DocType",
'parenttype': u'DocType' "parentfield": "fields"
}, },
# These values are common for all DocPerm
{ {
'doctype': u'DocPerm', "name": "__common__",
'name': '__common__', "parent": "Company",
'parent': u'Company', "read": 1,
'parentfield': u'permissions', "doctype": "DocPerm",
'parenttype': u'DocType', "parenttype": "DocType",
'read': 1 "parentfield": "permissions"
}, },
# DocType, Company
{ {
'doctype': 'DocType', "name": "Company",
'name': u'Company' "doctype": "DocType"
}, },
# DocPerm
{ {
'amend': 0, "oldfieldtype": "Section Break",
'cancel': 1, "colour": "White:FFF",
'create': 1, "doctype": "DocField",
'doctype': u'DocPerm', "label": "Company Details",
'permlevel': 0, "fieldname": "details",
'role': u'System Manager', "fieldtype": "Section Break",
'submit': 0, "permlevel": 0
'write': 1
}, },
# DocPerm
{ {
'amend': 0, "no_copy": 0,
'cancel': 1, "oldfieldtype": "Data",
'create': 1, "colour": "White:FFF",
'doctype': u'DocPerm', "doctype": "DocField",
'permlevel': 0, "label": "Company",
'role': u'System Manager', "oldfieldname": "company_name",
'submit': 0, "fieldname": "company_name",
'write': 1 "fieldtype": "Data",
"reqd": 1,
"permlevel": 0
}, },
# DocPerm
{ {
'cancel': 0, "doctype": "DocField",
'doctype': u'DocPerm', "fieldname": "cb0",
'permlevel': 1, "fieldtype": "Column Break",
'role': u'All' "permlevel": 0
}, },
# DocField
{ {
'colour': u'White:FFF', "description": "Please Enter Abbreviation or Short Name properly as it will be added as Suffix to all Account Heads.",
'doctype': u'DocField', "no_copy": 0,
'fieldname': u'details', "oldfieldtype": "Data",
'fieldtype': u'Section Break', "colour": "White:FFF",
'label': u'Company Details', "doctype": "DocField",
'oldfieldtype': u'Section Break', "label": "Abbr",
'permlevel': 0 "oldfieldname": "abbr",
"fieldname": "abbr",
"fieldtype": "Data",
"reqd": 1,
"permlevel": 0
}, },
# DocField
{ {
'colour': u'White:FFF', "oldfieldtype": "Section Break",
'doctype': u'DocField', "doctype": "DocField",
'fieldname': u'company_name', "label": "Default Settings",
'fieldtype': u'Data', "fieldname": "default_settings",
'label': u'Company', "fieldtype": "Section Break",
'no_copy': 0, "permlevel": 0
'oldfieldname': u'company_name',
'oldfieldtype': u'Data',
'permlevel': 0,
'reqd': 1
}, },
# DocField
{ {
'doctype': u'DocField', "doctype": "DocField",
'fieldname': u'cb0', "label": "Default Currency",
'fieldtype': u'Column Break', "options": "link:Currency",
'permlevel': 0 "fieldname": "default_currency",
"fieldtype": "Select",
"reqd": 1,
"permlevel": 0
}, },
# DocField
{ {
'colour': u'White:FFF', "no_copy": 1,
'description': u'Please Enter Abbreviation or Short Name properly as it will be added as Suffix to all Account Heads.', "oldfieldtype": "Link",
'doctype': u'DocField', "doctype": "DocField",
'fieldname': u'abbr', "label": "Default Bank Account",
'fieldtype': u'Data', "oldfieldname": "default_bank_account",
'label': u'Abbr', "trigger": "Client",
'no_copy': 0, "fieldname": "default_bank_account",
'oldfieldname': u'abbr', "fieldtype": "Link",
'oldfieldtype': u'Data', "depends_on": "eval:!doc.__islocal",
'permlevel': 0, "options": "Account",
'reqd': 1 "permlevel": 0
}, },
# DocField
{ {
'doctype': u'DocField', "no_copy": 1,
'fieldname': u'default_settings', "oldfieldtype": "Link",
'fieldtype': u'Section Break', "doctype": "DocField",
'label': u'Default Settings', "label": "Receivables Group",
'oldfieldtype': u'Section Break', "oldfieldname": "receivables_group",
'permlevel': 0 "trigger": "Client",
"fieldname": "receivables_group",
"fieldtype": "Link",
"depends_on": "eval:!doc.__islocal",
"options": "Account",
"permlevel": 0
}, },
# DocField
{ {
'doctype': u'DocField', "no_copy": 1,
'fieldname': u'default_currency', "oldfieldtype": "Link",
'fieldtype': u'Select', "doctype": "DocField",
'label': u'Default Currency', "label": "Payables Group",
'options': u'link:Currency', "oldfieldname": "payables_group",
'permlevel': 0, "trigger": "Client",
'reqd': 1 "fieldname": "payables_group",
"fieldtype": "Link",
"depends_on": "eval:!doc.__islocal",
"options": "Account",
"permlevel": 0
}, },
# DocField
{ {
'depends_on': u'eval:!doc.__islocal', "oldfieldtype": "Column Break",
'doctype': u'DocField', "doctype": "DocField",
'fieldname': u'default_bank_account', "width": "50%",
'fieldtype': u'Link', "fieldname": "column_break0",
'label': u'Default Bank Account', "fieldtype": "Column Break",
'no_copy': 1, "permlevel": 0
'oldfieldname': u'default_bank_account',
'oldfieldtype': u'Link',
'options': u'Account',
'permlevel': 0,
'trigger': u'Client'
}, },
# DocField
{ {
'depends_on': u'eval:!doc.__islocal', "oldfieldtype": "Int",
'doctype': u'DocField', "doctype": "DocField",
'fieldname': u'receivables_group', "label": "Credit Days",
'fieldtype': u'Link', "oldfieldname": "credit_days",
'label': u'Receivables Group', "fieldname": "credit_days",
'no_copy': 1, "fieldtype": "Int",
'oldfieldname': u'receivables_group', "depends_on": "eval:!doc.__islocal",
'oldfieldtype': u'Link', "permlevel": 0
'options': u'Account',
'permlevel': 0,
'trigger': u'Client'
}, },
# DocField
{ {
'depends_on': u'eval:!doc.__islocal', "oldfieldtype": "Currency",
'doctype': u'DocField', "doctype": "DocField",
'fieldname': u'payables_group', "label": "Credit Limit",
'fieldtype': u'Link', "oldfieldname": "credit_limit",
'label': u'Payables Group', "fieldname": "credit_limit",
'no_copy': 1, "fieldtype": "Currency",
'oldfieldname': u'payables_group', "depends_on": "eval:!doc.__islocal",
'oldfieldtype': u'Link', "permlevel": 0
'options': u'Account',
'permlevel': 0,
'trigger': u'Client'
}, },
# DocField
{ {
'doctype': u'DocField', "oldfieldtype": "Select",
'fieldname': u'column_break0', "colour": "White:FFF",
'fieldtype': u'Column Break', "doctype": "DocField",
'oldfieldtype': u'Column Break', "label": "If Yearly Budget Exceeded",
'permlevel': 0, "oldfieldname": "yearly_bgt_flag",
'width': u'50%' "options": "\nWarn\nIgnore\nStop",
"fieldname": "yearly_bgt_flag",
"fieldtype": "Select",
"depends_on": "eval:!doc.__islocal",
"permlevel": 0
}, },
# DocField
{ {
'depends_on': u'eval:!doc.__islocal', "oldfieldtype": "Select",
'doctype': u'DocField', "doctype": "DocField",
'fieldname': u'credit_days', "label": "If Monthly Budget Exceeded",
'fieldtype': u'Int', "oldfieldname": "monthly_bgt_flag",
'label': u'Credit Days', "options": "\nWarn\nIgnore\nStop",
'oldfieldname': u'credit_days', "fieldname": "monthly_bgt_flag",
'oldfieldtype': u'Int', "fieldtype": "Select",
'permlevel': 0 "depends_on": "eval:!doc.__islocal",
"permlevel": 0
}, },
# DocField
{ {
'depends_on': u'eval:!doc.__islocal', "description": "For reference only.",
'doctype': u'DocField', "colour": "White:FFF",
'fieldname': u'credit_limit', "doctype": "DocField",
'fieldtype': u'Currency', "label": "Company Info",
'label': u'Credit Limit', "fieldname": "company_info",
'oldfieldname': u'credit_limit', "fieldtype": "Section Break",
'oldfieldtype': u'Currency', "permlevel": 0
'permlevel': 0
}, },
# DocField
{ {
'colour': u'White:FFF', "oldfieldtype": "Small Text",
'depends_on': u'eval:!doc.__islocal', "doctype": "DocField",
'doctype': u'DocField', "label": "Address",
'fieldname': u'yearly_bgt_flag', "oldfieldname": "address",
'fieldtype': u'Select', "fieldname": "address",
'label': u'If Yearly Budget Exceeded', "fieldtype": "Small Text",
'oldfieldname': u'yearly_bgt_flag', "permlevel": 0
'oldfieldtype': u'Select',
'options': u'\nWarn\nIgnore\nStop',
'permlevel': 0
}, },
# DocField
{ {
'depends_on': u'eval:!doc.__islocal', "oldfieldtype": "Column Break",
'doctype': u'DocField', "doctype": "DocField",
'fieldname': u'monthly_bgt_flag', "width": "50%",
'fieldtype': u'Select', "fieldname": "column_break1",
'label': u'If Monthly Budget Exceeded', "fieldtype": "Column Break",
'oldfieldname': u'monthly_bgt_flag', "permlevel": 0
'oldfieldtype': u'Select',
'options': u'\nWarn\nIgnore\nStop',
'permlevel': 0
}, },
# DocField
{ {
'colour': u'White:FFF', "oldfieldtype": "Data",
'description': u'For reference only.', "doctype": "DocField",
'doctype': u'DocField', "label": "Phone No",
'fieldname': u'company_info', "oldfieldname": "phone_no",
'fieldtype': u'Section Break', "options": "Phone",
'label': u'Company Info', "fieldname": "phone_no",
'permlevel': 0 "fieldtype": "Data",
"permlevel": 0
}, },
# DocField
{ {
'doctype': u'DocField', "oldfieldtype": "Data",
'fieldname': u'address', "doctype": "DocField",
'fieldtype': u'Small Text', "label": "Fax",
'label': u'Address', "oldfieldname": "fax",
'oldfieldname': u'address', "options": "Phone",
'oldfieldtype': u'Small Text', "fieldname": "fax",
'permlevel': 0 "fieldtype": "Data",
"permlevel": 0
}, },
# DocField
{ {
'doctype': u'DocField', "oldfieldtype": "Data",
'fieldname': u'column_break1', "doctype": "DocField",
'fieldtype': u'Column Break', "label": "Email",
'oldfieldtype': u'Column Break', "oldfieldname": "email",
'permlevel': 0, "options": "Email",
'width': u'50%' "fieldname": "email",
"fieldtype": "Data",
"permlevel": 0
}, },
# DocField
{ {
'doctype': u'DocField', "oldfieldtype": "Data",
'fieldname': u'phone_no', "doctype": "DocField",
'fieldtype': u'Data', "label": "Website",
'label': u'Phone No', "oldfieldname": "website",
'oldfieldname': u'phone_no', "fieldname": "website",
'oldfieldtype': u'Data', "fieldtype": "Data",
'options': u'Phone', "permlevel": 0
'permlevel': 0
}, },
# DocField
{ {
'doctype': u'DocField', "description": "Company registration numbers for your reference. Example: VAT Registration Numbers etc.",
'fieldname': u'fax', "oldfieldtype": "Section Break",
'fieldtype': u'Data', "colour": "White:FFF",
'label': u'Fax', "doctype": "DocField",
'oldfieldname': u'fax', "label": "Registration Info",
'oldfieldtype': u'Data', "width": "50%",
'options': u'Phone', "fieldname": "registration_info",
'permlevel': 0 "fieldtype": "Section Break",
"permlevel": 0
}, },
# DocField
{ {
'doctype': u'DocField', "description": "Company registration numbers for your reference. Tax numbers etc.",
'fieldname': u'email', "oldfieldtype": "Code",
'fieldtype': u'Data', "colour": "White:FFF",
'label': u'Email', "doctype": "DocField",
'oldfieldname': u'email', "label": "Registration Details",
'oldfieldtype': u'Data', "oldfieldname": "registration_details",
'options': u'Email', "fieldname": "registration_details",
'permlevel': 0 "fieldtype": "Code",
"permlevel": 0
}, },
# DocField
{ {
'doctype': u'DocField', "no_copy": 1,
'fieldname': u'website', "oldfieldtype": "Small Text",
'fieldtype': u'Data', "doctype": "DocField",
'label': u'Website', "label": "Trash Reason",
'oldfieldname': u'website', "oldfieldname": "trash_reason",
'oldfieldtype': u'Data', "fieldname": "trash_reason",
'permlevel': 0 "fieldtype": "Small Text",
"permlevel": 1
}, },
# DocField
{ {
'colour': u'White:FFF', "amend": 0,
'description': u'Company registration numbers for your reference. Example: VAT Registration Numbers etc.', "create": 1,
'doctype': u'DocField', "doctype": "DocPerm",
'fieldname': u'registration_info', "submit": 0,
'fieldtype': u'Section Break', "write": 1,
'label': u'Registration Info', "role": "System Manager",
'oldfieldtype': u'Section Break', "cancel": 1,
'permlevel': 0, "permlevel": 0
'width': u'50%'
}, },
# DocField
{ {
'colour': u'White:FFF', "amend": 0,
'description': u'Company registration numbers for your reference. Tax numbers etc.', "create": 1,
'doctype': u'DocField', "doctype": "DocPerm",
'fieldname': u'registration_details', "submit": 0,
'fieldtype': u'Code', "write": 1,
'label': u'Registration Details', "role": "System Manager",
'oldfieldname': u'registration_details', "cancel": 1,
'oldfieldtype': u'Code', "permlevel": 0
'permlevel': 0
}, },
# DocField
{ {
'doctype': u'DocField', "doctype": "DocPerm",
'fieldname': u'trash_reason', "role": "All",
'fieldtype': u'Small Text', "cancel": 0,
'label': u'Trash Reason', "permlevel": 1
'no_copy': 1,
'oldfieldname': u'trash_reason',
'oldfieldtype': u'Small Text',
'permlevel': 1
} }
] ]

View File

@ -327,6 +327,6 @@ cur_frm.pformat.sales_order_no= function(doc, cdt, cdn){
cur_frm.cscript.on_submit = function(doc, cdt, cdn) { cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
if(cint(wn.boot.notification_settings.delivery_note)) { if(cint(wn.boot.notification_settings.delivery_note)) {
cur_frm.email_doc(wn.boot.notification_settings.delivery_note); cur_frm.email_doc(wn.boot.notification_settings.delivery_note_message);
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -299,6 +299,6 @@ cur_frm.pformat.purchase_order_no = function(doc, cdt, cdn){
cur_frm.cscript.on_submit = function(doc, cdt, cdn) { cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
if(cint(wn.boot.notification_settings.purchase_receipt)) { if(cint(wn.boot.notification_settings.purchase_receipt)) {
cur_frm.email_doc(wn.boot.notification_settings.purchase_receipt); cur_frm.email_doc(wn.boot.notification_settings.purchase_receipt_message);
} }
} }

View File

@ -1,314 +1,296 @@
# DocType, Warehouse
[ [
# These values are common in all dictionaries
{ {
u'creation': '2012-10-10 12:07:10', "owner": "Administrator",
u'docstatus': 0, "docstatus": 0,
u'modified': '2012-10-25 15:03:49', "creation": "2012-10-26 14:47:52",
u'modified_by': u'Administrator', "modified_by": "Administrator",
u'owner': u'Administrator' "modified": "2012-12-03 11:24:31"
}, },
# These values are common for all DocType
{ {
'_last_update': u'1319016431', "autoname": "field:warehouse_name",
'allow_trash': 1, "description": "A logical Warehouse against which stock entries are made.",
'autoname': u'field:warehouse_name', "default_print_format": "Standard",
'colour': u'White:FFF', "allow_rename": 1,
'default_print_format': u'Standard', "search_fields": "warehouse_type",
'description': u'A logical Warehouse against which stock entries are made.\n\nThere are two main Warehouse Types that are significant in ERPNext.\n\n1. **Stores:** These are where your incoming **Items** are kept before they are consumed or sold. You can have as many \u201cStores\u201d type **Warehouses** as you wish. Stores type warehouses are significant because if you set an Item for automatic re-order, ERPNext will check its quantities in all \u201cStores\u201d type **Warehouses** when deciding whether to re-order or not.\n\n2. **Asset**: **Items** marked as type \u201cFixed Asset\u201d are maintained in Asset Type **Warehouses**. This helps you separate them for the **Items** that are consumed as a part of your regular operations or \u201cCost of Goods Sold\u201d.\n', "module": "Stock",
u'doctype': u'DocType', "doctype": "DocType",
'document_type': u'Master', "document_type": "Master",
'module': u'Stock', "name": "__common__"
u'name': u'__common__',
'search_fields': u'warehouse_type',
'section_style': u'Tabbed',
'server_code_error': u' ',
'show_in_menu': 0,
'version': 1
}, },
# These values are common for all DocField
{ {
u'doctype': u'DocField', "name": "__common__",
u'name': u'__common__', "parent": "Warehouse",
'parent': u'Warehouse', "doctype": "DocField",
'parentfield': u'fields', "parenttype": "DocType",
'parenttype': u'DocType' "parentfield": "fields"
}, },
# These values are common for all DocPerm
{ {
u'doctype': u'DocPerm', "name": "__common__",
u'name': u'__common__', "parent": "Warehouse",
'parent': u'Warehouse', "read": 1,
'parentfield': u'permissions', "doctype": "DocPerm",
'parenttype': u'DocType', "parenttype": "DocType",
'read': 1 "parentfield": "permissions"
}, },
# DocType, Warehouse
{ {
u'doctype': u'DocType', "name": "Warehouse",
u'name': u'Warehouse' "doctype": "DocType"
}, },
# DocField
{ {
u'doctype': u'DocField', "oldfieldtype": "Section Break",
'fieldname': u'warehouse_detail', "doctype": "DocField",
'fieldtype': u'Section Break', "label": "Warehouse Detail",
'label': u'Warehouse Detail', "fieldname": "warehouse_detail",
'oldfieldtype': u'Section Break', "fieldtype": "Section Break",
'permlevel': 0 "permlevel": 0
}, },
# DocField
{ {
u'doctype': u'DocField', "oldfieldtype": "Data",
'fieldname': u'warehouse_name', "doctype": "DocField",
'fieldtype': u'Data', "label": "Warehouse Name",
'label': u'Warehouse Name', "oldfieldname": "warehouse_name",
'oldfieldname': u'warehouse_name', "fieldname": "warehouse_name",
'oldfieldtype': u'Data', "fieldtype": "Data",
'permlevel': 0, "reqd": 1,
'reqd': 1 "permlevel": 0
}, },
# DocField
{ {
'colour': u'White:FFF', "oldfieldtype": "Link",
u'doctype': u'DocField', "colour": "White:FFF",
'fieldname': u'warehouse_type', "doctype": "DocField",
'fieldtype': u'Link', "label": "Warehouse Type",
'label': u'Warehouse Type', "oldfieldname": "warehouse_type",
'oldfieldname': u'warehouse_type', "options": "Warehouse Type",
'oldfieldtype': u'Link', "fieldname": "warehouse_type",
'options': u'Warehouse Type', "fieldtype": "Link",
'permlevel': 0, "reqd": 1,
'reqd': 1 "permlevel": 0
}, },
# DocField
{ {
'colour': u'White:FFF', "oldfieldtype": "Link",
u'doctype': u'DocField', "colour": "White:FFF",
'fieldname': u'company', "doctype": "DocField",
'fieldtype': u'Link', "label": "Company",
'in_filter': 1, "oldfieldname": "company",
'label': u'Company', "options": "Company",
'oldfieldname': u'company', "fieldname": "company",
'oldfieldtype': u'Link', "fieldtype": "Link",
'options': u'Company', "search_index": 1,
'permlevel': 0, "permlevel": 0,
'search_index': 1 "in_filter": 1
}, },
# DocField
{ {
'colour': u'White:FFF', "description": "For Reference Only.",
'description': u'For Reference Only.', "colour": "White:FFF",
u'doctype': u'DocField', "doctype": "DocField",
'fieldname': u'warehouse_contact_info', "label": "Warehouse Contact Info",
'fieldtype': u'Section Break', "fieldname": "warehouse_contact_info",
'label': u'Warehouse Contact Info', "fieldtype": "Section Break",
'permlevel': 0 "permlevel": 0
}, },
# DocField
{ {
u'doctype': u'DocField', "print_hide": 0,
'fieldname': u'email_id', "oldfieldtype": "Data",
'fieldtype': u'Data', "doctype": "DocField",
'hidden': 1, "label": "Email Id",
'label': u'Email Id', "oldfieldname": "email_id",
'oldfieldname': u'email_id', "fieldname": "email_id",
'oldfieldtype': u'Data', "fieldtype": "Data",
'permlevel': 0, "hidden": 1,
'print_hide': 0 "permlevel": 0
}, },
# DocField
{ {
u'doctype': u'DocField', "oldfieldtype": "Int",
'fieldname': u'phone_no', "doctype": "DocField",
'fieldtype': u'Data', "label": "Phone No",
'label': u'Phone No', "oldfieldname": "phone_no",
'oldfieldname': u'phone_no', "options": "Phone",
'oldfieldtype': u'Int', "fieldname": "phone_no",
'options': u'Phone', "fieldtype": "Data",
'permlevel': 0 "permlevel": 0
}, },
# DocField
{ {
u'doctype': u'DocField', "oldfieldtype": "Int",
'fieldname': u'mobile_no', "doctype": "DocField",
'fieldtype': u'Data', "label": "Mobile No",
'label': u'Mobile No', "oldfieldname": "mobile_no",
'oldfieldname': u'mobile_no', "options": "Phone",
'oldfieldtype': u'Int', "fieldname": "mobile_no",
'options': u'Phone', "fieldtype": "Data",
'permlevel': 0 "permlevel": 0
}, },
# DocField
{ {
u'doctype': u'DocField', "oldfieldtype": "Column Break",
'fieldname': u'column_break0', "doctype": "DocField",
'fieldtype': u'Column Break', "fieldname": "column_break0",
'oldfieldtype': u'Column Break', "fieldtype": "Column Break",
'permlevel': 0 "permlevel": 0
}, },
# DocField
{ {
u'doctype': u'DocField', "oldfieldtype": "Data",
'fieldname': u'address_line_1', "doctype": "DocField",
'fieldtype': u'Data', "label": "Address Line 1",
'label': u'Address Line 1', "oldfieldname": "address_line_1",
'oldfieldname': u'address_line_1', "fieldname": "address_line_1",
'oldfieldtype': u'Data', "fieldtype": "Data",
'permlevel': 0 "permlevel": 0
}, },
# DocField
{ {
u'doctype': u'DocField', "oldfieldtype": "Data",
'fieldname': u'address_line_2', "doctype": "DocField",
'fieldtype': u'Data', "label": "Address Line 2",
'label': u'Address Line 2', "oldfieldname": "address_line_2",
'oldfieldname': u'address_line_2', "fieldname": "address_line_2",
'oldfieldtype': u'Data', "fieldtype": "Data",
'permlevel': 0 "permlevel": 0
}, },
# DocField
{ {
u'doctype': u'DocField', "oldfieldtype": "Data",
'fieldname': u'city', "doctype": "DocField",
'fieldtype': u'Data', "label": "City",
'label': u'City', "oldfieldname": "city",
'oldfieldname': u'city', "fieldname": "city",
'oldfieldtype': u'Data', "fieldtype": "Data",
'permlevel': 0, "reqd": 0,
'reqd': 0 "permlevel": 0
}, },
# DocField
{ {
'colour': u'White:FFF', "oldfieldtype": "Select",
u'doctype': u'DocField', "colour": "White:FFF",
'fieldname': u'state', "doctype": "DocField",
'fieldtype': u'Data', "label": "State",
'label': u'State', "oldfieldname": "state",
'oldfieldname': u'state', "options": "Suggest",
'oldfieldtype': u'Select', "fieldname": "state",
'options': u'Suggest', "fieldtype": "Data",
'permlevel': 0 "permlevel": 0
}, },
# DocField
{ {
u'doctype': u'DocField', "oldfieldtype": "Int",
'fieldname': u'pin', "doctype": "DocField",
'fieldtype': u'Int', "label": "PIN",
'label': u'PIN', "oldfieldname": "pin",
'oldfieldname': u'pin', "fieldname": "pin",
'oldfieldtype': u'Int', "fieldtype": "Int",
'permlevel': 0 "permlevel": 0
}, },
# DocField
{ {
'colour': u'White:FFF', "description": "This feature is for merging duplicate warehouses. It will replace all the links of this warehouse by \"Merge With\" warehouse. After merging you can delete this warehouse, as stock level for this warehouse will be zero.",
'description': u'This feature is for merging duplicate warehouses. It will replace all the links of this warehouse by "Merge With" warehouse. After merging you can delete this warehouse, as stock level for this warehouse will be zero.', "colour": "White:FFF",
u'doctype': u'DocField', "doctype": "DocField",
'fieldname': u'merge_warehouses_section', "label": "Merge Warehouses",
'fieldtype': u'Section Break', "fieldname": "merge_warehouses_section",
'label': u'Merge Warehouses', "fieldtype": "Section Break",
'permlevel': 2 "permlevel": 2
}, },
# DocField
{ {
u'doctype': u'DocField', "doctype": "DocField",
'fieldname': u'merge_with', "label": "Merge With",
'fieldtype': u'Link', "options": "Warehouse",
'label': u'Merge With', "fieldname": "merge_with",
'options': u'Warehouse', "fieldtype": "Link",
'permlevel': 2 "permlevel": 2
}, },
# DocField
{ {
u'doctype': u'DocField', "doctype": "DocField",
'fieldname': u'merge', "label": "Merge",
'fieldtype': u'Button', "fieldname": "merge",
'label': u'Merge', "fieldtype": "Button",
'permlevel': 2 "permlevel": 2
}, },
# DocPerm
{ {
'amend': 0, "amend": 0,
'cancel': 1, "create": 0,
'create': 1, "doctype": "DocPerm",
u'doctype': u'DocPerm', "submit": 0,
'permlevel': 0, "write": 0,
'role': u'Material Master Manager', "cancel": 0,
'submit': 0, "role": "Material User",
'write': 1 "permlevel": 2
}, },
# DocPerm
{ {
'cancel': 1, "amend": 0,
'create': 1, "create": 0,
u'doctype': u'DocPerm', "doctype": "DocPerm",
'permlevel': 0, "submit": 0,
'role': u'System Manager', "write": 0,
'write': 1 "cancel": 0,
"role": "Material User",
"permlevel": 0
}, },
# DocPerm
{ {
'amend': 0, "amend": 0,
'cancel': 0, "create": 0,
'create': 0, "doctype": "DocPerm",
u'doctype': u'DocPerm', "submit": 0,
'permlevel': 0, "write": 0,
'role': u'Material Manager', "cancel": 0,
'submit': 0, "role": "Material User",
'write': 0 "permlevel": 1
}, },
# DocPerm
{ {
'amend': 0, "amend": 0,
'cancel': 0, "create": 0,
'create': 0, "doctype": "DocPerm",
u'doctype': u'DocPerm', "submit": 0,
'permlevel': 0, "write": 0,
'role': u'Material User', "cancel": 0,
'submit': 0, "role": "Material Manager",
'write': 0 "permlevel": 2
}, },
# DocPerm
{ {
u'doctype': u'DocPerm', "amend": 0,
'permlevel': 1, "create": 0,
'role': u'All' "doctype": "DocPerm",
"submit": 0,
"write": 0,
"cancel": 0,
"role": "Material Manager",
"permlevel": 0
}, },
# DocPerm
{ {
'create': 0, "amend": 0,
u'doctype': u'DocPerm', "create": 0,
'permlevel': 2, "doctype": "DocPerm",
'role': u'System Manager', "submit": 0,
'write': 1 "write": 0,
"cancel": 0,
"role": "Material Manager",
"permlevel": 1
},
{
"doctype": "DocPerm",
"role": "All",
"permlevel": 1
},
{
"amend": 0,
"create": 1,
"doctype": "DocPerm",
"submit": 0,
"write": 1,
"cancel": 1,
"role": "Material Master Manager",
"permlevel": 0
},
{
"doctype": "DocPerm",
"role": "Material Master Manager",
"permlevel": 1
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"role": "System Manager",
"cancel": 1,
"permlevel": 0
},
{
"create": 0,
"doctype": "DocPerm",
"write": 1,
"role": "System Manager",
"permlevel": 2
} }
] ]

View File

@ -24,13 +24,13 @@ def get_list(arg=None):
webnotes.form_dict['limit_page_length'] = int(webnotes.form_dict['limit_page_length']) webnotes.form_dict['limit_page_length'] = int(webnotes.form_dict['limit_page_length'])
webnotes.form_dict['user'] = webnotes.session['user'] webnotes.form_dict['user'] = webnotes.session['user']
if webnotes.form_dict['contact'] == webnotes.session['user']:
# set all messages as read # set all messages as read
webnotes.conn.sql("""UPDATE `tabComment` webnotes.conn.sql("""UPDATE `tabComment`
set docstatus = 1 where comment_doctype in ('My Company', 'Message') set docstatus = 1 where comment_doctype in ('My Company', 'Message')
and comment_docname = %s and comment_docname = %s
""", webnotes.user.name) """, webnotes.user.name)
if webnotes.form_dict['contact'] == webnotes.session['user']:
# return messages # return messages
return webnotes.conn.sql("""select * from `tabComment` return webnotes.conn.sql("""select * from `tabComment`
where (owner=%(contact)s where (owner=%(contact)s