make time log button in Production order operations fixed

show time logs button made available for compleated operations
This commit is contained in:
Neil Trini Lasrado 2015-04-01 17:59:01 +05:30
parent 8d5d5cc0a7
commit 5ab7d930b6
2 changed files with 6 additions and 4 deletions

View File

@ -204,12 +204,13 @@ $.extend(cur_frm.cscript, {
method:"erpnext.manufacturing.doctype.production_order.production_order.make_time_log",
args: {
"name": doc.name,
"operation": child.idx + ". " + child.operation,
"operation": child.operation,
"from_time": child.planned_start_time,
"to_time": child.planned_end_time,
"project": doc.project,
"workstation": child.workstation,
"qty": flt(doc.qty) - flt(child.completed_qty)
"qty": flt(doc.qty) - flt(child.completed_qty),
"operation_id": child.name
},
callback: function(r) {
var doclist = frappe.model.sync(r.message);

View File

@ -126,7 +126,7 @@
},
{
"allow_on_submit": 1,
"depends_on": "eval:(doc.docstatus==1 && doc.status!=\"Completed\")",
"depends_on": "eval:(doc.docstatus==1)",
"fieldname": "show_time_logs",
"fieldtype": "Button",
"label": "Show Time Logs",
@ -277,6 +277,7 @@
"read_only": 1
},
{
"allow_on_submit": 1,
"depends_on": "eval:(doc.docstatus==1 && doc.status!=\"Completed\")",
"fieldname": "make_time_log",
"fieldtype": "Button",
@ -292,7 +293,7 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-03-24 07:02:54.203235",
"modified": "2015-04-01 08:23:58.556092",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Order Operation",