mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-18 02:55:20 +00:00
Table Field Renaming: code replace, JV and budget distribution renamed
This commit is contained in:
@@ -31,9 +31,9 @@ class Project(Document):
|
||||
self.update_milestones_completed()
|
||||
|
||||
def update_milestones_completed(self):
|
||||
if self.project_milestones:
|
||||
completed = filter(lambda x: x.status=="Completed", self.project_milestones)
|
||||
self.percent_milestones_completed = len(completed) * 100 / len(self.project_milestones)
|
||||
if self.milestones:
|
||||
completed = filter(lambda x: x.status=="Completed", self.milestones)
|
||||
self.percent_milestones_completed = len(completed) * 100 / len(self.milestones)
|
||||
|
||||
def on_update(self):
|
||||
self.add_calendar_event()
|
||||
@@ -53,7 +53,7 @@ class Project(Document):
|
||||
delete_events(self.doctype, self.name)
|
||||
|
||||
# add events
|
||||
for milestone in self.get("project_milestones"):
|
||||
for milestone in self.get("milestones"):
|
||||
if milestone.milestone_date:
|
||||
description = (milestone.milestone or "Milestone") + " for " + self.name
|
||||
frappe.get_doc({
|
||||
|
||||
@@ -52,7 +52,7 @@ $.extend(cur_frm.cscript, {
|
||||
var operations = [];
|
||||
frappe.model.with_doc("Production Order", doc.production_order, function(pro) {
|
||||
doc = frappe.get_doc("Production Order",pro);
|
||||
$.each(doc.production_order_operations , function(i, row){
|
||||
$.each(doc.operations , function(i, row){
|
||||
operations[i] = (i+1) +". "+ row.operation;
|
||||
});
|
||||
frappe.meta.get_docfield("Time Log", "operation", me.frm.doc.name).options = "\n" + operations.join("\n");
|
||||
|
||||
@@ -32,7 +32,7 @@ frappe.listview_settings['Time Log'] = {
|
||||
var tlb = frappe.model.get_new_doc("Time Log Batch");
|
||||
$.each(selected, function(i, d) {
|
||||
var detail = frappe.model.get_new_doc("Time Log Batch Detail", tlb,
|
||||
"time_log_batch_details");
|
||||
"time_logs");
|
||||
|
||||
$.extend(detail, {
|
||||
"time_log": d.name,
|
||||
|
||||
@@ -43,10 +43,10 @@ def create_time_log_batch(time_log):
|
||||
tlb = frappe.get_doc({
|
||||
"doctype": "Time Log Batch",
|
||||
"rate": "500",
|
||||
"time_log_batch_details": [
|
||||
"time_logs": [
|
||||
{
|
||||
"doctype": "Time Log Batch Detail",
|
||||
"parentfield": "time_log_batch_details",
|
||||
"parentfield": "time_logs",
|
||||
"parenttype": "Time Log Batch",
|
||||
"time_log": time_log
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ cur_frm.add_fetch("time_log", "activity_type", "activity_type");
|
||||
cur_frm.add_fetch("time_log", "owner", "created_by");
|
||||
cur_frm.add_fetch("time_log", "hours", "hours");
|
||||
|
||||
cur_frm.set_query("time_log", "time_log_batch_details", function(doc) {
|
||||
cur_frm.set_query("time_log", "time_logs", function(doc) {
|
||||
return {
|
||||
query: "erpnext.projects.utils.get_time_log_list",
|
||||
filters: {
|
||||
|
||||
@@ -15,7 +15,7 @@ class TimeLogBatch(Document):
|
||||
def validate(self):
|
||||
self.set_status()
|
||||
self.total_hours = 0.0
|
||||
for d in self.get("time_log_batch_details"):
|
||||
for d in self.get("time_logs"):
|
||||
tl = frappe.get_doc("Time Log", d.time_log)
|
||||
self.update_time_log_values(d, tl)
|
||||
self.validate_time_log_is_submitted(tl)
|
||||
@@ -53,7 +53,7 @@ class TimeLogBatch(Document):
|
||||
|
||||
def update_status(self, time_log_batch):
|
||||
self.set_status()
|
||||
for d in self.get("time_log_batch_details"):
|
||||
for d in self.get("time_logs"):
|
||||
tl = frappe.get_doc("Time Log", d.time_log)
|
||||
tl.time_log_batch = time_log_batch
|
||||
tl.sales_invoice = self.sales_invoice
|
||||
|
||||
Reference in New Issue
Block a user