fixes to permission manager / user property setter

This commit is contained in:
Rushabh Mehta 2013-01-02 15:29:37 +05:30
parent 3ee4f9a90e
commit d4872483e4
3 changed files with 30 additions and 11 deletions

View File

@ -52,11 +52,11 @@ cur_frm.cscript.is_opening = function(doc, cdt, cdn) {
}
cur_frm.fields_dict['entries'].grid.get_field('account').get_query = function(doc) {
return "SELECT `tabAccount`.name FROM `tabAccount` WHERE `tabAccount`.company='"+doc.company+"' AND tabAccount.group_or_ledger = 'Ledger' AND tabAccount.docstatus != 2 AND `tabAccount`.%(key)s LIKE '%s' ORDER BY `tabAccount`.name DESC LIMIT 50";
return "SELECT `tabAccount`.name, `tabAccount`.parent_account FROM `tabAccount` WHERE `tabAccount`.company='"+doc.company+"' AND tabAccount.group_or_ledger = 'Ledger' AND tabAccount.docstatus != 2 AND `tabAccount`.%(key)s LIKE '%s' ORDER BY `tabAccount`.name DESC LIMIT 50";
}
cur_frm.fields_dict["entries"].grid.get_field("cost_center").get_query = function(doc, cdt, cdn) {
return 'SELECT `tabCost Center`.`name` FROM `tabCost Center` WHERE `tabCost Center`.`company_name` = "' +doc.company+'" AND `tabCost Center`.%(key)s LIKE "%s" AND `tabCost Center`.`group_or_ledger` = "Ledger" AND `tabCost Center`.docstatus != 2 ORDER BY `tabCost Center`.`name` ASC LIMIT 50';
return 'SELECT `tabCost Center`.`name`, `tabCost Center`.parent_cost_center FROM `tabCost Center` WHERE `tabCost Center`.`company_name` = "' +doc.company+'" AND `tabCost Center`.%(key)s LIKE "%s" AND `tabCost Center`.`group_or_ledger` = "Ledger" AND `tabCost Center`.docstatus != 2 ORDER BY `tabCost Center`.`name` ASC LIMIT 50';
}
// Restrict Voucher based on Account

View File

@ -4,7 +4,7 @@
"docstatus": 0,
"creation": "2012-10-29 14:30:00",
"modified_by": "Administrator",
"modified": "2012-12-24 10:46:06"
"modified": "2013-01-02 12:40:26"
},
{
"autoname": "TASK.#####",
@ -37,6 +37,7 @@
"doctype": "DocType"
},
{
"print_width": "50%",
"oldfieldtype": "Section Break",
"doctype": "DocField",
"label": "Task Details",
@ -76,6 +77,7 @@
"in_filter": 1
},
{
"print_width": "50%",
"oldfieldtype": "Column Break",
"doctype": "DocField",
"width": "50%",
@ -121,6 +123,7 @@
"options": "Simple"
},
{
"print_width": "300px",
"oldfieldtype": "Text Editor",
"doctype": "DocField",
"label": "Details",
@ -138,6 +141,7 @@
"fieldtype": "Section Break"
},
{
"print_width": "50%",
"oldfieldtype": "Column Break",
"doctype": "DocField",
"label": "Expected",
@ -163,6 +167,7 @@
"fieldtype": "Currency"
},
{
"print_width": "50%",
"oldfieldtype": "Column Break",
"doctype": "DocField",
"label": "Actual",
@ -216,7 +221,7 @@
"fieldname": "review_date",
"fieldtype": "Date",
"depends_on": "eval:doc.status == \"Closed\" || doc.status == \"Pending Review\"",
"hidden": 1
"hidden": 0
},
{
"oldfieldtype": "Date",
@ -226,7 +231,7 @@
"fieldname": "closing_date",
"fieldtype": "Date",
"depends_on": "eval:doc.status == \"Closed\"",
"hidden": 1
"hidden": 0
},
{
"print_hide": 1,
@ -245,7 +250,11 @@
"permlevel": 0
},
{
"amend": 0,
"create": 0,
"doctype": "DocPerm",
"submit": 0,
"cancel": 0,
"permlevel": 1
}
]

View File

@ -2,11 +2,12 @@
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-11-30 18:13:54",
"creation": "2012-12-03 10:31:04",
"modified_by": "Administrator",
"modified": "2012-12-03 09:33:28"
"modified": "2013-01-02 12:46:48"
},
{
"istable": 1,
"autoname": "TSD.#####",
"name": "__common__",
"doctype": "DocType",
@ -24,6 +25,7 @@
"doctype": "DocType"
},
{
"print_width": "160px",
"oldfieldtype": "Time",
"doctype": "DocField",
"label": "Actual Start Time",
@ -35,6 +37,7 @@
"permlevel": 0
},
{
"print_width": "160px",
"oldfieldtype": "Time",
"doctype": "DocField",
"label": "Actual End Time",
@ -46,17 +49,19 @@
"permlevel": 0
},
{
"print_width": "200px",
"permlevel": 0,
"search_index": 0,
"doctype": "DocField",
"label": "Activity Type",
"width": "200px",
"options": "Activity Type",
"fieldname": "activity_type",
"fieldtype": "Link",
"reqd": 1,
"permlevel": 0
"options": "Activity Type"
},
{
"print_width": "200px",
"oldfieldtype": "Text",
"doctype": "DocField",
"label": "Additional Info",
@ -67,6 +72,7 @@
"permlevel": 0
},
{
"print_width": "100px",
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Total Hours (Actual)",
@ -77,6 +83,7 @@
"permlevel": 1
},
{
"print_width": "150px",
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Customer Name",
@ -88,6 +95,7 @@
"permlevel": 0
},
{
"print_width": "150px",
"permlevel": 0,
"oldfieldtype": "Link",
"doctype": "DocField",
@ -102,19 +110,21 @@
"in_filter": 1
},
{
"print_width": "150px",
"permlevel": 0,
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Task Id",
"oldfieldname": "task_id",
"width": "150px",
"options": "Task",
"fieldname": "task_id",
"fieldtype": "Link",
"search_index": 1,
"permlevel": 0,
"options": "Task",
"in_filter": 1
},
{
"print_width": "250px",
"oldfieldtype": "Link",
"doctype": "DocField",
"label": "Task Name",