diff --git a/aumms/aumms_manufacturing/doctype/customer_jewellery_order_detail/customer_jewellery_order_detail.json b/aumms/aumms_manufacturing/doctype/customer_jewellery_order_detail/customer_jewellery_order_detail.json index ca1779e..7cb20cc 100644 --- a/aumms/aumms_manufacturing/doctype/customer_jewellery_order_detail/customer_jewellery_order_detail.json +++ b/aumms/aumms_manufacturing/doctype/customer_jewellery_order_detail/customer_jewellery_order_detail.json @@ -57,7 +57,8 @@ "fieldname": "design", "fieldtype": "Attach", "in_list_view": 1, - "label": "Design" + "label": "Design", + "reqd": 1 }, { "fieldname": "purity", @@ -136,7 +137,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-05-27 09:55:08.735772", + "modified": "2024-07-03 15:06:17.196932", "modified_by": "Administrator", "module": "AuMMS Manufacturing", "name": "Customer Jewellery Order Detail", diff --git a/aumms/aumms_manufacturing/doctype/jewellery_job_card/jewellery_job_card.js b/aumms/aumms_manufacturing/doctype/jewellery_job_card/jewellery_job_card.js index 1e6c539..dc32110 100644 --- a/aumms/aumms_manufacturing/doctype/jewellery_job_card/jewellery_job_card.js +++ b/aumms/aumms_manufacturing/doctype/jewellery_job_card/jewellery_job_card.js @@ -1,58 +1,70 @@ -// Copyright (c) 2024, efeone and contributors -// For license information, please see license.txt - frappe.ui.form.on("Jewellery Job Card", { - refresh: function(frm){ + refresh: function(frm) { create_custom_buttons(frm); calculate_total_weight(frm); + + // Remove 'Start' button if the document is submitted if (frm.doc.docstatus === 1) { frm.remove_custom_button('Start'); - } + } frm.set_df_property("duration", "read_only", 1); - frm.set_df_property("job_time", "read_only",frm.doc.__islocal ? 0 : 1); - }, + frm.set_df_property("job_time", "read_only", frm.doc.__islocal ? 0 : 1); + + // if (frm.doc.status === ["Open", "Processing", "Hold"]) { + // frm.page.clear_primary_action(); + // } + // }, + if (["Open", "Processing", "Hold"].includes(frm.doc.status)) { + frm.disable_save(); +} +}, onload: function(frm) { frm.get_field('item_details').grid.cannot_add_rows = true; } }); -let create_custom_buttons = function(frm){ - if (frm.doc.status == "Open") { +let create_custom_buttons = function(frm) { + // Clear existing custom buttons to avoid duplicates + frm.clear_custom_buttons(); + + // Add buttons based on the status of the document + if (frm.doc.status === "Open") { frm.add_custom_button('Start', () => { frm.set_value("status", "Processing"); updateStartTime(frm); - frm.save(); - frm.page.set_primary_action(__("Pause"), () => { + frm.save().then(() => { create_custom_buttons(frm); - }, "btn-primary"); + }); }).addClass("btn-primary"); - } else if (frm.doc.status == "Processing") { - frm.add_custom_button(__("Pause"), () => { + } else if (frm.doc.status === "Processing") { + frm.add_custom_button('Pause', () => { frm.set_value("status", "Hold"); updateEndTime(frm); calculateDuration(frm); - frm.save(); - create_custom_buttons(frm); + frm.save().then(() => { + create_custom_buttons(frm); + }); }).addClass("btn-primary"); - frm.add_custom_button(__("Done"), () => { + frm.add_custom_button('Done', () => { frm.set_value("status", "Complete"); updateEndTime(frm); calculateDuration(frm); - frm.save(); - create_custom_buttons(frm); + frm.save().then(() => { + create_custom_buttons(frm); + }); }).addClass("btn-primary"); - } else if (frm.doc.status == "Hold") { + } else if (frm.doc.status === "Hold") { frm.add_custom_button('Start', () => { frm.set_value("status", "Processing"); updateStartTime(frm); - frm.save(); - create_custom_buttons(frm); + frm.save().then(() => { + create_custom_buttons(frm); + }); }).addClass("btn-primary"); } } - function updateStartTime(frm) { const currentTime = frappe.datetime.now_datetime(); let row = frappe.model.add_child(frm.doc, 'Job Time', 'job_time'); @@ -81,46 +93,45 @@ function calculateDuration(frm) { } frappe.ui.form.on("Job Time", { - duration : function(frm, cdt, cdn){ - let total_duration = 0 - if(frm.doc.job_time){ - frm.doc.job_time.forEach(function(d){ - if(d.duration){ - total_duration += d.duration || 0 + duration: function(frm, cdt, cdn) { + let total_duration = 0; + if (frm.doc.job_time) { + frm.doc.job_time.forEach(function(d) { + if (d.duration) { + total_duration += d.duration || 0; } }); } - frm.set_value('duration',total_duration); + frm.set_value('duration', total_duration); }, - job_time_remove : function(frm, cdt, cdn){ - let total_duration = 0 - if(frm.doc.job_time){ - frm.doc.job_time.forEach(function(d){ - if(d.duration){ - total_duration += d.duration || 0 + job_time_remove: function(frm, cdt, cdn) { + let total_duration = 0; + if (frm.doc.job_time) { + frm.doc.job_time.forEach(function(d) { + if (d.duration) { + total_duration += d.duration || 0; } }); } - frm.set_value('duration',total_duration); + frm.set_value('duration', total_duration); } }); -frappe.ui.form.on('Raw Materiel Item',{ - item_details_add : function(frm, cdt, cdn){ +frappe.ui.form.on('Raw Materiel Item', { + item_details_add: function(frm, cdt, cdn) { calculate_total_weight(frm); }, - item_details_remove : function(frm, cdt, cdn){ + item_details_remove: function(frm, cdt, cdn) { calculate_total_weight(frm); } - }); -function calculate_total_weight(frm, cdt, cdn){ - let total_weight = 0 - if(frm.doc.item_details){ - frm.doc.item_details.forEach(function(d){ +function calculate_total_weight(frm) { + let total_weight = 0; + if (frm.doc.item_details) { + frm.doc.item_details.forEach(function(d) { total_weight += d.weight || 0; }); } frm.set_value('weight', total_weight); -}; +} diff --git a/aumms/aumms_manufacturing/doctype/jewellery_job_card/jewellery_job_card.py b/aumms/aumms_manufacturing/doctype/jewellery_job_card/jewellery_job_card.py index c54bfc6..fdc97ca 100644 --- a/aumms/aumms_manufacturing/doctype/jewellery_job_card/jewellery_job_card.py +++ b/aumms/aumms_manufacturing/doctype/jewellery_job_card/jewellery_job_card.py @@ -25,8 +25,7 @@ def update_item_table(self): for item in raw_material_doc.items: self.append('item_details', { 'item': item.item, - 'quantity': item.required_quantity, - 'weight':item.required_weight + 'quantity': item.quantity, }) def mark_as_completed(self, completed): diff --git a/aumms/aumms_manufacturing/doctype/manufacturing_request/manufacturing_request.js b/aumms/aumms_manufacturing/doctype/manufacturing_request/manufacturing_request.js index 41a6cec..79d1af5 100644 --- a/aumms/aumms_manufacturing/doctype/manufacturing_request/manufacturing_request.js +++ b/aumms/aumms_manufacturing/doctype/manufacturing_request/manufacturing_request.js @@ -1,92 +1,82 @@ -// Copyright (c) 2024, efeone and contributors -// For license information, please see license.txt - frappe.ui.form.on("Manufacturing Request", { refresh: function(frm) { if(!frm.is_new){ hide_add_row_button(frm); } - frm.set_query('uom',()=>{ - return { - filters: { - "is_purity_uom": 1 - } - } - }); - frm.set_query('smith', 'manufacturing_stages', () =>{ - return{ - filters :{ - "designation" : "Smith" + frm.set_query('uom', () => { + return { + filters: { + "is_purity_uom": 1 + } + } + }); + frm.set_query('smith', 'manufacturing_stages', () => { + return { + filters: { + "designation": "Smith" } } }); - marked_as_previous_stage_completed(frm) - if(!frm.doc.product) - { - frm.toggle_display("product",false); + marked_as_previous_stage_completed(frm); + if (!frm.doc.product) { + frm.toggle_display("product", false); } - if(!frm.doc.weight && frm.doc.weight <= 0) - { - frm.toggle_display("weight",false); + if (!frm.doc.weight && frm.doc.weight <= 0) { + frm.toggle_display("weight", false); } - }, - setup: function(frm) { - marked_as_previous_stage_completed(frm) - }, - onload: function(frm) { - hide_add_row_button(frm); - }, -}); - -function marked_as_previous_stage_completed(frm) { - if (frm.doc.manufacturing_stages && frm.doc.manufacturing_stages.length > 0) { - frm.doc.manufacturing_stages[0].previous_stage_completed = 1; - frm.doc.manufacturing_stages[0].is_first_stage = 1; - const last_index = frm.doc.manufacturing_stages.length - 1; - frm.doc.manufacturing_stages[last_index].is_last_stage = 1; - refresh_field('manufacturing_stages'); } -} - -function hide_add_row_button(frm) { - if (frm.doc.manufacturing_stages && frm.fields_dict.manufacturing_stages.grid) { - setTimeout(() => { - frm.fields_dict.manufacturing_stages.grid.wrapper.find('.grid-add-row').hide(); - frm.fields_dict.manufacturing_stages.grid.wrapper.find('.grid-add-multiple-rows').hide(); - }, 1000); - } -} - +}); frappe.ui.form.on("Manufacturing Request Stage", { - create_raw_material_bundle: function(frm, cdt , cdn) { + create_raw_material_bundle: function(frm, cdt, cdn) { let row = locals[cdt][cdn]; frappe.new_doc('Raw Material Bundle', { 'manufacturing_request': frm.doc.name, - 'stage' : row.manufacturing_stage, - 'manufacturing_stage' : row.name, - 'expected_execution_time' : row.required_time - }) + 'stage': row.manufacturing_stage, + 'manufacturing_stage': row.name, + 'expected_execution_time': row.required_time + }); }, + create_job_card: function(frm, cdt, cdn) { + let row = locals[cdt][cdn]; frm.call('create_jewellery_job_card', { 'stage_row_id': cdn }).then(r => { - frm.refresh_fields(); + if (r.message && r.message.job_card_created) { + frappe.model.set_value(cdt, cdn, 'job_card_created', 1); + frappe.model.set_value(cdt, cdn, 'job_card', r.message.job_card); + frm.refresh_field(cdt); + // Hide the create job card button for this row + frm.fields_dict[`${cdn}-create_job_card`].df.hidden = 1; + } }); }, + + view_job_card: function(frm, cdt, cdn) { + let row = locals[cdt][cdn]; + if (row.job_card_created) { + frappe.set_route("Form", "Jewellery Job Card", row.job_card); + } + }, + previous_stage_completed: function(frm, cdt, cdn) { - let row = locals[cdt][cdn] + let row = locals[cdt][cdn]; if (row.previous_stage_completed) { - update_previous_stage(frm, row.idx).then(previousStage => { - row.previous_stage = previousStage; - frm.refresh_field('manufacturing_stages'); + frm.call('update_previous_stage', { 'idx': row.idx }).then(r => { + if (r.message) { + row.previous_stage = r.message; + frm.refresh_field('manufacturing_stages'); + } }); - update_previous_stage_weight(frm, row.idx).then(previousStageWeight => { - row.previous_stage_weight = previousStageWeight; - frm.refresh_field('manufacturing_stages'); + frm.call('update_previous_stage_weight', { 'idx': row.idx }).then(r => { + if (r.message) { + row.previous_stage_weight = r.message; + frm.refresh_field('manufacturing_stages'); + } }); } }, + raw_material_available: function(frm, cdt, cdn) { let d = frm.doc.manufacturing_stages; let current_index = -1; @@ -103,17 +93,5 @@ frappe.ui.form.on("Manufacturing Request Stage", { frm.refresh_field('manufacturing_stages'); } } - }, + } }); - -function update_previous_stage(frm, idx) { - return frm.call('update_previous_stage', { idx: idx }).then(r => { - return r.message; - }); -} - -function update_previous_stage_weight(frm, idx) { - return frm.call('update_previous_stage_weight', { idx: idx }).then(r => { - return r.message; - }); -} diff --git a/aumms/aumms_manufacturing/doctype/manufacturing_request/manufacturing_request.json b/aumms/aumms_manufacturing/doctype/manufacturing_request/manufacturing_request.json index 20cc542..d5b0a2c 100644 --- a/aumms/aumms_manufacturing/doctype/manufacturing_request/manufacturing_request.json +++ b/aumms/aumms_manufacturing/doctype/manufacturing_request/manufacturing_request.json @@ -139,8 +139,7 @@ "depends_on": "eval:doc.request_from == \"Jewellery Order\"", "fieldname": "finished", "fieldtype": "Check", - "label": "Finished", - "read_only": 1 + "label": "Finished" }, { "fieldname": "column_break_1l2l", @@ -235,7 +234,7 @@ "link_fieldname": "manufacturing_request" } ], - "modified": "2024-05-27 10:44:47.602828", + "modified": "2024-07-05 17:06:53.887977", "modified_by": "Administrator", "module": "AuMMS Manufacturing", "name": "Manufacturing Request", diff --git a/aumms/aumms_manufacturing/doctype/manufacturing_request/manufacturing_request.py b/aumms/aumms_manufacturing/doctype/manufacturing_request/manufacturing_request.py index 93b74d9..cfcca01 100644 --- a/aumms/aumms_manufacturing/doctype/manufacturing_request/manufacturing_request.py +++ b/aumms/aumms_manufacturing/doctype/manufacturing_request/manufacturing_request.py @@ -1,5 +1,3 @@ -# Copyright (c) 2024, efeone and contributors -# For license information, please see license.txt import frappe from frappe import _ from frappe.model.document import Document @@ -10,9 +8,9 @@ class ManufacturingRequest(Document): def autoname(self): if self.request_from == "Jewellery Order": - self.title = f"{self.purity} {self.expected_weight} {self.uom} {self.type} {self.category}" - elif self.request_from == "Raw Material Request" : - self.title = f"{self.purity} {self.expected_weight} {self.uom} {self.type}" + self.title = f"{self.purity} {self.expected_weight} {self.uom} {self.type} {self.category}" + elif self.request_from == "Raw Material Request": + self.title = f"{self.purity} {self.expected_weight} {self.uom} {self.type}" def before_insert(self): self.update_manufacturing_stages() @@ -25,10 +23,10 @@ def on_update_after_submit(self): def on_submit(self): self.mark_as_finished_in_jewellery_order() - self.manufacturing_request_finished(finished = 1) + self.manufacturing_request_finished(finished=1) def on_cancel(self): - self.manufacturing_request_finished(finished = 0) + self.manufacturing_request_finished(finished=0) def update_manufacturing_stages(self): if self.category: @@ -48,9 +46,8 @@ def send_notification_to_owner(self): for_user = self.owner create_notification_log(self.doctype, self.name, for_user, subject, content, 'Alert') - def mark_as_finished(self): - finished=1 + finished = 1 for stage in self.manufacturing_stages: if not stage.completed: finished = 0 @@ -77,7 +74,6 @@ def manufacturing_request_finished(self, finished): if frappe.db.exists('Jewellery Order', self.jewellery_order): jewellery_order = frappe.get_doc('Jewellery Order', self.jewellery_order) if jewellery_order: - updated = False for item in jewellery_order.jewellery_order_items: if item.weight == self.expected_weight: item.manufacturing_request_finished = finished @@ -141,7 +137,7 @@ def create_jewellery_job_card(self, stage_row_id): new_jewellery_job_card.is_last_stage = 1 new_jewellery_job_card.flags.ignore_mandatory = True new_jewellery_job_card.save(ignore_permissions=True) - frappe.db.set_value('Jewellery Job Card', self.manufacturing_request, 'product',self.product) + frappe.db.set_value('Jewellery Job Card', self.manufacturing_request, 'product', self.product) frappe.db.set_value(stage.doctype, stage.name, 'job_card_created', 1) if smith_email: add_assignment({ @@ -150,5 +146,9 @@ def create_jewellery_job_card(self, stage_row_id): "assign_to": [smith_email] }) frappe.msgprint("Jewellery Job Card Created.", indicator="green", alert=1) + return { + "job_card_created": 1, + "job_card": new_jewellery_job_card.name + } else: frappe.throw(_("Job card already exists for this stage")) diff --git a/aumms/aumms_manufacturing/doctype/manufacturing_request_stage/manufacturing_request_stage.json b/aumms/aumms_manufacturing/doctype/manufacturing_request_stage/manufacturing_request_stage.json index 574de97..d8bf6ff 100644 --- a/aumms/aumms_manufacturing/doctype/manufacturing_request_stage/manufacturing_request_stage.json +++ b/aumms/aumms_manufacturing/doctype/manufacturing_request_stage/manufacturing_request_stage.json @@ -22,6 +22,7 @@ "workstation", "create_job_card", "job_card_created", + "view_job_card", "completed", "weight", "previous_stage_product", @@ -80,7 +81,7 @@ "read_only": 1 }, { - "depends_on": "eval:(doc.raw_material_available == 1 || (doc.previous_stage_completed == 1 && doc.is_raw_material_from_previous_stage_only == 1))", + "depends_on": "eval:((doc.raw_material_available==1 && doc.job_card_created == 0) || (doc.previous_stage_completed == 1 && doc.is_raw_material_from_previous_stage_only == 1 && doc.job_card_created == 0))", "fieldname": "create_job_card", "fieldtype": "Button", "label": "Create Job Card" @@ -186,12 +187,18 @@ "fieldtype": "Check", "hidden": 1, "label": "Is Last Stage" + }, + { + "depends_on": "eval:(doc.job_card_created == 1)", + "fieldname": "view_job_card", + "fieldtype": "Button", + "label": "View Job Card" } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-05-22 15:05:03.943903", + "modified": "2024-07-13 15:25:08.008254", "modified_by": "Administrator", "module": "AuMMS Manufacturing", "name": "Manufacturing Request Stage", diff --git a/aumms/aumms_manufacturing/doctype/raw_material_bundle/raw_material_bundle.js b/aumms/aumms_manufacturing/doctype/raw_material_bundle/raw_material_bundle.js index ac80866..b338bbd 100644 --- a/aumms/aumms_manufacturing/doctype/raw_material_bundle/raw_material_bundle.js +++ b/aumms/aumms_manufacturing/doctype/raw_material_bundle/raw_material_bundle.js @@ -1,30 +1,96 @@ -// Copyright (c) 2024, efeone and contributors -// For license information, please see license.txt - frappe.ui.form.on("Raw Material Bundle", { - refresh: function(frm) { - frm.set_query("item", "items", () => { - return { - filters: { - "custom_is_raw_material": 1 + refresh: function(frm) { + frm.set_query("item", "items", () => { + return { + filters: { + "custom_is_raw_material": 1 + } + }; + }); + }, + on_submit: function(frm) { + if (!frm.doc.raw_material_available) { + frm.add_custom_button('Create Raw Material Request', () => { + frappe.call({ + method: 'aumms.aumms_manufacturing.doctype.raw_material_bundle.raw_material_bundle.create_raw_material_request', + args: { + docname: frm.doc.name + }, + freeze: true, + callback: (r) => { + frm.reload_doc(); + } + }); + }); } - }; - }); - }, - on_submit: function(frm) { - if (!frm.doc.raw_material_available) { - frm.add_custom_button('Create Raw Material Request', () => { - frappe.call({ - method: 'aumms.aumms_manufacturing.doctype.raw_material_bundle.raw_material_bundle.create_raw_material_request', - args: { - docname: frm.doc.name - }, - freeze: true, - callback: (r) => { - frm.reload_doc(); - } - }); - }); } - } }); + +// frappe.ui.form.on("Raw Material Details", { +// purity_of_required_item: function(frm, cdt, cdn) { +// let d = locals[cdt][cdn]; +// if (d.required_purity_percentage < d.available_purity_percentage) { +// let alloy_weight = ((d.required_purity_percentage / d.available_purity_percentage) * d.available_weight); +// frappe.model.set_value(cdt, cdn, 'alloy_weight', alloy_weight); +// } +// }, +// purity_of_available_item: function(frm, cdt, cdn) { +// let d = locals[cdt][cdn]; +// if (d.required_purity_percentage < d.available_purity_percentage) { +// let alloy_weight = ((d.required_purity_percentage / d.available_purity_percentage) * d.available_weight); +// frappe.model.set_value(cdt, cdn, 'alloy_weight', alloy_weight); +// +// let row = frappe.model.add_child(frm.doc, 'items'); +// row.item = d.alloy_name; +// row.alloy_weight = d.alloy_weight; +// row.alloy_name = d.alloy_name; +// row.uom = d.uom; +// row.quantity = d.required_quantity; +// frm.refresh_field('items'); +// } +// }, +// // alloy_details: function(frm, cdt, cdn) { +// // let d = locals[cdt][cdn]; +// // let alloy_weight = d.alloy_weight; +// // let uom = d.uom; +// // let alloy_name = d.item; +// // let dialog = new frappe.ui.Dialog({ +// // title: 'Alloy Details', +// // fields: [ +// // { +// // label: 'UOM', +// // fieldname: 'uom', +// // fieldtype: 'Link', +// // options: 'UOM', +// // default: uom, +// // reqd: 1 +// // }, +// // { +// // label: 'Alloy Weight', +// // fieldname: 'alloy_weight', +// // fieldtype: 'Float', +// // default: alloy_weight +// // }, +// // { +// // label: 'Alloy Name', +// // fieldname: 'alloy_name', +// // fieldtype: 'Data', +// // default: alloy_name +// // } +// // ], +// // primary_action_label: 'Add to Item', +// // primary_action: function(values) { +// // let child = locals[cdt][cdn]; +// // if (!child) { +// // child = frm.add_child('items'); +// // } +// // child.uom = values.uom; +// // child.alloy_weight = values.alloy_weight; +// // child.alloy_name = values.alloy_name; +// // frm.refresh_field('items'); +// // dialog.hide(); +// // } +// // }); +// // dialog.show(); +// // } +// }); diff --git a/aumms/aumms_manufacturing/doctype/raw_material_details/raw_material_details.json b/aumms/aumms_manufacturing/doctype/raw_material_details/raw_material_details.json index 947990a..ddc3f97 100644 --- a/aumms/aumms_manufacturing/doctype/raw_material_details/raw_material_details.json +++ b/aumms/aumms_manufacturing/doctype/raw_material_details/raw_material_details.json @@ -9,17 +9,14 @@ "raw_material_id", "item", "warehouse", - "column_break_6dux", - "required_quantity", - "required_weight", + "item_type", + "uom", "available_quantity", - "available_weight" + "required_quantity", + "available_weight", + "required_weight" ], "fields": [ - { - "fieldname": "column_break_6dux", - "fieldtype": "Column Break" - }, { "fieldname": "raw_material_id", "fieldtype": "Data", @@ -40,40 +37,49 @@ "options": "Warehouse" }, { - "fieldname": "available_quantity", - "fieldtype": "Float", + "depends_on": "eval:doc.is_purity_item==0", + "fetch_from": "item.stock_uom", + "fieldname": "uom", + "fieldtype": "Link", "in_list_view": 1, - "label": "Available Quantity", - "precision": "2" + "label": "UOM", + "options": "UOM" }, { - "fetch_from": ".", - "fieldname": "required_quantity", - "fieldtype": "Float", + "fieldname": "item_type", + "fieldtype": "Link", "in_list_view": 1, - "label": "Required Quantity", - "precision": "2", - "reqd": 1 + "label": "Item Type", + "options": "Item Type" + }, + { + "fieldname": "available_weight", + "fieldtype": "Float", + "label": "Available Weight", + "precision": "2" }, { "fieldname": "required_weight", "fieldtype": "Float", - "in_list_view": 1, "label": "Required Weight", "precision": "2" }, { - "fieldname": "available_weight", - "fieldtype": "Float", + "fieldname": "required_quantity", + "fieldtype": "Int", + "label": "Required Quantity" + }, + { + "fieldname": "available_quantity", + "fieldtype": "Int", "in_list_view": 1, - "label": "Available Weight", - "precision": "2" + "label": "Available Quantity" } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-05-20 11:05:52.156554", + "modified": "2024-07-15 14:46:25.456238", "modified_by": "Administrator", "module": "AuMMS Manufacturing", "name": "Raw Material Details", diff --git a/aumms/fixtures/custom_field.json b/aumms/fixtures/custom_field.json index 28e3481..481c060 100644 --- a/aumms/fixtures/custom_field.json +++ b/aumms/fixtures/custom_field.json @@ -31,6 +31,7 @@ "is_virtual": 0, "label": "Is Purity UOM", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2023-01-05 10:33:35.446753", "module": null, @@ -86,6 +87,7 @@ "is_virtual": 0, "label": "Total Taxes and Charges (Company Currency)", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2024-02-07 22:15:11.279549", "module": null, @@ -141,6 +143,7 @@ "is_virtual": 0, "label": "Total Taxes and Charges", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2024-02-07 22:15:11.742343", "module": null, @@ -164,6 +167,174 @@ "unique": 0, "width": null }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": "eval:doc.is_purity_item", + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Item", + "fetch_from": "purity.purity_percentage", + "fetch_if_empty": 0, + "fieldname": "purity_percentage", + "fieldtype": "Percent", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "purity", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Purity Percentage", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2023-01-06 14:48:46.579229", + "module": null, + "name": "Item-purity_percentage", + "no_copy": 0, + "non_negative": 0, + "options": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 1, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": "0", + "depends_on": "has_stone", + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Item", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "stone_charge", + "fieldtype": "Currency", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "stone_weight", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Stone Charge", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2023-08-10 16:22:43.694341", + "module": null, + "name": "Item-stone_charge", + "no_copy": 0, + "non_negative": 0, + "options": null, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Item", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "custom_item_qr_code", + "fieldtype": "Image", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "item_qr", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Item QR Code", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2024-02-15 12:27:24.365547", + "module": null, + "name": "Item-custom_item_qr_code", + "no_copy": 0, + "non_negative": 0, + "options": "item_qr", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, { "allow_in_quick_entry": 0, "allow_on_submit": 0, @@ -196,6 +367,7 @@ "is_virtual": 0, "label": "Head of Department", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2023-10-20 15:16:08.680216", "module": null, @@ -251,6 +423,7 @@ "is_virtual": 0, "label": "Keep Metal Ledger", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2023-01-19 17:11:57.835012", "module": null, @@ -306,6 +479,7 @@ "is_virtual": 0, "label": "Is AuMMS Item Group", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2023-08-10 16:44:07.982502", "module": null, @@ -361,6 +535,7 @@ "is_virtual": 0, "label": "Assigned To", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2023-11-15 12:12:19.890413", "module": null, @@ -385,23 +560,23 @@ "width": null }, { - "allow_in_quick_entry": 1, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": "", + "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Item", - "fetch_from": "item_group.item_type", - "fetch_if_empty": 1, - "fieldname": "item_type", + "dt": "Job Card", + "fetch_from": "assigned_to.employee", + "fetch_if_empty": 0, + "fieldname": "assigned_employee", "fieldtype": "Link", - "hidden": 0, + "hidden": 1, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, @@ -411,24 +586,25 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "item_group", + "insert_after": "assigned_to", "is_system_generated": 0, "is_virtual": 0, - "label": "Item Type", + "label": "Assigned Employee", "length": 0, - "mandatory_depends_on": "", - "modified": "2023-01-06 16:49:20.501863", + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2023-11-15 12:32:11.204644", "module": null, - "name": "Item-item_type", + "name": "Job Card-assigned_employee", "no_copy": 0, "non_negative": 0, - "options": "Item Type", + "options": "Employee", "permlevel": 0, "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 0, + "read_only": 1, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -440,23 +616,23 @@ "width": null }, { - "allow_in_quick_entry": 0, + "allow_in_quick_entry": 1, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": null, + "depends_on": "", "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Job Card", - "fetch_from": "assigned_to.employee", - "fetch_if_empty": 0, - "fieldname": "assigned_employee", + "dt": "Item", + "fetch_from": "item_group.item_type", + "fetch_if_empty": 1, + "fieldname": "item_type", "fieldtype": "Link", - "hidden": 1, + "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, @@ -466,24 +642,25 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "assigned_to", + "insert_after": "item_group", "is_system_generated": 0, "is_virtual": 0, - "label": "Assigned Employee", + "label": "Item Type", "length": 0, - "mandatory_depends_on": null, - "modified": "2023-11-15 12:32:11.204644", + "link_filters": null, + "mandatory_depends_on": "", + "modified": "2023-01-06 16:49:20.501863", "module": null, - "name": "Job Card-assigned_employee", + "name": "Item-item_type", "no_copy": 0, "non_negative": 0, - "options": "Employee", + "options": "Item Type", "permlevel": 0, "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 1, + "read_only": 0, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -526,6 +703,7 @@ "is_virtual": 0, "label": "Item Type", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2023-01-05 15:09:57.352372", "module": null, @@ -581,6 +759,7 @@ "is_virtual": 0, "label": "Party Link", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2023-01-27 16:49:36.956964", "module": null, @@ -612,15 +791,15 @@ "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": "eval:doc.is_purity_item", + "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Item", - "fetch_from": "item_group.making_charge_based_on", - "fetch_if_empty": 1, - "fieldname": "making_charge_based_on", - "fieldtype": "Select", + "dt": "Employee", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "custom_warehouse", + "fieldtype": "Link", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -631,18 +810,19 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "stock_uom", + "insert_after": "employee_name", "is_system_generated": 0, "is_virtual": 0, - "label": "Making Charge Based On", + "label": "Warehouse", "length": 0, + "link_filters": null, "mandatory_depends_on": null, - "modified": "2023-01-05 17:32:05.643181", + "modified": "2024-04-29 14:36:36.781226", "module": null, - "name": "Item-making_charge_based_on", + "name": "Employee-custom_warehouse", "no_copy": 0, "non_negative": 0, - "options": "\nFixed\nPercentage", + "options": "Warehouse", "permlevel": 0, "precision": "", "print_hide": 0, @@ -655,7 +835,7 @@ "search_index": 0, "show_dashboard": 0, "sort_options": 0, - "translatable": 1, + "translatable": 0, "unique": 0, "width": null }, @@ -667,16 +847,16 @@ "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": null, + "depends_on": "", "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Employee", - "fetch_from": null, + "dt": "Item Group", + "fetch_from": "item_type.is_purity_item", "fetch_if_empty": 0, - "fieldname": "custom_warehouse", - "fieldtype": "Link", - "hidden": 0, + "fieldname": "is_purity_item", + "fieldtype": "Check", + "hidden": 1, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, @@ -686,24 +866,25 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "employee_name", + "insert_after": "item_type", "is_system_generated": 0, "is_virtual": 0, - "label": "Warehouse", + "label": "Is Purity Item", "length": 0, + "link_filters": null, "mandatory_depends_on": null, - "modified": "2024-04-29 14:36:36.781226", + "modified": "2023-01-31 12:41:20.505617", "module": null, - "name": "Employee-custom_warehouse", + "name": "Item Group-is_purity_item", "no_copy": 0, "non_negative": 0, - "options": "Warehouse", + "options": null, "permlevel": 0, "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 0, + "read_only": 1, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -722,16 +903,16 @@ "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": "", + "depends_on": "eval:doc.is_purity_item", "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Item Group", - "fetch_from": "item_type.is_purity_item", - "fetch_if_empty": 0, - "fieldname": "is_purity_item", - "fieldtype": "Check", - "hidden": 1, + "dt": "Item", + "fetch_from": "item_group.making_charge_based_on", + "fetch_if_empty": 1, + "fieldname": "making_charge_based_on", + "fieldtype": "Select", + "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, @@ -741,31 +922,32 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "item_type", + "insert_after": "stock_uom", "is_system_generated": 0, "is_virtual": 0, - "label": "Is Purity Item", + "label": "Making Charge Based On", "length": 0, + "link_filters": null, "mandatory_depends_on": null, - "modified": "2023-01-31 12:41:20.505617", + "modified": "2023-01-05 17:32:05.643181", "module": null, - "name": "Item Group-is_purity_item", + "name": "Item-making_charge_based_on", "no_copy": 0, "non_negative": 0, - "options": null, + "options": "\nFixed\nPercentage", "permlevel": 0, "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 1, + "read_only": 0, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, "search_index": 0, "show_dashboard": 0, "sort_options": 0, - "translatable": 0, + "translatable": 1, "unique": 0, "width": null }, @@ -801,6 +983,7 @@ "is_virtual": 0, "label": "Making Charge Based On", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2023-01-05 10:54:18.536026", "module": null, @@ -856,6 +1039,7 @@ "is_virtual": 0, "label": "Making Charge Percentage", "length": 0, + "link_filters": null, "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Percentage'", "modified": "2023-01-05 15:09:29.804481", "module": null, @@ -911,6 +1095,7 @@ "is_virtual": 0, "label": "Percentage", "length": 0, + "link_filters": null, "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Percentage'", "modified": "2023-01-05 11:41:02.132844", "module": null, @@ -966,6 +1151,7 @@ "is_virtual": 0, "label": "Making Charge", "length": 0, + "link_filters": null, "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Fixed'", "modified": "2023-01-06 11:28:22.995811", "module": null, @@ -1021,6 +1207,7 @@ "is_virtual": 0, "label": "Currency", "length": 0, + "link_filters": null, "mandatory_depends_on": "eval: doc.making_charge_based_on == 'Fixed'", "modified": "2023-01-05 12:43:08.976116", "module": null, @@ -1076,6 +1263,7 @@ "is_virtual": 0, "label": "Is Sales Item", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2023-01-11 15:57:23.780415", "module": null, @@ -1131,6 +1319,7 @@ "is_virtual": 0, "label": "Keep Metal Ledger", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2023-01-19 16:51:12.721967", "module": null, @@ -1186,6 +1375,7 @@ "is_virtual": 0, "label": "Is Purchase Item", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2023-01-11 15:57:25.254765", "module": null, @@ -1217,16 +1407,16 @@ "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": "eval:doc.is_purity_item", + "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Item", - "fetch_from": "purity.purity_percentage", + "dt": "Purchase Receipt", + "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "purity_percentage", - "fieldtype": "Percent", - "hidden": 0, + "fieldname": "create_invoice_on_submit", + "fieldtype": "Check", + "hidden": 1, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, @@ -1236,15 +1426,16 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "purity", + "insert_after": "keep_metal_ledger", "is_system_generated": 0, "is_virtual": 0, - "label": "Purity Percentage", + "label": "Create Invoice on Submit", "length": 0, + "link_filters": null, "mandatory_depends_on": null, - "modified": "2023-01-06 14:48:46.579229", + "modified": "2023-08-23 15:44:29.173542", "module": null, - "name": "Item-purity_percentage", + "name": "Purchase Receipt-create_invoice_on_submit", "no_copy": 0, "non_negative": 0, "options": null, @@ -1276,12 +1467,12 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Purchase Receipt", + "dt": "Item", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "create_invoice_on_submit", + "fieldname": "is_aumms_item", "fieldtype": "Check", - "hidden": 1, + "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, @@ -1291,15 +1482,16 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "keep_metal_ledger", + "insert_after": "disabled", "is_system_generated": 0, "is_virtual": 0, - "label": "Create Invoice on Submit", + "label": "Is AuMMS Item", "length": 0, + "link_filters": null, "mandatory_depends_on": null, - "modified": "2023-08-23 15:44:29.173542", + "modified": "2023-08-10 16:32:46.294462", "module": null, - "name": "Purchase Receipt-create_invoice_on_submit", + "name": "Item-is_aumms_item", "no_copy": 0, "non_negative": 0, "options": null, @@ -1351,6 +1543,7 @@ "is_virtual": 0, "label": "Assigned To", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2023-11-14 12:22:34.239256", "module": null, @@ -1406,6 +1599,7 @@ "is_virtual": 0, "label": "Item Type", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2023-01-11 12:31:08.595209", "module": null, @@ -1429,61 +1623,6 @@ "unique": 0, "width": null }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Work Order", - "fetch_from": "assigned_to.smith_name", - "fetch_if_empty": 1, - "fieldname": "smith_name", - "fieldtype": "Data", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "assigned_to", - "is_system_generated": 0, - "is_virtual": 0, - "label": "Smith Name", - "length": 0, - "mandatory_depends_on": null, - "modified": "2023-11-14 12:48:04.270472", - "module": null, - "name": "Work Order-smith_name", - "no_copy": 0, - "non_negative": 0, - "options": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, { "allow_in_quick_entry": 0, "allow_on_submit": 0, @@ -1499,7 +1638,7 @@ "dt": "Item", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "is_aumms_item", + "fieldname": "custom_is_raw_material", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -1511,15 +1650,16 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "disabled", + "insert_after": "is_aumms_item", "is_system_generated": 0, "is_virtual": 0, - "label": "Is AuMMS Item", + "label": "Is Raw Material", "length": 0, + "link_filters": null, "mandatory_depends_on": null, - "modified": "2023-08-10 16:32:46.294462", + "modified": "2024-03-20 12:16:05.286660", "module": null, - "name": "Item-is_aumms_item", + "name": "Item-custom_is_raw_material", "no_copy": 0, "non_negative": 0, "options": null, @@ -1528,7 +1668,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 1, + "read_only": 0, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -1551,11 +1691,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Item", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "custom_is_raw_material", - "fieldtype": "Check", + "dt": "Work Order", + "fetch_from": "assigned_to.smith_name", + "fetch_if_empty": 1, + "fieldname": "smith_name", + "fieldtype": "Data", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -1566,15 +1706,16 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "is_aumms_item", + "insert_after": "assigned_to", "is_system_generated": 0, "is_virtual": 0, - "label": "Is Raw Material", + "label": "Smith Name", "length": 0, + "link_filters": null, "mandatory_depends_on": null, - "modified": "2024-03-20 12:16:05.286660", + "modified": "2023-11-14 12:48:04.270472", "module": null, - "name": "Item-custom_is_raw_material", + "name": "Work Order-smith_name", "no_copy": 0, "non_negative": 0, "options": null, @@ -1626,6 +1767,7 @@ "is_virtual": 0, "label": "Keep Metal Ledger", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2023-08-23 15:14:10.150999", "module": null, @@ -1681,6 +1823,7 @@ "is_virtual": 0, "label": "Taxes and Charges", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2024-02-07 22:15:10.690293", "module": null, @@ -1704,61 +1847,6 @@ "unique": 0, "width": null }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Sales Invoice", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "keep_metal_ledger", - "fieldtype": "Check", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "is_debit_note", - "is_system_generated": 0, - "is_virtual": 0, - "label": "Keep Metal Ledger", - "length": 0, - "mandatory_depends_on": null, - "modified": "2023-01-19 15:29:50.710586", - "module": null, - "name": "Sales Invoice-keep_metal_ledger", - "no_copy": 0, - "non_negative": 0, - "options": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, { "allow_in_quick_entry": 0, "allow_on_submit": 0, @@ -1791,6 +1879,7 @@ "is_virtual": 0, "label": "Sales Taxes and Charges", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2024-02-07 22:15:11.034978", "module": null, @@ -1826,11 +1915,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Item", + "dt": "Sales Invoice", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "custom_item_qr_code", - "fieldtype": "Image", + "fieldname": "keep_metal_ledger", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -1841,18 +1930,19 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "item_qr", + "insert_after": "is_debit_note", "is_system_generated": 0, "is_virtual": 0, - "label": "Item QR Code", + "label": "Keep Metal Ledger", "length": 0, + "link_filters": null, "mandatory_depends_on": null, - "modified": "2024-02-15 12:27:24.365547", + "modified": "2023-01-19 15:29:50.710586", "module": null, - "name": "Item-custom_item_qr_code", + "name": "Sales Invoice-keep_metal_ledger", "no_copy": 0, "non_negative": 0, - "options": "item_qr", + "options": null, "permlevel": 0, "precision": "", "print_hide": 0, @@ -1901,6 +1991,7 @@ "is_virtual": 0, "label": "Gold Weight", "length": 0, + "link_filters": null, "mandatory_depends_on": "", "modified": "2023-08-10 16:25:51.557590", "module": null, @@ -1956,6 +2047,7 @@ "is_virtual": 0, "label": "Has Stone", "length": 0, + "link_filters": null, "mandatory_depends_on": null, "modified": "2023-08-10 16:19:51.484765", "module": null, @@ -1978,60 +2070,5 @@ "translatable": 0, "unique": 0, "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": "0", - "depends_on": "has_stone", - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Item", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "stone_charge", - "fieldtype": "Currency", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "stone_weight", - "is_system_generated": 0, - "is_virtual": 0, - "label": "Stone Charge", - "length": 0, - "mandatory_depends_on": null, - "modified": "2023-08-10 16:22:43.694341", - "module": null, - "name": "Item-stone_charge", - "no_copy": 0, - "non_negative": 0, - "options": null, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null } ] \ No newline at end of file diff --git a/aumms/fixtures/designation.json b/aumms/fixtures/designation.json index 532921c..bf7acce 100644 --- a/aumms/fixtures/designation.json +++ b/aumms/fixtures/designation.json @@ -1,10 +1,12 @@ [ { + "appraisal_template": null, "description": null, "designation_name": "Smith", "docstatus": 0, "doctype": "Designation", "modified": "2023-11-09 16:31:17.044970", - "name": "Smith" + "name": "Smith", + "skills": [] } ] \ No newline at end of file diff --git a/aumms/fixtures/workflow.json b/aumms/fixtures/workflow.json index 5e0dc2b..7374b77 100644 --- a/aumms/fixtures/workflow.json +++ b/aumms/fixtures/workflow.json @@ -4,7 +4,7 @@ "doctype": "Workflow", "document_type": "Customer Jewellery Order", "is_active": 1, - "modified": "2024-04-03 16:16:32.356519", + "modified": "2024-07-03 15:33:10.459704", "name": "Feasibility Check", "override_status": 0, "send_email_alert": 0, @@ -79,7 +79,7 @@ "parent": "Feasibility Check", "parentfield": "states", "parenttype": "Workflow", - "state": "Submitted", + "state": "Order Confirmed", "update_field": "", "update_value": null, "workflow_builder_id": null @@ -138,11 +138,11 @@ "workflow_builder_id": null }, { - "action": "Submit", + "action": "Confirm Order", "allow_self_approval": 1, "allowed": "Sales Officer", "condition": null, - "next_state": "Submitted", + "next_state": "Order Confirmed", "parent": "Feasibility Check", "parentfield": "transitions", "parenttype": "Workflow", @@ -170,7 +170,7 @@ "parent": "Feasibility Check", "parentfield": "transitions", "parenttype": "Workflow", - "state": "Submitted", + "state": "Order Confirmed", "workflow_builder_id": null } ], diff --git a/aumms/fixtures/workflow_action_master.json b/aumms/fixtures/workflow_action_master.json index bcec71f..087ec73 100644 --- a/aumms/fixtures/workflow_action_master.json +++ b/aumms/fixtures/workflow_action_master.json @@ -33,5 +33,12 @@ "modified": "2024-04-03 11:40:05.185475", "name": "Cancel", "workflow_action_name": "Cancel" + }, + { + "docstatus": 0, + "doctype": "Workflow Action Master", + "modified": "2024-07-03 15:25:59.374748", + "name": "Confirm Order", + "workflow_action_name": "Confirm Order" } ] \ No newline at end of file diff --git a/aumms/fixtures/workflow_state.json b/aumms/fixtures/workflow_state.json index 930bfaf..3900660 100644 --- a/aumms/fixtures/workflow_state.json +++ b/aumms/fixtures/workflow_state.json @@ -8,6 +8,15 @@ "style": "Danger", "workflow_state_name": "Cancelled" }, + { + "docstatus": 0, + "doctype": "Workflow State", + "icon": "", + "modified": "2024-07-03 15:32:37.584915", + "name": "Order Confirmed", + "style": "Success", + "workflow_state_name": "Order Confirmed" + }, { "docstatus": 0, "doctype": "Workflow State", @@ -17,6 +26,15 @@ "style": "Danger", "workflow_state_name": "Not Feasible" }, + { + "docstatus": 0, + "doctype": "Workflow State", + "icon": "", + "modified": "2024-04-03 16:41:11.996612", + "name": "Feasible", + "style": "Primary", + "workflow_state_name": "Feasible" + }, { "docstatus": 0, "doctype": "Workflow State", @@ -34,23 +52,5 @@ "name": "Submitted for feasibility", "style": "Info", "workflow_state_name": "Submitted for feasibility" - }, - { - "docstatus": 0, - "doctype": "Workflow State", - "icon": "", - "modified": "2024-04-03 16:41:11.996612", - "name": "Feasible", - "style": "Primary", - "workflow_state_name": "Feasible" - }, - { - "docstatus": 0, - "doctype": "Workflow State", - "icon": "", - "modified": "2024-04-03 16:38:39.851460", - "name": "Submitted", - "style": "Success", - "workflow_state_name": "Submitted" } ] \ No newline at end of file diff --git a/aumms/hooks.py b/aumms/hooks.py index 6b62ff4..4eded22 100644 --- a/aumms/hooks.py +++ b/aumms/hooks.py @@ -101,16 +101,16 @@ }, { "dt":"Workflow", - "filters":[["name","in",["Feasibility check"]]] + "filters":[["name","in",["Feasibility check"],["Manufacturing Stages Workflow"]]] }, { - "dt":"Workflow Action Master", - "filters":[["name","in",["Submit for Feasibility check", "Approve", "Reject", "Submit", "Cancel"]]] - }, - { - "dt":"Workflow State", - "filters":[["name","in",["Draft", "Submitted for feasibility", "Feasible", "Not Feasible", "Submitted", "Cancelled"]]] - }, + "dt":"Workflow Action Master", + "filters":[["name","in",["Submit for Feasibility check", "Approve", "Reject", "Submit", "Confirm Order","Cancel","Start Manufacturing","Complete"]]] + }, + { + "dt":"Workflow State", + "filters":[["name","in",["Draft", "Submitted for feasibility", "Feasible", "Not Feasible", "Order Confirmed", "Cancelled","Manufacturing Started","Completed"]]] + }, { "dt":"Custom Field", "filters": [["name", "in",["Department-head_of_department", "Employee-custom_warehouse", "Item Group-is_aumms_item_group", "Item Group-item_type", "Item Group-is_purity_item", "Item Group-making_charge_based_on", "Item Group-percentage", "Item Group-currency", "Item Group-is_sales_item", "Item Group-is_purchase_item", "Item-item_type", "Item-making_charge_based_on", "Item-making_charge_percentage", "Item-making_charge", "Item-purity_percentage", "Item-is_aumms_item", "Item-custom_item_qr_code", "Item-gold_weight", "Item-has_stone", "Item-stone_charge","Jewellery Invoice-custom_taxes_and_charges", "Jewellery Invoice-custom_sales_taxes_and_charges", "Jewellery Invoice-custom_total_taxes_and_charges_company_currency", "Jewellery Invoice-custom_total_taxes_and_charges", "Job Card-assigned_to", "Job Card-assigned_employee", "Purchase Invoice-keep_metal_ledger", "Purchase Receipt-party_link", "Purchase Receipt-keep_metal_ledger", "Purchase Receipt-create_invoice_on_submit", "Sales Invoice-keep_metal_ledger", "Sales Order-keep_metal_ledger", "Work Order-assigned_to", "Work Order-smith_name", "UOM-is_purity_uom", "Item-custom_is_raw_material","Purchase Invoice Item-item_type", "Purchase Invoice Item-is_purity_item", "Purchase Invoice Item-purity_percentage", "Purchase Invoice Item-purity", "Purchase Order Item-is_purity_item", "Purchase Order Item-purity", "Purchase Order Item-purity_percentage","Purchase Receipt Item-purity","Purchase Receipt Item-purity_percentage","Purchase Receipt Item-is_purity_item","Sales Invoice Item-purity","Sales Invoice Item-purity_percentage","Sales Invoice Item-is_purity_item","Sales Order Item-purity", "Sales Order Item-is_purity_item"]]]