mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
@@ -37,7 +37,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
|||||||
|
|
||||||
// read-only for root accounts
|
// read-only for root accounts
|
||||||
if(!doc.parent_account) {
|
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."));
|
cur_frm.set_intro(wn._("This is a root account and cannot be edited."));
|
||||||
} else {
|
} else {
|
||||||
// credit days and type if customer or supplier
|
// credit days and type if customer or supplier
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-30 12:49:46",
|
"creation": "2013-01-30 12:49:46",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-09-24 11:22:18",
|
"modified": "2013-12-20 19:23:54",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -138,6 +138,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "parent_account",
|
"fieldname": "parent_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Parent Account",
|
"label": "Parent Account",
|
||||||
"oldfieldname": "parent_account",
|
"oldfieldname": "parent_account",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -154,7 +155,6 @@
|
|||||||
"oldfieldname": "account_type",
|
"oldfieldname": "account_type",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "\nFixed Asset Account\nBank or Cash\nExpense Account\nTax\nIncome Account\nChargeable\nWarehouse",
|
"options": "\nFixed Asset Account\nBank or Cash\nExpense Account\nTax\nIncome Account\nChargeable\nWarehouse",
|
||||||
"permlevel": 0,
|
|
||||||
"search_index": 0
|
"search_index": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -257,7 +257,9 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"role": "Accounts User",
|
"role": "Accounts User",
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
@@ -265,7 +267,9 @@
|
|||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"role": "Auditor",
|
"role": "Auditor",
|
||||||
"write": 0
|
"write": 0
|
||||||
},
|
},
|
||||||
@@ -273,7 +277,9 @@
|
|||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"role": "Sales User",
|
"role": "Sales User",
|
||||||
"write": 0
|
"write": 0
|
||||||
},
|
},
|
||||||
@@ -281,7 +287,9 @@
|
|||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"role": "Purchase User",
|
"role": "Purchase User",
|
||||||
"write": 0
|
"write": 0
|
||||||
},
|
},
|
||||||
@@ -297,7 +305,12 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
|
"export": 0,
|
||||||
|
"import": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
|
"restrict": 1,
|
||||||
"role": "Accounts Manager",
|
"role": "Accounts Manager",
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-06-24 15:49:57",
|
"creation": "2013-06-24 15:49:57",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-09-24 11:52:58",
|
"modified": "2013-12-20 19:22:52",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -25,11 +25,13 @@
|
|||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Accounts Settings",
|
"parent": "Accounts Settings",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"role": "Accounts Manager",
|
"role": "Accounts Manager",
|
||||||
"write": 1
|
"write": 1
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:37",
|
"creation": "2013-02-22 01:27:37",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-03 14:11:31",
|
"modified": "2013-12-20 19:22:55",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-03-07 11:55:04",
|
"creation": "2013-03-07 11:55:04",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-22 17:27:59",
|
"modified": "2013-12-20 19:22:59",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:05",
|
"creation": "2013-01-10 16:34:05",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-22 15:30:37",
|
"modified": "2013-12-20 19:23:58",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -82,7 +82,9 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:38",
|
"creation": "2013-02-22 01:27:38",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:06",
|
"modified": "2013-12-20 19:22:59",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-03-07 11:55:06",
|
"creation": "2013-03-07 11:55:06",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-02 14:05:25",
|
"modified": "2013-12-20 19:23:58",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -157,6 +157,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "C-Form",
|
"options": "C-Form",
|
||||||
@@ -166,14 +167,18 @@
|
|||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"role": "Accounts User",
|
"role": "Accounts User",
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"role": "Accounts Manager",
|
"role": "Accounts Manager",
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:38",
|
"creation": "2013-02-22 01:27:38",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-02 16:58:31",
|
"modified": "2013-12-20 19:23:00",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,12 +2,13 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-23 19:57:17",
|
"creation": "2013-01-23 19:57:17",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-22 15:23:10",
|
"modified": "2013-12-20 19:24:00",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_copy": 1,
|
"allow_copy": 1,
|
||||||
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "field:cost_center_name",
|
"autoname": "field:cost_center_name",
|
||||||
"description": "Track separate Income and Expense for product verticals or divisions.",
|
"description": "Track separate Income and Expense for product verticals or divisions.",
|
||||||
@@ -30,11 +31,13 @@
|
|||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Cost Center",
|
"parent": "Cost Center",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 0
|
"submit": 0
|
||||||
@@ -74,6 +77,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "parent_cost_center",
|
"fieldname": "parent_cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Parent Cost Center",
|
"label": "Parent Cost Center",
|
||||||
"oldfieldname": "parent_cost_center",
|
"oldfieldname": "parent_cost_center",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -171,6 +175,7 @@
|
|||||||
"fieldname": "old_parent",
|
"fieldname": "old_parent",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "old_parent",
|
"label": "old_parent",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "old_parent",
|
"oldfieldname": "old_parent",
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-22 16:50:25",
|
"creation": "2013-01-22 16:50:25",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-25 11:40:02",
|
"modified": "2013-12-20 19:24:08",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"autoname": "field:year",
|
"autoname": "field:year",
|
||||||
"description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.",
|
"description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
@@ -25,11 +26,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Fiscal Year",
|
"parent": "Fiscal Year",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1
|
"read": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:06",
|
"creation": "2013-01-10 16:34:06",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-03 14:14:09",
|
"modified": "2013-12-20 19:24:08",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -26,11 +26,13 @@
|
|||||||
{
|
{
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "GL Entry",
|
"parent": "GL Entry",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-03-25 10:53:52",
|
"creation": "2013-03-25 10:53:52",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-03 14:11:33",
|
"modified": "2013-12-20 19:24:11",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -27,11 +27,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Journal Voucher",
|
"parent": "Journal Voucher",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1
|
"report": 1
|
||||||
},
|
},
|
||||||
@@ -459,6 +461,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "amended_from",
|
"oldfieldname": "amended_from",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:39",
|
"creation": "2013-02-22 01:27:39",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-02 18:15:56",
|
"modified": "2013-12-20 19:23:18",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2012-03-27 14:35:49",
|
"creation": "2012-03-27 14:35:49",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:11",
|
"modified": "2013-12-20 19:23:21",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2012-12-04 17:49:20",
|
"creation": "2012-12-04 17:49:20",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-05 14:46:28",
|
"modified": "2013-12-20 19:24:14",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "harshada@webnotestech.com"
|
"owner": "harshada@webnotestech.com"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "field:mode_of_payment",
|
"autoname": "field:mode_of_payment",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
@@ -27,11 +28,13 @@
|
|||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Mode of Payment",
|
"parent": "Mode of Payment",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts Manager",
|
"role": "Accounts Manager",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-30 12:49:46",
|
"creation": "2013-01-30 12:49:46",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-22 15:31:00",
|
"modified": "2013-12-20 19:23:24",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -26,11 +26,13 @@
|
|||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Payment to Invoice Matching Tool",
|
"parent": "Payment to Invoice Matching Tool",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 0,
|
"report": 0,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:39",
|
"creation": "2013-02-22 01:27:39",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:11",
|
"modified": "2013-12-20 19:23:24",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:07",
|
"creation": "2013-01-10 16:34:07",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-12 17:13:23",
|
"modified": "2013-12-20 19:24:15",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "jai@webnotestech.com"
|
"owner": "jai@webnotestech.com"
|
||||||
},
|
},
|
||||||
@@ -28,11 +28,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Period Closing Voucher",
|
"parent": "Period Closing Voucher",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 1,
|
"submit": 1,
|
||||||
@@ -80,6 +82,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "amended_from",
|
"oldfieldname": "amended_from",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-24 12:15:51",
|
"creation": "2013-05-24 12:15:51",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-02 16:58:38",
|
"modified": "2013-12-20 19:24:16",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -23,11 +23,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "POS Setting",
|
"parent": "POS Setting",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 0
|
"submit": 0
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-21 16:16:39",
|
"creation": "2013-05-21 16:16:39",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-22 17:15:27",
|
"modified": "2013-12-20 19:24:18",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -28,11 +28,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Purchase Invoice",
|
"parent": "Purchase Invoice",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1
|
"report": 1
|
||||||
},
|
},
|
||||||
@@ -181,6 +183,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "amended_from",
|
"oldfieldname": "amended_from",
|
||||||
@@ -787,7 +790,6 @@
|
|||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
"match": "supplier",
|
|
||||||
"role": "Supplier",
|
"role": "Supplier",
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 0
|
"write": 0
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-03-08 15:36:46",
|
"creation": "2013-03-08 15:36:46",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:12",
|
"modified": "2013-12-20 19:23:29",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-22 12:43:10",
|
"creation": "2013-05-22 12:43:10",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-02 19:41:17",
|
"modified": "2013-12-20 19:23:29",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-21 16:16:04",
|
"creation": "2013-05-21 16:16:04",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:18",
|
"modified": "2013-12-20 19:23:38",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:08",
|
"creation": "2013-01-10 16:34:08",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-22 15:22:25",
|
"modified": "2013-12-20 19:24:24",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "wasim@webnotestech.com"
|
"owner": "wasim@webnotestech.com"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"autoname": "field:title",
|
"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.",
|
"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",
|
"doctype": "DocType",
|
||||||
@@ -25,11 +26,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Purchase Taxes and Charges Master",
|
"parent": "Purchase Taxes and Charges Master",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 0
|
"submit": 0
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-24 19:29:05",
|
"creation": "2013-05-24 19:29:05",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-18 15:16:50",
|
"modified": "2013-12-20 19:24:29",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -30,11 +30,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Sales Invoice",
|
"parent": "Sales Invoice",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1
|
"report": 1
|
||||||
},
|
},
|
||||||
@@ -141,6 +143,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "amended_from",
|
"oldfieldname": "amended_from",
|
||||||
@@ -1219,7 +1222,6 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
"match": "customer",
|
|
||||||
"role": "Customer"
|
"role": "Customer"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:41",
|
"creation": "2013-02-22 01:27:41",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:19",
|
"modified": "2013-12-20 19:21:40",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-06-04 11:02:19",
|
"creation": "2013-06-04 11:02:19",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-02 19:41:24",
|
"modified": "2013-12-20 19:21:40",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-04-24 11:39:32",
|
"creation": "2013-04-24 11:39:32",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-12-17 12:38:08",
|
"modified": "2013-12-20 19:21:45",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:09",
|
"creation": "2013-01-10 16:34:09",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-10-31 19:25:09",
|
"modified": "2013-12-20 19:24:34",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"autoname": "field:title",
|
"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.",
|
"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",
|
"doctype": "DocType",
|
||||||
@@ -26,11 +27,13 @@
|
|||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Sales Taxes and Charges Master",
|
"parent": "Sales Taxes and Charges Master",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 0
|
"submit": 0
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-06-25 11:48:03",
|
"creation": "2013-06-25 11:48:03",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-10-31 19:24:50",
|
"modified": "2013-12-20 19:24:35",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -24,11 +24,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Shipping Rule",
|
"parent": "Shipping Rule",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1
|
"report": 1
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-06-25 11:54:50",
|
"creation": "2013-06-25 11:54:50",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:22",
|
"modified": "2013-12-20 19:21:46",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "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
|
// see ledger
|
||||||
|
|
||||||
pscript['onload_Accounts Browser'] = function(wrapper){
|
pscript['onload_Accounts Browser'] = function(wrapper){
|
||||||
console.log($(wrapper).html());
|
|
||||||
wn.ui.make_app_page({
|
wn.ui.make_app_page({
|
||||||
parent: wrapper,
|
parent: wrapper,
|
||||||
single_column: true
|
single_column: true
|
||||||
@@ -122,14 +121,14 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bold
|
// bold
|
||||||
$('.balance-bold').removeClass('balance-bold'); // deselect
|
$('.bold').removeClass('bold'); // deselect
|
||||||
$(link).parent().find('.balance-area:first').addClass('balance-bold'); // select
|
$(link).parent().find('.balance-area:first').addClass('bold'); // select
|
||||||
|
|
||||||
},
|
},
|
||||||
onrender: function(treenode) {
|
onrender: function(treenode) {
|
||||||
if (ctype == 'Account' && treenode.data) {
|
if (ctype == 'Account' && treenode.data) {
|
||||||
if(treenode.data.balance) {
|
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)
|
+ format_currency(treenode.data.balance, treenode.data.currency)
|
||||||
+ '</span>');
|
+ '</span>');
|
||||||
}
|
}
|
||||||
@@ -142,7 +141,7 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
var data = $(link).data('node-data');
|
var data = $(link).data('node-data');
|
||||||
if(!data) return;
|
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 = [];
|
var node_links = [];
|
||||||
// edit
|
// edit
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-06-25 11:04:03",
|
"creation": "2013-06-25 11:04:03",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-09 14:38:46",
|
"modified": "2013-12-20 19:22:59",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -26,11 +26,13 @@
|
|||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Buying Settings",
|
"parent": "Buying Settings",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"role": "System Manager",
|
"role": "System Manager",
|
||||||
"write": 1
|
"write": 1
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2012-03-27 14:35:51",
|
"creation": "2012-03-27 14:35:51",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:12",
|
"modified": "2013-12-20 19:23:27",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-21 16:16:39",
|
"creation": "2013-05-21 16:16:39",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-22 17:20:58",
|
"modified": "2013-12-20 19:24:20",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -29,11 +29,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Purchase Order",
|
"parent": "Purchase Order",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1
|
"report": 1
|
||||||
},
|
},
|
||||||
@@ -141,6 +143,7 @@
|
|||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "amended_from",
|
"oldfieldname": "amended_from",
|
||||||
@@ -694,7 +697,6 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
"match": "supplier",
|
|
||||||
"role": "Supplier"
|
"role": "Supplier"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-24 19:29:06",
|
"creation": "2013-05-24 19:29:06",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-02 19:41:27",
|
"modified": "2013-12-20 19:23:32",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:42",
|
"creation": "2013-02-22 01:27:42",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-25 16:33:05",
|
"modified": "2013-12-20 19:23:33",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "dhanalekshmi@webnotestech.com"
|
"owner": "dhanalekshmi@webnotestech.com"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:42",
|
"creation": "2013-02-22 01:27:42",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-25 16:34:11",
|
"modified": "2013-12-20 19:23:37",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "wasim@webnotestech.com"
|
"owner": "wasim@webnotestech.com"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-04-30 13:13:03",
|
"creation": "2013-04-30 13:13:03",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-02 14:05:38",
|
"modified": "2013-12-20 19:24:24",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -28,11 +28,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Quality Inspection",
|
"parent": "Quality Inspection",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Quality Manager",
|
"role": "Quality Manager",
|
||||||
@@ -206,6 +208,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "amended_from",
|
"oldfieldname": "amended_from",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:43",
|
"creation": "2013-02-22 01:27:43",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:18",
|
"modified": "2013-12-20 19:23:39",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -151,8 +151,7 @@ class DocType(TransactionBase):
|
|||||||
acc = webnotes.conn.sql("select name from `tabAccount` where master_type = 'Supplier' \
|
acc = webnotes.conn.sql("select name from `tabAccount` where master_type = 'Supplier' \
|
||||||
and master_name = %s and docstatus < 2", self.doc.name)
|
and master_name = %s and docstatus < 2", self.doc.name)
|
||||||
if acc:
|
if acc:
|
||||||
from webnotes.model import delete_doc
|
webnotes.delete_doc('Account', acc[0][0])
|
||||||
delete_doc('Account', acc[0][0])
|
|
||||||
|
|
||||||
def on_trash(self):
|
def on_trash(self):
|
||||||
self.delete_supplier_address()
|
self.delete_supplier_address()
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:11",
|
"creation": "2013-01-10 16:34:11",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-19 11:31:28",
|
"modified": "2013-12-20 19:24:36",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "naming_series:",
|
"autoname": "naming_series:",
|
||||||
"description": "Supplier of Goods or Services.",
|
"description": "Supplier of Goods or Services.",
|
||||||
@@ -28,11 +29,13 @@
|
|||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Supplier",
|
"parent": "Supplier",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 0
|
"submit": 0
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-21 16:16:45",
|
"creation": "2013-05-21 16:16:45",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-12-14 17:27:47",
|
"modified": "2013-12-20 19:24:36",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -29,11 +29,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Supplier Quotation",
|
"parent": "Supplier Quotation",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1
|
"report": 1
|
||||||
},
|
},
|
||||||
@@ -141,6 +143,7 @@
|
|||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "amended_from",
|
"oldfieldname": "amended_from",
|
||||||
@@ -632,7 +635,6 @@
|
|||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
"match": "supplier",
|
|
||||||
"role": "Supplier",
|
"role": "Supplier",
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 0
|
"write": 0
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-22 12:43:10",
|
"creation": "2013-05-22 12:43:10",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-02 19:41:29",
|
"modified": "2013-12-20 19:21:50",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -50,13 +50,12 @@ class BuyingController(StockController):
|
|||||||
break
|
break
|
||||||
|
|
||||||
def validate_warehouse(self):
|
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
|
warehouses = list(set([d.warehouse for d in
|
||||||
self.doclist.get({"doctype": self.tname}) if d.warehouse]))
|
self.doclist.get({"doctype": self.tname}) if d.warehouse]))
|
||||||
|
|
||||||
for w in warehouses:
|
for w in warehouses:
|
||||||
validate_warehouse_user(w)
|
|
||||||
validate_warehouse_company(w, self.doc.company)
|
validate_warehouse_company(w, self.doc.company)
|
||||||
|
|
||||||
def get_purchase_tax_details(self):
|
def get_purchase_tax_details(self):
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2012-07-03 13:29:42",
|
"creation": "2012-07-03 13:29:42",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-15 10:16:00",
|
"modified": "2013-12-20 19:24:07",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -23,11 +23,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Feed",
|
"parent": "Feed",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "System Manager"
|
"role": "System Manager"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:12",
|
"creation": "2013-01-10 16:34:12",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-05 14:24:59",
|
"modified": "2013-12-20 19:23:55",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "ashwini@webnotestech.com"
|
"owner": "ashwini@webnotestech.com"
|
||||||
},
|
},
|
||||||
@@ -26,11 +26,13 @@
|
|||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Appraisal",
|
"parent": "Appraisal",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"write": 1
|
"write": 1
|
||||||
@@ -217,6 +219,7 @@
|
|||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "amended_from",
|
"oldfieldname": "amended_from",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:44",
|
"creation": "2013-02-22 01:27:44",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:03",
|
"modified": "2013-12-20 19:22:53",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "ashwini@webnotestech.com"
|
"owner": "ashwini@webnotestech.com"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2012-07-03 13:30:39",
|
"creation": "2012-07-03 13:30:39",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-05 14:25:14",
|
"modified": "2013-12-20 19:23:55",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "ashwini@webnotestech.com"
|
"owner": "ashwini@webnotestech.com"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"autoname": "field:kra_title",
|
"autoname": "field:kra_title",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Master",
|
||||||
@@ -25,11 +26,13 @@
|
|||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Appraisal Template",
|
"parent": "Appraisal Template",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "HR User",
|
"role": "HR User",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:44",
|
"creation": "2013-02-22 01:27:44",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:03",
|
"modified": "2013-12-20 19:22:54",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "ashwini@webnotestech.com"
|
"owner": "ashwini@webnotestech.com"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:13",
|
"creation": "2013-01-10 16:34:13",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-02 14:05:42",
|
"modified": "2013-12-20 19:23:55",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "ashwini@webnotestech.com"
|
"owner": "ashwini@webnotestech.com"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"autoname": "naming_series:",
|
"autoname": "naming_series:",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Master",
|
||||||
@@ -28,11 +29,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Attendance",
|
"parent": "Attendance",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 1,
|
"submit": 1,
|
||||||
@@ -154,6 +157,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "Attendance",
|
"options": "Attendance",
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:13",
|
"creation": "2013-01-10 16:34:13",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-22 15:30:08",
|
"modified": "2013-12-20 19:23:57",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "field:branch",
|
"autoname": "field:branch",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
@@ -27,11 +28,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Branch",
|
"parent": "Branch",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-22 16:50:30",
|
"creation": "2013-01-22 16:50:30",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-22 15:25:14",
|
"modified": "2013-12-20 19:24:02",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "field:deduction_name",
|
"autoname": "field:deduction_name",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
@@ -27,11 +28,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Deduction Type",
|
"parent": "Deduction Type",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "HR User",
|
"role": "HR User",
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-05 11:48:26",
|
"creation": "2013-02-05 11:48:26",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-22 15:25:03",
|
"modified": "2013-12-20 19:24:04",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"autoname": "field:department_name",
|
"autoname": "field:department_name",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Master",
|
||||||
@@ -26,11 +27,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Department",
|
"parent": "Department",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "HR User",
|
"role": "HR User",
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:13",
|
"creation": "2013-01-10 16:34:13",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-05 14:35:42",
|
"modified": "2013-12-20 19:24:04",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "field:designation_name",
|
"autoname": "field:designation_name",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
@@ -27,11 +28,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Designation",
|
"parent": "Designation",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "HR User",
|
"role": "HR User",
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-24 11:03:32",
|
"creation": "2013-01-24 11:03:32",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-12-09 16:24:07",
|
"modified": "2013-12-20 19:24:05",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "field:earning_name",
|
"autoname": "field:earning_name",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
@@ -27,11 +28,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Earning Type",
|
"parent": "Earning Type",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "HR User",
|
"role": "HR User",
|
||||||
|
|||||||
@@ -7,13 +7,11 @@ import webnotes
|
|||||||
from webnotes.utils import getdate, validate_email_add, cstr, cint
|
from webnotes.utils import getdate, validate_email_add, cstr, cint
|
||||||
from webnotes.model.doc import make_autoname
|
from webnotes.model.doc import make_autoname
|
||||||
from webnotes import msgprint, _
|
from webnotes import msgprint, _
|
||||||
|
import webnotes.permissions
|
||||||
|
from webnotes.defaults import get_restrictions
|
||||||
|
from webnotes.model.controller import DocListController
|
||||||
|
|
||||||
|
class DocType(DocListController):
|
||||||
class DocType:
|
|
||||||
def __init__(self,doc,doclist=[]):
|
|
||||||
self.doc = doc
|
|
||||||
self.doclist = doclist
|
|
||||||
|
|
||||||
def autoname(self):
|
def autoname(self):
|
||||||
naming_method = webnotes.conn.get_value("HR Settings", None, "emp_created_by")
|
naming_method = webnotes.conn.get_value("HR Settings", None, "emp_created_by")
|
||||||
if not naming_method:
|
if not naming_method:
|
||||||
@@ -39,27 +37,35 @@ class DocType:
|
|||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
if self.doc.user_id:
|
if self.doc.user_id:
|
||||||
|
self.restrict_user()
|
||||||
self.update_user_default()
|
self.update_user_default()
|
||||||
self.update_profile()
|
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):
|
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("employee_name", self.doc.employee_name, self.doc.user_id)
|
||||||
webnotes.conn.set_default("company", self.doc.company, 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):
|
def restrict_leave_approver(self):
|
||||||
employee_leave_approvers = self.doclist.get({"parentfield": "employee_leave_approvers"})
|
"""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"))
|
||||||
|
|
||||||
if len(employee_leave_approvers):
|
for user in employee_leave_approvers:
|
||||||
webnotes.conn.set_default("leave_approver", employee_leave_approvers[0].leave_approver,
|
self.add_restriction_if_required("Employee", user)
|
||||||
self.doc.user_id)
|
self.add_restriction_if_required("Leave Application", user)
|
||||||
|
|
||||||
elif self.doc.reports_to:
|
def add_restriction_if_required(self, doctype, user):
|
||||||
from webnotes.profile import Profile
|
if webnotes.permissions.has_only_non_restrict_role(webnotes.get_doctype(doctype), user) \
|
||||||
reports_to_user = webnotes.conn.get_value("Employee", self.doc.reports_to, "user_id")
|
and self.doc.name not in get_restrictions(user).get("Employee", []):
|
||||||
if "Leave Approver" in Profile(reports_to_user).get_roles():
|
|
||||||
webnotes.conn.set_default("leave_approver", reports_to_user, self.doc.user_id)
|
webnotes.defaults.add_default("Employee", self.doc.name, user, "Restriction")
|
||||||
|
|
||||||
def update_profile(self):
|
def update_profile(self):
|
||||||
# add employee role if missing
|
# add employee role if missing
|
||||||
|
|||||||
@@ -2,12 +2,13 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-03-07 09:04:18",
|
"creation": "2013-03-07 09:04:18",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-11-03 11:19:10",
|
"modified": "2013-12-23 19:35:27",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_attach": 1,
|
"allow_attach": 1,
|
||||||
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "naming_series:",
|
"autoname": "naming_series:",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
@@ -28,11 +29,13 @@
|
|||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Employee",
|
"parent": "Employee",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 0
|
"submit": 0
|
||||||
@@ -415,6 +418,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "reports_to",
|
"fieldname": "reports_to",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Reports to",
|
"label": "Reports to",
|
||||||
"oldfieldname": "reports_to",
|
"oldfieldname": "reports_to",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@@ -749,7 +753,6 @@
|
|||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
"match": "employee",
|
|
||||||
"role": "Employee",
|
"role": "Employee",
|
||||||
"write": 0
|
"write": 0
|
||||||
},
|
},
|
||||||
@@ -757,7 +760,7 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
"match": "company",
|
"restrict": 0,
|
||||||
"role": "HR User",
|
"role": "HR User",
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
@@ -765,6 +768,7 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"restrict": 1,
|
||||||
"role": "HR Manager",
|
"role": "HR Manager",
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:45",
|
"creation": "2013-02-22 01:27:45",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:08",
|
"modified": "2013-12-20 19:23:12",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:45",
|
"creation": "2013-02-22 01:27:45",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:08",
|
"modified": "2013-12-20 19:23:12",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:45",
|
"creation": "2013-02-22 01:27:45",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:08",
|
"modified": "2013-12-20 19:23:12",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-04-12 06:56:15",
|
"creation": "2013-04-12 06:56:15",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-05 14:15:44",
|
"modified": "2013-12-20 19:23:12",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:14",
|
"creation": "2013-01-10 16:34:14",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-22 15:31:58",
|
"modified": "2013-12-20 19:24:07",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"autoname": "field:employee_type_name",
|
"autoname": "field:employee_type_name",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Master",
|
||||||
@@ -26,11 +27,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Employment Type",
|
"parent": "Employment Type",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:14",
|
"creation": "2013-01-10 16:34:14",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-09-25 11:36:11",
|
"modified": "2013-12-20 19:24:07",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "harshada@webnotestech.com"
|
"owner": "harshada@webnotestech.com"
|
||||||
},
|
},
|
||||||
@@ -26,11 +26,13 @@
|
|||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Expense Claim",
|
"parent": "Expense Claim",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"write": 1
|
"write": 1
|
||||||
@@ -208,6 +210,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "amended_from",
|
"oldfieldname": "amended_from",
|
||||||
@@ -226,7 +229,6 @@
|
|||||||
"amend": 1,
|
"amend": 1,
|
||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
"match": "exp_approver:user",
|
|
||||||
"role": "Expense Approver",
|
"role": "Expense Approver",
|
||||||
"submit": 1
|
"submit": 1
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:46",
|
"creation": "2013-02-22 01:27:46",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:09",
|
"modified": "2013-12-20 19:23:13",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "harshada@webnotestech.com"
|
"owner": "harshada@webnotestech.com"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2012-03-27 14:35:55",
|
"creation": "2012-03-27 14:35:55",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-05 14:37:47",
|
"modified": "2013-12-20 19:24:07",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "harshada@webnotestech.com"
|
"owner": "harshada@webnotestech.com"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"autoname": "field:expense_type",
|
"autoname": "field:expense_type",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Master",
|
||||||
@@ -25,11 +26,13 @@
|
|||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Expense Claim Type",
|
"parent": "Expense Claim Type",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "HR Manager",
|
"role": "HR Manager",
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:14",
|
"creation": "2013-01-10 16:34:14",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-26 15:24:31",
|
"modified": "2013-12-20 19:24:08",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"autoname": "field:grade_name",
|
"autoname": "field:grade_name",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Master",
|
||||||
@@ -32,11 +33,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Grade",
|
"parent": "Grade",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "HR User",
|
"role": "HR User",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:46",
|
"creation": "2013-02-22 01:27:46",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:09",
|
"modified": "2013-12-20 19:23:14",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:14",
|
"creation": "2013-01-10 16:34:14",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-05 14:40:02",
|
"modified": "2013-12-20 19:24:08",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Master",
|
||||||
"icon": "icon-calendar",
|
"icon": "icon-calendar",
|
||||||
@@ -25,11 +26,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Holiday List",
|
"parent": "Holiday List",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "HR Manager",
|
"role": "HR Manager",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-08-02 13:45:23",
|
"creation": "2013-08-02 13:45:23",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-10-02 15:44:38",
|
"modified": "2013-12-20 19:23:14",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -25,11 +25,13 @@
|
|||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "HR Settings",
|
"parent": "HR Settings",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"role": "System Manager",
|
"role": "System Manager",
|
||||||
"write": 1
|
"write": 1
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-29 19:25:37",
|
"creation": "2013-01-29 19:25:37",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-09-10 10:51:51",
|
"modified": "2013-12-20 19:24:10",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -28,11 +28,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Job Applicant",
|
"parent": "Job Applicant",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "HR User",
|
"role": "HR User",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-15 16:13:36",
|
"creation": "2013-01-15 16:13:36",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-05 14:43:35",
|
"modified": "2013-12-20 19:24:11",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -27,11 +27,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Job Opening",
|
"parent": "Job Opening",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "HR User",
|
"role": "HR User",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-20 19:10:38",
|
"creation": "2013-02-20 19:10:38",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-12-12 17:41:52",
|
"modified": "2013-12-20 19:24:12",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -29,11 +29,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Leave Allocation",
|
"parent": "Leave Allocation",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 1,
|
"submit": 1,
|
||||||
@@ -158,6 +160,7 @@
|
|||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "amended_from",
|
"oldfieldname": "amended_from",
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ from webnotes import msgprint
|
|||||||
class LeaveDayBlockedError(webnotes.ValidationError): pass
|
class LeaveDayBlockedError(webnotes.ValidationError): pass
|
||||||
class OverlapError(webnotes.ValidationError): pass
|
class OverlapError(webnotes.ValidationError): pass
|
||||||
class InvalidLeaveApproverError(webnotes.ValidationError): pass
|
class InvalidLeaveApproverError(webnotes.ValidationError): pass
|
||||||
|
class LeaveApproverIdentityError(webnotes.ValidationError): pass
|
||||||
|
|
||||||
from webnotes.model.controller import DocListController
|
from webnotes.model.controller import DocListController
|
||||||
class DocType(DocListController):
|
class DocType(DocListController):
|
||||||
@@ -161,6 +162,10 @@ class DocType(DocListController):
|
|||||||
msgprint(get_fullname(self.doc.leave_approver) + ": " \
|
msgprint(get_fullname(self.doc.leave_approver) + ": " \
|
||||||
+ _("does not have role 'Leave Approver'"), raise_exception=InvalidLeaveApproverError)
|
+ _("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):
|
def notify_employee(self, status):
|
||||||
employee = webnotes.doc("Employee", self.doc.employee)
|
employee = webnotes.doc("Employee", self.doc.employee)
|
||||||
if not employee.user_id:
|
if not employee.user_id:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-20 11:18:11",
|
"creation": "2013-02-20 11:18:11",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-05 14:44:37",
|
"modified": "2013-12-23 19:53:41",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -220,6 +220,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "Leave Application",
|
"options": "Leave Application",
|
||||||
@@ -230,8 +231,9 @@
|
|||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
"match": "employee",
|
"email": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Employee",
|
"role": "Employee",
|
||||||
"write": 1
|
"write": 1
|
||||||
@@ -250,8 +252,11 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
|
"restrict": 1,
|
||||||
"role": "HR User",
|
"role": "HR User",
|
||||||
"submit": 1,
|
"submit": 1,
|
||||||
"write": 1
|
"write": 1
|
||||||
@@ -261,8 +266,9 @@
|
|||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
"match": "leave_approver:user",
|
"email": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Leave Approver",
|
"role": "Leave Approver",
|
||||||
"submit": 1,
|
"submit": 1,
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ class TestLeaveApplication(unittest.TestCase):
|
|||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
webnotes.set_user("Administrator")
|
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):
|
def _clear_roles(self):
|
||||||
webnotes.conn.sql("""delete from `tabUserRole` where parent in
|
webnotes.conn.sql("""delete from `tabUserRole` where parent in
|
||||||
("test@example.com", "test1@example.com", "test2@example.com")""")
|
("test@example.com", "test1@example.com", "test2@example.com")""")
|
||||||
@@ -160,8 +163,8 @@ class TestLeaveApplication(unittest.TestCase):
|
|||||||
webnotes.set_user("test1@example.com")
|
webnotes.set_user("test1@example.com")
|
||||||
application.doc.status = "Approved"
|
application.doc.status = "Approved"
|
||||||
|
|
||||||
from webnotes.model.bean import BeanPermissionError
|
from erpnext.hr.doctype.leave_application.leave_application import LeaveApproverIdentityError
|
||||||
self.assertRaises(BeanPermissionError, application.submit)
|
self.assertRaises(LeaveApproverIdentityError, application.submit)
|
||||||
|
|
||||||
webnotes.conn.sql("""delete from `tabEmployee Leave Approver` where parent=%s""",
|
webnotes.conn.sql("""delete from `tabEmployee Leave Approver` where parent=%s""",
|
||||||
"_T-Employee-0001")
|
"_T-Employee-0001")
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-18 17:43:12",
|
"creation": "2013-02-18 17:43:12",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-05 14:44:45",
|
"modified": "2013-12-20 19:24:13",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"autoname": "field:leave_block_list_name",
|
"autoname": "field:leave_block_list_name",
|
||||||
"description": "Block Holidays on important days.",
|
"description": "Block Holidays on important days.",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
@@ -26,11 +27,13 @@
|
|||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Leave Block List",
|
"parent": "Leave Block List",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"role": "HR User",
|
"role": "HR User",
|
||||||
"write": 1
|
"write": 1
|
||||||
|
|||||||
@@ -8,23 +8,23 @@ from erpnext.hr.doctype.leave_block_list.leave_block_list import get_applicable_
|
|||||||
|
|
||||||
class TestLeaveBlockList(unittest.TestCase):
|
class TestLeaveBlockList(unittest.TestCase):
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
webnotes.session.user = "Administrator"
|
webnotes.set_user("Administrator")
|
||||||
|
|
||||||
def test_get_applicable_block_dates(self):
|
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",
|
webnotes.conn.set_value("Department", "_Test Department", "leave_block_list",
|
||||||
"_Test Leave Block List")
|
"_Test Leave Block List")
|
||||||
self.assertTrue("2013-01-02" in
|
self.assertTrue("2013-01-02" in
|
||||||
[d.block_date for d in get_applicable_block_dates("2013-01-01", "2013-01-03")])
|
[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):
|
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",
|
webnotes.conn.set_value("Department", "_Test Department 1", "leave_block_list",
|
||||||
"_Test 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")])
|
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):
|
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",
|
webnotes.conn.set_value("Department", "_Test Department 1", "leave_block_list",
|
||||||
"_Test Leave Block List")
|
"_Test Leave Block List")
|
||||||
self.assertTrue("2013-01-02" in
|
self.assertTrue("2013-01-02" in
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:47",
|
"creation": "2013-02-22 01:27:47",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:10",
|
"modified": "2013-12-20 19:23:19",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:47",
|
"creation": "2013-02-22 01:27:47",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:10",
|
"modified": "2013-12-20 19:23:19",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-21 09:55:58",
|
"creation": "2013-02-21 09:55:58",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-22 15:32:07",
|
"modified": "2013-12-20 19:24:13",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_import": 1,
|
||||||
"autoname": "field:leave_type_name",
|
"autoname": "field:leave_type_name",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Master",
|
||||||
@@ -26,11 +27,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Leave Type",
|
"parent": "Leave Type",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:15",
|
"creation": "2013-01-10 16:34:15",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-02 19:23:13",
|
"modified": "2013-12-20 19:24:27",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -24,11 +24,13 @@
|
|||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Salary Slip",
|
"parent": "Salary Slip",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 1,
|
"submit": 1,
|
||||||
@@ -248,6 +250,7 @@
|
|||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "amended_from",
|
"oldfieldname": "amended_from",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:48",
|
"creation": "2013-02-22 01:27:48",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-22 15:27:44",
|
"modified": "2013-12-20 19:23:42",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:48",
|
"creation": "2013-02-22 01:27:48",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-22 15:27:56",
|
"modified": "2013-12-20 19:23:43",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-03-07 18:50:29",
|
"creation": "2013-03-07 18:50:29",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-06 17:15:53",
|
"modified": "2013-12-20 19:24:28",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -25,11 +25,13 @@
|
|||||||
"amend": 0,
|
"amend": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Salary Structure",
|
"parent": "Salary Structure",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:48",
|
"creation": "2013-02-22 01:27:48",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-06 17:11:40",
|
"modified": "2013-12-20 19:23:43",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:48",
|
"creation": "2013-02-22 01:27:48",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-06 17:11:31",
|
"modified": "2013-12-20 19:23:43",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-25 11:34:53",
|
"creation": "2013-01-25 11:34:53",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-05 15:02:09",
|
"modified": "2013-12-20 19:21:54",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "harshada@webnotestech.com"
|
"owner": "harshada@webnotestech.com"
|
||||||
},
|
},
|
||||||
@@ -26,11 +26,13 @@
|
|||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Upload Attendance",
|
"parent": "Upload Attendance",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 0,
|
"report": 0,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
|
|||||||
@@ -2,15 +2,14 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-22 15:11:38",
|
"creation": "2013-01-22 15:11:38",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-12-09 16:25:50",
|
"modified": "2013-12-20 19:23:57",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_attach": 0,
|
"allow_attach": 0,
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
"allow_email": 0,
|
"allow_import": 1,
|
||||||
"allow_print": 0,
|
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Master",
|
"document_type": "Master",
|
||||||
@@ -38,11 +37,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "BOM",
|
"parent": "BOM",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"submit": 1,
|
"submit": 1,
|
||||||
@@ -239,6 +240,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "BOM",
|
"options": "BOM",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-03-07 11:42:57",
|
"creation": "2013-03-07 11:42:57",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:04",
|
"modified": "2013-12-20 19:22:57",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:49",
|
"creation": "2013-02-22 01:27:49",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-25 16:34:42",
|
"modified": "2013-12-20 19:22:58",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:49",
|
"creation": "2013-02-22 01:27:49",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-12-04 11:18:59",
|
"modified": "2013-12-20 19:22:58",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -54,10 +54,9 @@ class DocType:
|
|||||||
self.validate_production_order_against_so()
|
self.validate_production_order_against_so()
|
||||||
|
|
||||||
def validate_warehouse(self):
|
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]:
|
for w in [self.doc.fg_warehouse, self.doc.wip_warehouse]:
|
||||||
validate_warehouse_user(w)
|
|
||||||
validate_warehouse_company(w, self.doc.company)
|
validate_warehouse_company(w, self.doc.company)
|
||||||
|
|
||||||
def validate_production_order_against_so(self):
|
def validate_production_order_against_so(self):
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:16",
|
"creation": "2013-01-10 16:34:16",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-12-18 13:22:14",
|
"modified": "2013-12-20 19:24:16",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -29,11 +29,13 @@
|
|||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Production Order",
|
"parent": "Production Order",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Manufacturing User",
|
"role": "Manufacturing User",
|
||||||
@@ -251,6 +253,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
|
"ignore_restrictions": 1,
|
||||||
"label": "Amended From",
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "amended_from",
|
"oldfieldname": "amended_from",
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import unittest
|
import unittest
|
||||||
import webnotes
|
import webnotes
|
||||||
|
from webnotes.utils import cstr, getdate
|
||||||
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory
|
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
|
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 = make_stock_entry(pro_bean.doc.name, "Manufacture/Repack")
|
||||||
stock_entry = webnotes.bean(stock_entry)
|
stock_entry = webnotes.bean(stock_entry)
|
||||||
|
stock_entry.doc.fiscal_year = "_Test Fiscal Year 2013"
|
||||||
stock_entry.doc.fg_completed_qty = 4
|
stock_entry.doc.fg_completed_qty = 4
|
||||||
stock_entry.run_method("get_items")
|
stock_entry.run_method("get_items")
|
||||||
stock_entry.submit()
|
stock_entry.submit()
|
||||||
@@ -50,7 +51,7 @@ class TestProductionOrder(unittest.TestCase):
|
|||||||
|
|
||||||
stock_entry = make_stock_entry(pro_order, "Manufacture/Repack")
|
stock_entry = make_stock_entry(pro_order, "Manufacture/Repack")
|
||||||
stock_entry = webnotes.bean(stock_entry)
|
stock_entry = webnotes.bean(stock_entry)
|
||||||
|
stock_entry.doc.fiscal_year = "_Test Fiscal Year 2013"
|
||||||
stock_entry.doc.fg_completed_qty = 15
|
stock_entry.doc.fg_completed_qty = 15
|
||||||
stock_entry.run_method("get_items")
|
stock_entry.run_method("get_items")
|
||||||
stock_entry.insert()
|
stock_entry.insert()
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:49",
|
"creation": "2013-02-22 01:27:49",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-08 12:12:27",
|
"modified": "2013-12-20 19:23:25",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:49",
|
"creation": "2013-02-22 01:27:49",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-22 15:26:23",
|
"modified": "2013-12-20 19:23:25",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-21 12:03:47",
|
"creation": "2013-01-21 12:03:47",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-08 12:01:02",
|
"modified": "2013-12-20 19:23:25",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "jai@webnotestech.com"
|
"owner": "jai@webnotestech.com"
|
||||||
},
|
},
|
||||||
@@ -27,11 +27,13 @@
|
|||||||
{
|
{
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
|
"email": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "Production Planning Tool",
|
"parent": "Production Planning Tool",
|
||||||
"parentfield": "permissions",
|
"parentfield": "permissions",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 0,
|
"report": 0,
|
||||||
"role": "Manufacturing User",
|
"role": "Manufacturing User",
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user