mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
refactor: use fetch from property for qi template on job card
This commit is contained in:
@@ -410,6 +410,7 @@
|
|||||||
"print_hide": 1
|
"print_hide": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"fetch_from": "operation.quality_inspection_template",
|
||||||
"fieldname": "quality_inspection_template",
|
"fieldname": "quality_inspection_template",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Quality Inspection Template",
|
"label": "Quality Inspection Template",
|
||||||
@@ -418,7 +419,7 @@
|
|||||||
],
|
],
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-11-03 13:46:06.557348",
|
"modified": "2021-11-09 14:07:20.290306",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "Job Card",
|
"name": "Job Card",
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ class JobCard(Document):
|
|||||||
self.validate_sequence_id()
|
self.validate_sequence_id()
|
||||||
self.set_sub_operations()
|
self.set_sub_operations()
|
||||||
self.update_sub_operation_status()
|
self.update_sub_operation_status()
|
||||||
self.set_quality_inspection_template()
|
|
||||||
|
|
||||||
def set_sub_operations(self):
|
def set_sub_operations(self):
|
||||||
if self.operation:
|
if self.operation:
|
||||||
@@ -293,10 +292,6 @@ class JobCard(Document):
|
|||||||
row.completed_time = 0.0
|
row.completed_time = 0.0
|
||||||
row.completed_qty = 0.0
|
row.completed_qty = 0.0
|
||||||
|
|
||||||
def set_quality_inspection_template(self):
|
|
||||||
qi_template = frappe.db.get_value('Operation', self.operation, 'quality_inspection_template')
|
|
||||||
self.quality_inspection_template = qi_template
|
|
||||||
|
|
||||||
def update_time_logs(self, row):
|
def update_time_logs(self, row):
|
||||||
self.append("time_logs", {
|
self.append("time_logs", {
|
||||||
"from_time": row.planned_start_time,
|
"from_time": row.planned_start_time,
|
||||||
|
|||||||
Reference in New Issue
Block a user