Skip to content

Commit

Permalink
Merge pull request efeone#373 from efeone/aumms_056
Browse files Browse the repository at this point in the history
fix : Added new Fields in Manufacturing Request and Jewellery Job Card
  • Loading branch information
SherinKR authored Apr 30, 2024
2 parents fb0958b + 97a5725 commit 54ac030
Show file tree
Hide file tree
Showing 10 changed files with 1,550 additions and 153 deletions.
1,342 changes: 1,342 additions & 0 deletions aumms/aumms_manufacturing/custom/employee.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,34 @@
"manufacturing_stage",
"status",
"details_section",
"company",
"type",
"category",
"raw_material_from_previous_stage_only",
"column_break_8lq7",
"expected_weight",
"purity",
"uom",
"column_break_8lq7",
"company",
"work_station",
"supervisor_warehouse",
"stage",
"column_break_tgsz",
"smith",
"posting_date",
"smith_warehouse",
"expected_weight",
"expected_execution_time",
"column_break_ojtc",
"required_date",
"raw_material_from_previous_stage_only",
"section_break_qjuc",
"job_time",
"duration",
"section_break_amcz",
"design_attachment",
"design_description",
"tab_2_tab",
"raw_materiel_items_tab",
"raw_material_item_section",
"item_details",
"scrap_item_tab",
"weight",
"scrap_item_details_tab",
"scrap_item_details_column",
"table_gzos",
"amended_from"
Expand All @@ -55,14 +61,6 @@
"options": "Manufacturing Request",
"reqd": 1
},
{
"default": "Today",
"fieldname": "posting_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Posting Date",
"reqd": 1
},
{
"fieldname": "company",
"fieldtype": "Link",
Expand All @@ -74,11 +72,6 @@
"fieldtype": "Section Break",
"label": "Details"
},
{
"fieldname": "tab_2_tab",
"fieldtype": "Tab Break",
"label": "Raw Material"
},
{
"fieldname": "raw_material_item_section",
"fieldtype": "Section Break",
Expand All @@ -90,11 +83,6 @@
"label": "Item Details",
"options": "Raw Materiel Item"
},
{
"fieldname": "scrap_item_tab",
"fieldtype": "Tab Break",
"label": "Scrap Item"
},
{
"fieldname": "scrap_item_details_column",
"fieldtype": "Column Break",
Expand All @@ -103,7 +91,7 @@
{
"fieldname": "table_gzos",
"fieldtype": "Table",
"options": "Scrap Item Details"
"options": "Scrap Item Detail"
},
{
"fieldname": "amended_from",
Expand Down Expand Up @@ -215,11 +203,64 @@
{
"fieldname": "column_break_kvpp",
"fieldtype": "Column Break"
},
{
"fieldname": "stage",
"fieldtype": "Link",
"label": "Stage",
"options": "Manufacturing Stage"
},
{
"fieldname": "uom",
"fieldtype": "Link",
"label": "UOM",
"options": "UOM"
},
{
"fieldname": "supervisor_warehouse",
"fieldtype": "Link",
"label": "Supervisor Warehouse",
"options": "Warehouse"
},
{
"fieldname": "smith_warehouse",
"fieldtype": "Link",
"label": "Smith Warehouse",
"options": "Warehouse"
},
{
"default": "Today",
"fieldname": "expected_execution_time",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Expected Execution Time",
"reqd": 1
},
{
"fieldname": "column_break_ojtc",
"fieldtype": "Column Break"
},
{
"fieldname": "raw_materiel_items_tab",
"fieldtype": "Tab Break",
"label": "Raw Materiel Items",
"options": "Raw Materiel Item"
},
{
"fieldname": "weight",
"fieldtype": "Float",
"label": "Weight"
},
{
"fieldname": "scrap_item_details_tab",
"fieldtype": "Tab Break",
"label": "Scrap Item Details",
"options": "Scrap Item Detail"
}
],
"is_submittable": 1,
"links": [],
"modified": "2024-04-29 09:58:09.809272",
"modified": "2024-04-30 09:21:13.521123",
"modified_by": "Administrator",
"module": "AuMMS Manufacturing",
"name": "Jewellery Job Card",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@
"create_raw_material_bundle",
"raw_material_bundle_created",
"raw_material_available",
"custom_column_break_lwydq",
"expected_execution_time",
"smith",
"smith_warehouse",
"custom_column_break_lwydq",
"workstation",
"create_job_card",
"job_card_created",
"completed",
"workstation",
"required_time"
"product",
"weight",
"previous_stage_product",
"previous_stage_weight"
],
"fields": [
{
Expand Down Expand Up @@ -63,12 +68,6 @@
"options": "Manufacturing Stage",
"read_only": 1
},
{
"fieldname": "required_time",
"fieldtype": "Data",
"label": "Required Time",
"read_only": 1
},
{
"depends_on": "eval:doc.previous_stage_completed",
"fieldname": "previous_stage",
Expand Down Expand Up @@ -132,12 +131,47 @@
"fieldtype": "Check",
"in_list_view": 1,
"label": "Is Raw Material from Previous Stage Only"
},
{
"fieldname": "expected_execution_time",
"fieldtype": "Time",
"label": "Expected Execution Time",
"read_only": 1
},
{
"fieldname": "smith_warehouse",
"fieldtype": "Link",
"label": "Smith Warehouse",
"options": "Warehouse"
},
{
"fieldname": "product",
"fieldtype": "Link",
"label": "Product",
"options": "Item"
},
{
"fieldname": "weight",
"fieldtype": "Float",
"label": "Weight"
},
{
"fieldname": "previous_stage_product",
"fieldtype": "Link",
"label": "Previous Stage Product",
"options": "Item"
},
{
"fieldname": "previous_stage_weight",
"fieldtype": "Float",
"label": "Previous Stage Weight",
"precision": "0"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-04-24 11:19:10.339608",
"modified": "2024-04-29 15:18:38.525857",
"modified_by": "Administrator",
"module": "AuMMS Manufacturing",
"name": "Manufacturing Stage",
Expand All @@ -147,4 +181,4 @@
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"uom",
"column_break_1l2l",
"expected_weight",
"weight",
"column_break_izcc",
"quantity",
"supervisor_warehouse",
"finished",
"section_break_1jdd",
"manufacturing_stages",
Expand Down Expand Up @@ -107,7 +110,6 @@
"depends_on": "eval:doc.request_from ==\"Jewellery Order\"",
"fieldname": "jewellery_order_item",
"fieldtype": "Data",
"hidden": 1,
"label": "Jewellery Order Item",
"mandatory_depends_on": "eval:doc.request_form ==\"Jewellery Order\""
},
Expand Down Expand Up @@ -189,6 +191,21 @@
{
"fieldname": "column_break_ky2t",
"fieldtype": "Column Break"
},
{
"fieldname": "weight",
"fieldtype": "Float",
"label": "Weight"
},
{
"fieldname": "supervisor_warehouse",
"fieldtype": "Link",
"label": "Supervisor Warehouse",
"options": "Warehouse"
},
{
"fieldname": "column_break_izcc",
"fieldtype": "Column Break"
}
],
"index_web_pages_for_search": 1,
Expand All @@ -203,7 +220,7 @@
"link_fieldname": "manufacturing_request"
}
],
"modified": "2024-04-22 09:54:21.807373",
"modified": "2024-04-29 14:41:06.261685",
"modified_by": "Administrator",
"module": "AuMMS Manufacturing",
"name": "Manufacturing Request",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ def create_raw_material_request(self):
new_raw_material_request.insert(ignore_permissions=True)
frappe.msgprint("Raw Material Request Created.", indicator="green", alert=True)
else:
manufacturing_request_doc = frappe.get_doc('Manufacturing Request', self.manufacturing_request) if frappe.db.exists('Manufacturing Request', self.manufacturing_request) else None
manufacturing_request_doc = frappe.get_doc('Manufacturing Request', self.manufacturing_request)
if manufacturing_request_doc:
for stage in manufacturing_request_doc.manufacturing_stages:
if stage.manufacturing_stage == self.manufacturing_stage:
frappe.db.set_value('Manufacturing Stage', stage.name, 'raw_material_available', 1)
frappe.db.set_value('Manufacturing Stage', stage.name, 'raw_material_available', True)
break


