Merge pull request #30243 from akurungadam/jc-fix

fix: Job Card sub operations status and list view
This commit is contained in:
rohitwaghchaure
2022-03-15 15:20:56 +05:30
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -48,7 +48,7 @@ class JobCard(Document):
self.validate_work_order()
def set_sub_operations(self):
if self.operation:
if not self.sub_operations and self.operation:
self.sub_operations = []
for row in frappe.get_all('Sub Operation',
filters = {'parent': self.operation}, fields=['operation', 'idx'], order_by='idx'):

View File

@@ -1,4 +1,5 @@
frappe.listview_settings['Job Card'] = {
has_indicator_for_draft: true,
get_indicator: function(doc) {
if (doc.status === "Work In Progress") {
return [__("Work In Progress"), "orange", "status,=,Work In Progress"];