commit
0527a393aa
@ -37,7 +37,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
|
||||
// read-only for root accounts
|
||||
if(!doc.parent_account) {
|
||||
cur_frm.perm = [[1,0,0], [1,0,0]];
|
||||
cur_frm.set_read_only();
|
||||
cur_frm.set_intro(wn._("This is a root account and cannot be edited."));
|
||||
} else {
|
||||
// credit days and type if customer or supplier
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-30 12:49:46",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-09-24 11:22:18",
|
||||
"modified": "2013-12-20 19:23:54",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -138,6 +138,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "parent_account",
|
||||
"fieldtype": "Link",
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Parent Account",
|
||||
"oldfieldname": "parent_account",
|
||||
"oldfieldtype": "Link",
|
||||
@ -154,7 +155,6 @@
|
||||
"oldfieldname": "account_type",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nFixed Asset Account\nBank or Cash\nExpense Account\nTax\nIncome Account\nChargeable\nWarehouse",
|
||||
"permlevel": 0,
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
@ -257,7 +257,9 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"role": "Accounts User",
|
||||
"write": 1
|
||||
},
|
||||
@ -265,7 +267,9 @@
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"role": "Auditor",
|
||||
"write": 0
|
||||
},
|
||||
@ -273,7 +277,9 @@
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"role": "Sales User",
|
||||
"write": 0
|
||||
},
|
||||
@ -281,7 +287,9 @@
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"role": "Purchase User",
|
||||
"write": 0
|
||||
},
|
||||
@ -297,7 +305,12 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"export": 0,
|
||||
"import": 0,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"restrict": 1,
|
||||
"role": "Accounts Manager",
|
||||
"write": 1
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-06-24 15:49:57",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-09-24 11:52:58",
|
||||
"modified": "2013-12-20 19:22:52",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -25,11 +25,13 @@
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Accounts Settings",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"role": "Accounts Manager",
|
||||
"write": 1
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:37",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-03 14:11:31",
|
||||
"modified": "2013-12-20 19:22:55",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-03-07 11:55:04",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-08-22 17:27:59",
|
||||
"modified": "2013-12-20 19:22:59",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:05",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-22 15:30:37",
|
||||
"modified": "2013-12-20 19:23:58",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -82,7 +82,9 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:38",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:06",
|
||||
"modified": "2013-12-20 19:22:59",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-03-07 11:55:06",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-02 14:05:25",
|
||||
"modified": "2013-12-20 19:23:58",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -157,6 +157,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Link",
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"options": "C-Form",
|
||||
@ -166,14 +167,18 @@
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"role": "Accounts User",
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"role": "Accounts Manager",
|
||||
"write": 1
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:38",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-02 16:58:31",
|
||||
"modified": "2013-12-20 19:23:00",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,12 +2,13 @@
|
||||
{
|
||||
"creation": "2013-01-23 19:57:17",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-22 15:23:10",
|
||||
"modified": "2013-12-20 19:24:00",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_copy": 1,
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:cost_center_name",
|
||||
"description": "Track separate Income and Expense for product verticals or divisions.",
|
||||
@ -30,11 +31,13 @@
|
||||
{
|
||||
"amend": 0,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Cost Center",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 0
|
||||
@ -74,6 +77,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "parent_cost_center",
|
||||
"fieldtype": "Link",
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Parent Cost Center",
|
||||
"oldfieldname": "parent_cost_center",
|
||||
"oldfieldtype": "Link",
|
||||
@ -171,6 +175,7 @@
|
||||
"fieldname": "old_parent",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"ignore_restrictions": 1,
|
||||
"label": "old_parent",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "old_parent",
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-01-22 16:50:25",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-25 11:40:02",
|
||||
"modified": "2013-12-20 19:24:08",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"autoname": "field:year",
|
||||
"description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.",
|
||||
"doctype": "DocType",
|
||||
@ -25,11 +26,13 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Fiscal Year",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1
|
||||
},
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:06",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-03 14:14:09",
|
||||
"modified": "2013-12-20 19:24:08",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -26,11 +26,13 @@
|
||||
{
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "GL Entry",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 0,
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-03-25 10:53:52",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-03 14:11:33",
|
||||
"modified": "2013-12-20 19:24:11",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -27,11 +27,13 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Journal Voucher",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1
|
||||
},
|
||||
@ -459,6 +461,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Link",
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "amended_from",
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:39",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-08-02 18:15:56",
|
||||
"modified": "2013-12-20 19:23:18",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2012-03-27 14:35:49",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:11",
|
||||
"modified": "2013-12-20 19:23:21",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2012-12-04 17:49:20",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-05 14:46:28",
|
||||
"modified": "2013-12-20 19:24:14",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "harshada@webnotestech.com"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:mode_of_payment",
|
||||
"doctype": "DocType",
|
||||
@ -27,11 +28,13 @@
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Mode of Payment",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Accounts Manager",
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-30 12:49:46",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-22 15:31:00",
|
||||
"modified": "2013-12-20 19:23:24",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -26,11 +26,13 @@
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Payment to Invoice Matching Tool",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 0,
|
||||
"submit": 0,
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:39",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:11",
|
||||
"modified": "2013-12-20 19:23:24",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:07",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-08-12 17:13:23",
|
||||
"modified": "2013-12-20 19:24:15",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "jai@webnotestech.com"
|
||||
},
|
||||
@ -28,11 +28,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Period Closing Voucher",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 1,
|
||||
@ -80,6 +82,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Data",
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "amended_from",
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-24 12:15:51",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-02 16:58:38",
|
||||
"modified": "2013-12-20 19:24:16",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -23,11 +23,13 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "POS Setting",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 0
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-21 16:16:39",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-22 17:15:27",
|
||||
"modified": "2013-12-20 19:24:18",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -28,11 +28,13 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Purchase Invoice",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1
|
||||
},
|
||||
@ -181,6 +183,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Link",
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "amended_from",
|
||||
@ -787,7 +790,6 @@
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"match": "supplier",
|
||||
"role": "Supplier",
|
||||
"submit": 0,
|
||||
"write": 0
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-03-08 15:36:46",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:12",
|
||||
"modified": "2013-12-20 19:23:29",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-22 12:43:10",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-02 19:41:17",
|
||||
"modified": "2013-12-20 19:23:29",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-21 16:16:04",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:18",
|
||||
"modified": "2013-12-20 19:23:38",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:08",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-22 15:22:25",
|
||||
"modified": "2013-12-20 19:24:24",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "wasim@webnotestech.com"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"autoname": "field:title",
|
||||
"description": "Standard tax template that can be applied to all Purchase Transactions. This template can contain list of tax heads and also other expense heads like \"Shipping\", \"Insurance\", \"Handling\" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n - This can be on **Net Total** (that is the sum of basic amount).\n - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on \"Previous Row Total\" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Consider Tax or Charge for: In this section you can specify if the tax / charge is only for valuation (not a part of total) or only for total (does not add value to the item) or for both.\n10. Add or Deduct: Whether you want to add or deduct the tax.",
|
||||
"doctype": "DocType",
|
||||
@ -25,11 +26,13 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Purchase Taxes and Charges Master",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 0
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-24 19:29:05",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-18 15:16:50",
|
||||
"modified": "2013-12-20 19:24:29",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -30,11 +30,13 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Sales Invoice",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1
|
||||
},
|
||||
@ -141,6 +143,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Link",
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "amended_from",
|
||||
@ -1219,7 +1222,6 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"match": "customer",
|
||||
"role": "Customer"
|
||||
}
|
||||
]
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:41",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:19",
|
||||
"modified": "2013-12-20 19:21:40",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-06-04 11:02:19",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-02 19:41:24",
|
||||
"modified": "2013-12-20 19:21:40",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-04-24 11:39:32",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-12-17 12:38:08",
|
||||
"modified": "2013-12-20 19:21:45",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:09",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-10-31 19:25:09",
|
||||
"modified": "2013-12-20 19:24:34",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"autoname": "field:title",
|
||||
"description": "Standard tax template that can be applied to all Sales Transactions. This template can contain list of tax heads and also other expense / income heads like \"Shipping\", \"Insurance\", \"Handling\" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n - This can be on **Net Total** (that is the sum of basic amount).\n - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on \"Previous Row Total\" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.",
|
||||
"doctype": "DocType",
|
||||
@ -26,11 +27,13 @@
|
||||
{
|
||||
"amend": 0,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Sales Taxes and Charges Master",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 0
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-06-25 11:48:03",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-10-31 19:24:50",
|
||||
"modified": "2013-12-20 19:24:35",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -24,11 +24,13 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Shipping Rule",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-06-25 11:54:50",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:22",
|
||||
"modified": "2013-12-20 19:21:46",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -1,29 +0,0 @@
|
||||
select.accbrowser-company-select {
|
||||
width: 200px;
|
||||
margin-top: 2px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
span.tree-node-toolbar {
|
||||
padding: 2px;
|
||||
margin-left: 15px;
|
||||
border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.tree-area a.selected {
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
span.balance-area {
|
||||
float: right;
|
||||
height: 13px;
|
||||
}
|
||||
|
||||
span.balance-bold {
|
||||
font-weight: bold;
|
||||
}
|
@ -8,7 +8,6 @@
|
||||
// see ledger
|
||||
|
||||
pscript['onload_Accounts Browser'] = function(wrapper){
|
||||
console.log($(wrapper).html());
|
||||
wn.ui.make_app_page({
|
||||
parent: wrapper,
|
||||
single_column: true
|
||||
@ -122,14 +121,14 @@ erpnext.AccountsChart = Class.extend({
|
||||
}
|
||||
|
||||
// bold
|
||||
$('.balance-bold').removeClass('balance-bold'); // deselect
|
||||
$(link).parent().find('.balance-area:first').addClass('balance-bold'); // select
|
||||
$('.bold').removeClass('bold'); // deselect
|
||||
$(link).parent().find('.balance-area:first').addClass('bold'); // select
|
||||
|
||||
},
|
||||
onrender: function(treenode) {
|
||||
if (ctype == 'Account' && treenode.data) {
|
||||
if(treenode.data.balance) {
|
||||
treenode.parent.append('<span class="balance-area">'
|
||||
treenode.parent.append('<span class="balance-area pull-right">'
|
||||
+ format_currency(treenode.data.balance, treenode.data.currency)
|
||||
+ '</span>');
|
||||
}
|
||||
@ -142,7 +141,7 @@ erpnext.AccountsChart = Class.extend({
|
||||
var data = $(link).data('node-data');
|
||||
if(!data) return;
|
||||
|
||||
link.toolbar = $('<span class="tree-node-toolbar"></span>').insertAfter(link);
|
||||
link.toolbar = $('<span class="tree-node-toolbar highlight"></span>').insertAfter(link);
|
||||
|
||||
var node_links = [];
|
||||
// edit
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-06-25 11:04:03",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-08-09 14:38:46",
|
||||
"modified": "2013-12-20 19:22:59",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -26,11 +26,13 @@
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Buying Settings",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"role": "System Manager",
|
||||
"write": 1
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2012-03-27 14:35:51",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:12",
|
||||
"modified": "2013-12-20 19:23:27",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-21 16:16:39",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-22 17:20:58",
|
||||
"modified": "2013-12-20 19:24:20",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -29,11 +29,13 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Purchase Order",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1
|
||||
},
|
||||
@ -141,6 +143,7 @@
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "amended_from",
|
||||
@ -694,7 +697,6 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"match": "supplier",
|
||||
"role": "Supplier"
|
||||
}
|
||||
]
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-24 19:29:06",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-02 19:41:27",
|
||||
"modified": "2013-12-20 19:23:32",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:42",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-25 16:33:05",
|
||||
"modified": "2013-12-20 19:23:33",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "dhanalekshmi@webnotestech.com"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:42",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-25 16:34:11",
|
||||
"modified": "2013-12-20 19:23:37",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "wasim@webnotestech.com"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-04-30 13:13:03",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-02 14:05:38",
|
||||
"modified": "2013-12-20 19:24:24",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -28,11 +28,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Quality Inspection",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Quality Manager",
|
||||
@ -206,6 +208,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Data",
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "amended_from",
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:43",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:18",
|
||||
"modified": "2013-12-20 19:23:39",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -151,8 +151,7 @@ class DocType(TransactionBase):
|
||||
acc = webnotes.conn.sql("select name from `tabAccount` where master_type = 'Supplier' \
|
||||
and master_name = %s and docstatus < 2", self.doc.name)
|
||||
if acc:
|
||||
from webnotes.model import delete_doc
|
||||
delete_doc('Account', acc[0][0])
|
||||
webnotes.delete_doc('Account', acc[0][0])
|
||||
|
||||
def on_trash(self):
|
||||
self.delete_supplier_address()
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:11",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-19 11:31:28",
|
||||
"modified": "2013-12-20 19:24:36",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "naming_series:",
|
||||
"description": "Supplier of Goods or Services.",
|
||||
@ -28,11 +29,13 @@
|
||||
{
|
||||
"amend": 0,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Supplier",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 0
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-21 16:16:45",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-12-14 17:27:47",
|
||||
"modified": "2013-12-20 19:24:36",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -29,11 +29,13 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Supplier Quotation",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1
|
||||
},
|
||||
@ -141,6 +143,7 @@
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "amended_from",
|
||||
@ -632,7 +635,6 @@
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"match": "supplier",
|
||||
"role": "Supplier",
|
||||
"submit": 0,
|
||||
"write": 0
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-22 12:43:10",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-02 19:41:29",
|
||||
"modified": "2013-12-20 19:21:50",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -50,13 +50,12 @@ class BuyingController(StockController):
|
||||
break
|
||||
|
||||
def validate_warehouse(self):
|
||||
from erpnext.stock.utils import validate_warehouse_user, validate_warehouse_company
|
||||
from erpnext.stock.utils import validate_warehouse_company
|
||||
|
||||
warehouses = list(set([d.warehouse for d in
|
||||
self.doclist.get({"doctype": self.tname}) if d.warehouse]))
|
||||
|
||||
for w in warehouses:
|
||||
validate_warehouse_user(w)
|
||||
validate_warehouse_company(w, self.doc.company)
|
||||
|
||||
def get_purchase_tax_details(self):
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2012-07-03 13:29:42",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-15 10:16:00",
|
||||
"modified": "2013-12-20 19:24:07",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -23,11 +23,13 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Feed",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "System Manager"
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:12",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-05 14:24:59",
|
||||
"modified": "2013-12-20 19:23:55",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "ashwini@webnotestech.com"
|
||||
},
|
||||
@ -26,11 +26,13 @@
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Appraisal",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"write": 1
|
||||
@ -217,6 +219,7 @@
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "amended_from",
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:44",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:03",
|
||||
"modified": "2013-12-20 19:22:53",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "ashwini@webnotestech.com"
|
||||
},
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2012-07-03 13:30:39",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-05 14:25:14",
|
||||
"modified": "2013-12-20 19:23:55",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "ashwini@webnotestech.com"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"autoname": "field:kra_title",
|
||||
"doctype": "DocType",
|
||||
"document_type": "Master",
|
||||
@ -25,11 +26,13 @@
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Appraisal Template",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "HR User",
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:44",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:03",
|
||||
"modified": "2013-12-20 19:22:54",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "ashwini@webnotestech.com"
|
||||
},
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:13",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-02 14:05:42",
|
||||
"modified": "2013-12-20 19:23:55",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "ashwini@webnotestech.com"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"autoname": "naming_series:",
|
||||
"doctype": "DocType",
|
||||
"document_type": "Master",
|
||||
@ -28,11 +29,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Attendance",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 1,
|
||||
@ -154,6 +157,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Link",
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"options": "Attendance",
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:13",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-22 15:30:08",
|
||||
"modified": "2013-12-20 19:23:57",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:branch",
|
||||
"doctype": "DocType",
|
||||
@ -27,11 +28,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Branch",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 0,
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-01-22 16:50:30",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-22 15:25:14",
|
||||
"modified": "2013-12-20 19:24:02",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:deduction_name",
|
||||
"doctype": "DocType",
|
||||
@ -27,11 +28,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Deduction Type",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "HR User",
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-02-05 11:48:26",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-22 15:25:03",
|
||||
"modified": "2013-12-20 19:24:04",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"autoname": "field:department_name",
|
||||
"doctype": "DocType",
|
||||
"document_type": "Master",
|
||||
@ -26,11 +27,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Department",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "HR User",
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:13",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-05 14:35:42",
|
||||
"modified": "2013-12-20 19:24:04",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:designation_name",
|
||||
"doctype": "DocType",
|
||||
@ -27,11 +28,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Designation",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "HR User",
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-01-24 11:03:32",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-12-09 16:24:07",
|
||||
"modified": "2013-12-20 19:24:05",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:earning_name",
|
||||
"doctype": "DocType",
|
||||
@ -27,11 +28,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Earning Type",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "HR User",
|
||||
|
@ -7,13 +7,11 @@ import webnotes
|
||||
from webnotes.utils import getdate, validate_email_add, cstr, cint
|
||||
from webnotes.model.doc import make_autoname
|
||||
from webnotes import msgprint, _
|
||||
import webnotes.permissions
|
||||
from webnotes.defaults import get_restrictions
|
||||
from webnotes.model.controller import DocListController
|
||||
|
||||
|
||||
class DocType:
|
||||
def __init__(self,doc,doclist=[]):
|
||||
self.doc = doc
|
||||
self.doclist = doclist
|
||||
|
||||
class DocType(DocListController):
|
||||
def autoname(self):
|
||||
naming_method = webnotes.conn.get_value("HR Settings", None, "emp_created_by")
|
||||
if not naming_method:
|
||||
@ -39,28 +37,36 @@ class DocType:
|
||||
|
||||
def on_update(self):
|
||||
if self.doc.user_id:
|
||||
self.restrict_user()
|
||||
self.update_user_default()
|
||||
self.update_profile()
|
||||
|
||||
self.restrict_leave_approver()
|
||||
|
||||
def restrict_user(self):
|
||||
"""restrict to this employee for user"""
|
||||
self.add_restriction_if_required("Employee", self.doc.user_id)
|
||||
|
||||
def update_user_default(self):
|
||||
webnotes.conn.set_default("employee", self.doc.name, self.doc.user_id)
|
||||
webnotes.conn.set_default("employee_name", self.doc.employee_name, self.doc.user_id)
|
||||
webnotes.conn.set_default("company", self.doc.company, self.doc.user_id)
|
||||
self.set_default_leave_approver()
|
||||
|
||||
def set_default_leave_approver(self):
|
||||
employee_leave_approvers = self.doclist.get({"parentfield": "employee_leave_approvers"})
|
||||
|
||||
if len(employee_leave_approvers):
|
||||
webnotes.conn.set_default("leave_approver", employee_leave_approvers[0].leave_approver,
|
||||
self.doc.user_id)
|
||||
|
||||
elif self.doc.reports_to:
|
||||
from webnotes.profile import Profile
|
||||
reports_to_user = webnotes.conn.get_value("Employee", self.doc.reports_to, "user_id")
|
||||
if "Leave Approver" in Profile(reports_to_user).get_roles():
|
||||
webnotes.conn.set_default("leave_approver", reports_to_user, self.doc.user_id)
|
||||
|
||||
def restrict_leave_approver(self):
|
||||
"""restrict to this employee for leave approver"""
|
||||
employee_leave_approvers = [d.leave_approver for d in self.doclist.get({"parentfield": "employee_leave_approvers"})]
|
||||
if self.doc.reports_to and self.doc.reports_to not in employee_leave_approvers:
|
||||
employee_leave_approvers.append(webnotes.conn.get_value("Employee", self.doc.reports_to, "user_id"))
|
||||
|
||||
for user in employee_leave_approvers:
|
||||
self.add_restriction_if_required("Employee", user)
|
||||
self.add_restriction_if_required("Leave Application", user)
|
||||
|
||||
def add_restriction_if_required(self, doctype, user):
|
||||
if webnotes.permissions.has_only_non_restrict_role(webnotes.get_doctype(doctype), user) \
|
||||
and self.doc.name not in get_restrictions(user).get("Employee", []):
|
||||
|
||||
webnotes.defaults.add_default("Employee", self.doc.name, user, "Restriction")
|
||||
|
||||
def update_profile(self):
|
||||
# add employee role if missing
|
||||
if not "Employee" in webnotes.conn.sql_list("""select role from tabUserRole
|
||||
|
@ -2,12 +2,13 @@
|
||||
{
|
||||
"creation": "2013-03-07 09:04:18",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-03 11:19:10",
|
||||
"modified": "2013-12-23 19:35:27",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_attach": 1,
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "naming_series:",
|
||||
"doctype": "DocType",
|
||||
@ -28,11 +29,13 @@
|
||||
{
|
||||
"amend": 0,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Employee",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 0
|
||||
@ -415,6 +418,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "reports_to",
|
||||
"fieldtype": "Link",
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Reports to",
|
||||
"oldfieldname": "reports_to",
|
||||
"oldfieldtype": "Link",
|
||||
@ -749,7 +753,6 @@
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"match": "employee",
|
||||
"role": "Employee",
|
||||
"write": 0
|
||||
},
|
||||
@ -757,7 +760,7 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"match": "company",
|
||||
"restrict": 0,
|
||||
"role": "HR User",
|
||||
"write": 1
|
||||
},
|
||||
@ -765,6 +768,7 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"restrict": 1,
|
||||
"role": "HR Manager",
|
||||
"write": 1
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:45",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:08",
|
||||
"modified": "2013-12-20 19:23:12",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:45",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:08",
|
||||
"modified": "2013-12-20 19:23:12",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:45",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:08",
|
||||
"modified": "2013-12-20 19:23:12",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-04-12 06:56:15",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-08-05 14:15:44",
|
||||
"modified": "2013-12-20 19:23:12",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:14",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-22 15:31:58",
|
||||
"modified": "2013-12-20 19:24:07",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"autoname": "field:employee_type_name",
|
||||
"doctype": "DocType",
|
||||
"document_type": "Master",
|
||||
@ -26,11 +27,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Employment Type",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 0,
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:14",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-09-25 11:36:11",
|
||||
"modified": "2013-12-20 19:24:07",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "harshada@webnotestech.com"
|
||||
},
|
||||
@ -26,11 +26,13 @@
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Expense Claim",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"write": 1
|
||||
@ -208,6 +210,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Data",
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "amended_from",
|
||||
@ -226,7 +229,6 @@
|
||||
"amend": 1,
|
||||
"cancel": 1,
|
||||
"doctype": "DocPerm",
|
||||
"match": "exp_approver:user",
|
||||
"role": "Expense Approver",
|
||||
"submit": 1
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:46",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:09",
|
||||
"modified": "2013-12-20 19:23:13",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "harshada@webnotestech.com"
|
||||
},
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2012-03-27 14:35:55",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-05 14:37:47",
|
||||
"modified": "2013-12-20 19:24:07",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "harshada@webnotestech.com"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"autoname": "field:expense_type",
|
||||
"doctype": "DocType",
|
||||
"document_type": "Master",
|
||||
@ -25,11 +26,13 @@
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Expense Claim Type",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "HR Manager",
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:14",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-26 15:24:31",
|
||||
"modified": "2013-12-20 19:24:08",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"autoname": "field:grade_name",
|
||||
"doctype": "DocType",
|
||||
"document_type": "Master",
|
||||
@ -32,11 +33,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Grade",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "HR User",
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:46",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:09",
|
||||
"modified": "2013-12-20 19:23:14",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:14",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-05 14:40:02",
|
||||
"modified": "2013-12-20 19:24:08",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Master",
|
||||
"icon": "icon-calendar",
|
||||
@ -25,11 +26,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Holiday List",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "HR Manager",
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-08-02 13:45:23",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-10-02 15:44:38",
|
||||
"modified": "2013-12-20 19:23:14",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -25,11 +25,13 @@
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "HR Settings",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"role": "System Manager",
|
||||
"write": 1
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-29 19:25:37",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-09-10 10:51:51",
|
||||
"modified": "2013-12-20 19:24:10",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -28,11 +28,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Job Applicant",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "HR User",
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-15 16:13:36",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-05 14:43:35",
|
||||
"modified": "2013-12-20 19:24:11",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -27,11 +27,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Job Opening",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "HR User",
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-20 19:10:38",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-12-12 17:41:52",
|
||||
"modified": "2013-12-20 19:24:12",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -29,11 +29,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Leave Allocation",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 1,
|
||||
@ -158,6 +160,7 @@
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "amended_from",
|
||||
|
@ -12,6 +12,7 @@ from webnotes import msgprint
|
||||
class LeaveDayBlockedError(webnotes.ValidationError): pass
|
||||
class OverlapError(webnotes.ValidationError): pass
|
||||
class InvalidLeaveApproverError(webnotes.ValidationError): pass
|
||||
class LeaveApproverIdentityError(webnotes.ValidationError): pass
|
||||
|
||||
from webnotes.model.controller import DocListController
|
||||
class DocType(DocListController):
|
||||
@ -150,7 +151,7 @@ class DocType(DocListController):
|
||||
employee = webnotes.bean("Employee", self.doc.employee)
|
||||
leave_approvers = [l.leave_approver for l in
|
||||
employee.doclist.get({"parentfield": "employee_leave_approvers"})]
|
||||
|
||||
|
||||
if len(leave_approvers) and self.doc.leave_approver not in leave_approvers:
|
||||
msgprint(("[" + _("For Employee") + ' "' + self.doc.employee + '"] '
|
||||
+ _("Leave Approver can be one of") + ": "
|
||||
@ -160,6 +161,10 @@ class DocType(DocListController):
|
||||
where parent=%s and role='Leave Approver'""", self.doc.leave_approver):
|
||||
msgprint(get_fullname(self.doc.leave_approver) + ": " \
|
||||
+ _("does not have role 'Leave Approver'"), raise_exception=InvalidLeaveApproverError)
|
||||
|
||||
elif self.doc.docstatus==1 and len(leave_approvers) and self.doc.leave_approver != webnotes.session.user:
|
||||
msgprint(_("Only the selected Leave Approver can submit this Leave Application"),
|
||||
raise_exception=LeaveApproverIdentityError)
|
||||
|
||||
def notify_employee(self, status):
|
||||
employee = webnotes.doc("Employee", self.doc.employee)
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-20 11:18:11",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-05 14:44:37",
|
||||
"modified": "2013-12-23 19:53:41",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -220,6 +220,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Link",
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"options": "Leave Application",
|
||||
@ -230,8 +231,9 @@
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"match": "employee",
|
||||
"email": 1,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"report": 1,
|
||||
"role": "Employee",
|
||||
"write": 1
|
||||
@ -250,8 +252,11 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"report": 1,
|
||||
"restrict": 1,
|
||||
"role": "HR User",
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
@ -261,8 +266,9 @@
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"match": "leave_approver:user",
|
||||
"email": 1,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"report": 1,
|
||||
"role": "Leave Approver",
|
||||
"submit": 1,
|
||||
|
@ -10,6 +10,9 @@ class TestLeaveApplication(unittest.TestCase):
|
||||
def tearDown(self):
|
||||
webnotes.set_user("Administrator")
|
||||
|
||||
# so that this test doesn't affect other tests
|
||||
webnotes.conn.sql("""delete from `tabEmployee Leave Approver`""")
|
||||
|
||||
def _clear_roles(self):
|
||||
webnotes.conn.sql("""delete from `tabUserRole` where parent in
|
||||
("test@example.com", "test1@example.com", "test2@example.com")""")
|
||||
@ -160,12 +163,12 @@ class TestLeaveApplication(unittest.TestCase):
|
||||
webnotes.set_user("test1@example.com")
|
||||
application.doc.status = "Approved"
|
||||
|
||||
from webnotes.model.bean import BeanPermissionError
|
||||
self.assertRaises(BeanPermissionError, application.submit)
|
||||
|
||||
from erpnext.hr.doctype.leave_application.leave_application import LeaveApproverIdentityError
|
||||
self.assertRaises(LeaveApproverIdentityError, application.submit)
|
||||
|
||||
webnotes.conn.sql("""delete from `tabEmployee Leave Approver` where parent=%s""",
|
||||
"_T-Employee-0001")
|
||||
|
||||
|
||||
def _test_leave_approval_valid_leave_approver_insert(self):
|
||||
self._clear_applications()
|
||||
self._add_employee_leave_approver("_T-Employee-0001", "test2@example.com")
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-02-18 17:43:12",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-05 14:44:45",
|
||||
"modified": "2013-12-20 19:24:13",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"autoname": "field:leave_block_list_name",
|
||||
"description": "Block Holidays on important days.",
|
||||
"doctype": "DocType",
|
||||
@ -26,11 +27,13 @@
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Leave Block List",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"role": "HR User",
|
||||
"write": 1
|
||||
|
@ -8,23 +8,23 @@ from erpnext.hr.doctype.leave_block_list.leave_block_list import get_applicable_
|
||||
|
||||
class TestLeaveBlockList(unittest.TestCase):
|
||||
def tearDown(self):
|
||||
webnotes.session.user = "Administrator"
|
||||
webnotes.set_user("Administrator")
|
||||
|
||||
def test_get_applicable_block_dates(self):
|
||||
webnotes.session.user = "test@example.com"
|
||||
webnotes.set_user("test@example.com")
|
||||
webnotes.conn.set_value("Department", "_Test Department", "leave_block_list",
|
||||
"_Test Leave Block List")
|
||||
self.assertTrue("2013-01-02" in
|
||||
[d.block_date for d in get_applicable_block_dates("2013-01-01", "2013-01-03")])
|
||||
|
||||
def test_get_applicable_block_dates_for_allowed_user(self):
|
||||
webnotes.session.user = "test1@example.com"
|
||||
webnotes.set_user("test1@example.com")
|
||||
webnotes.conn.set_value("Department", "_Test Department 1", "leave_block_list",
|
||||
"_Test Leave Block List")
|
||||
self.assertEquals([], [d.block_date for d in get_applicable_block_dates("2013-01-01", "2013-01-03")])
|
||||
|
||||
def test_get_applicable_block_dates_all_lists(self):
|
||||
webnotes.session.user = "test1@example.com"
|
||||
webnotes.set_user("test1@example.com")
|
||||
webnotes.conn.set_value("Department", "_Test Department 1", "leave_block_list",
|
||||
"_Test Leave Block List")
|
||||
self.assertTrue("2013-01-02" in
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:47",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:10",
|
||||
"modified": "2013-12-20 19:23:19",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:47",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:10",
|
||||
"modified": "2013-12-20 19:23:19",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-02-21 09:55:58",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-22 15:32:07",
|
||||
"modified": "2013-12-20 19:24:13",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"autoname": "field:leave_type_name",
|
||||
"doctype": "DocType",
|
||||
"document_type": "Master",
|
||||
@ -26,11 +27,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Leave Type",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 0,
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:15",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-08-02 19:23:13",
|
||||
"modified": "2013-12-20 19:24:27",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -24,11 +24,13 @@
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Salary Slip",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 1,
|
||||
@ -248,6 +250,7 @@
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "amended_from",
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:48",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-22 15:27:44",
|
||||
"modified": "2013-12-20 19:23:42",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:48",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-22 15:27:56",
|
||||
"modified": "2013-12-20 19:23:43",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-03-07 18:50:29",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-08-06 17:15:53",
|
||||
"modified": "2013-12-20 19:24:28",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -25,11 +25,13 @@
|
||||
"amend": 0,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Salary Structure",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 0,
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:48",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-08-06 17:11:40",
|
||||
"modified": "2013-12-20 19:23:43",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:48",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-08-06 17:11:31",
|
||||
"modified": "2013-12-20 19:23:43",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-25 11:34:53",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-05 15:02:09",
|
||||
"modified": "2013-12-20 19:21:54",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "harshada@webnotestech.com"
|
||||
},
|
||||
@ -26,11 +26,13 @@
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Upload Attendance",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 0,
|
||||
"submit": 0,
|
||||
|
@ -2,15 +2,14 @@
|
||||
{
|
||||
"creation": "2013-01-22 15:11:38",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-12-09 16:25:50",
|
||||
"modified": "2013-12-20 19:23:57",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_attach": 0,
|
||||
"allow_copy": 0,
|
||||
"allow_email": 0,
|
||||
"allow_print": 0,
|
||||
"allow_import": 1,
|
||||
"allow_rename": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Master",
|
||||
@ -38,11 +37,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "BOM",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 1,
|
||||
@ -239,6 +240,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Link",
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"options": "BOM",
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-03-07 11:42:57",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:04",
|
||||
"modified": "2013-12-20 19:22:57",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:49",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-25 16:34:42",
|
||||
"modified": "2013-12-20 19:22:58",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:49",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-12-04 11:18:59",
|
||||
"modified": "2013-12-20 19:22:58",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -54,10 +54,9 @@ class DocType:
|
||||
self.validate_production_order_against_so()
|
||||
|
||||
def validate_warehouse(self):
|
||||
from erpnext.stock.utils import validate_warehouse_user, validate_warehouse_company
|
||||
from erpnext.stock.utils import validate_warehouse_company
|
||||
|
||||
for w in [self.doc.fg_warehouse, self.doc.wip_warehouse]:
|
||||
validate_warehouse_user(w)
|
||||
validate_warehouse_company(w, self.doc.company)
|
||||
|
||||
def validate_production_order_against_so(self):
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:16",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-12-18 13:22:14",
|
||||
"modified": "2013-12-20 19:24:16",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -29,11 +29,13 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Production Order",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Manufacturing User",
|
||||
@ -251,6 +253,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Data",
|
||||
"ignore_restrictions": 1,
|
||||
"label": "Amended From",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "amended_from",
|
||||
|
@ -5,6 +5,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import unittest
|
||||
import webnotes
|
||||
from webnotes.utils import cstr, getdate
|
||||
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory
|
||||
from erpnext.manufacturing.doctype.production_order.production_order import make_stock_entry
|
||||
|
||||
@ -32,7 +33,7 @@ class TestProductionOrder(unittest.TestCase):
|
||||
|
||||
stock_entry = make_stock_entry(pro_bean.doc.name, "Manufacture/Repack")
|
||||
stock_entry = webnotes.bean(stock_entry)
|
||||
|
||||
stock_entry.doc.fiscal_year = "_Test Fiscal Year 2013"
|
||||
stock_entry.doc.fg_completed_qty = 4
|
||||
stock_entry.run_method("get_items")
|
||||
stock_entry.submit()
|
||||
@ -50,7 +51,7 @@ class TestProductionOrder(unittest.TestCase):
|
||||
|
||||
stock_entry = make_stock_entry(pro_order, "Manufacture/Repack")
|
||||
stock_entry = webnotes.bean(stock_entry)
|
||||
|
||||
stock_entry.doc.fiscal_year = "_Test Fiscal Year 2013"
|
||||
stock_entry.doc.fg_completed_qty = 15
|
||||
stock_entry.run_method("get_items")
|
||||
stock_entry.insert()
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:49",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-08-08 12:12:27",
|
||||
"modified": "2013-12-20 19:23:25",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:49",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-22 15:26:23",
|
||||
"modified": "2013-12-20 19:23:25",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-21 12:03:47",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-08-08 12:01:02",
|
||||
"modified": "2013-12-20 19:23:25",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "jai@webnotestech.com"
|
||||
},
|
||||
@ -27,11 +27,13 @@
|
||||
{
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"email": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Production Planning Tool",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 0,
|
||||
"role": "Manufacturing User",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user