def mark_as_raw_material_bundle_created(self, created):
if frappe.db.exists('Manufacturing Request', self.manufacturing_request):
manufacturing_request = frappe.get_doc('Manufacturing Request', self.manufacturing_request)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
"engine": "InnoDB",
"field_order": [
"item_details_section",
"item_code",
"item_type",
"column_break_aald",
"source_ware_house",
"required_quandity",
"allow_alternative_item"
"item",
"quantity",
"weight"
],
"fields": [
{
Expand All @@ -21,48 +18,29 @@
"label": "Item Details"
},
{
"fieldname": "item_code",
"fieldname": "item",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Item Code",
"label": "Item",
"options": "Item",
"reqd": 1
},
{
"fieldname": "column_break_aald",
"fieldtype": "Column Break"
},
{
"fieldname": "source_ware_house",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Source Ware House",
"options": "Warehouse"
},
{
"fieldname": "required_quandity",
"fieldname": "quantity",
"fieldtype": "Int",
"label": "Required Quandity",
"non_negative": 1
},
{
"default": "0",
"fieldname": "allow_alternative_item",
"fieldtype": "Check",
"label": "Allow Alternative Item"
"label": "Quantity"
},
{
"fieldname": "item_type",
"fieldtype": "Link",
"label": "Item Type",
"options": "Item Type",
"reqd": 1
"fieldname": "weight",
"fieldtype": "Float",
"label": "Weight",
"precision": "1"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-04-17 16:53:59.415573",
"modified": "2024-04-29 15:52:11.287033",
"modified_by": "Administrator",
"module": "AuMMS Manufacturing",
"name": "Raw Materiel Item",
Expand Down
Loading

0 comments on commit 54ac030

Please sign in to comment.