* fix: broken bom tree view and remove duplicate button (cherry picked from commit 7ae1369d64ecaa829965d89915475fbd3211b5c2) Co-authored-by: Bhavesh Maheshwari <34086262+bhavesh95863@users.noreply.github.com> Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
		
							parent
							
								
									0df9cf9526
								
							
						
					
					
						commit
						34d1fec7de
					
				| @ -16,26 +16,15 @@ | ||||
| 			</div> | ||||
| 			<hr style="margin: 15px -15px;"> | ||||
| 			<p> | ||||
| 				{% if data.value %} | ||||
| 				<a style="margin-right: 7px; margin-bottom: 7px" class="btn btn-default btn-xs" href="#Form/BOM/{{ data.value }}"> | ||||
| 				{% if data.value && data.value != "BOM" %} | ||||
| 				<a style="margin-right: 7px; margin-bottom: 7px" class="btn btn-default btn-xs" href="/app/bom/{{ data.value }}"> | ||||
| 					{{ __("Open BOM {0}", [data.value.bold()]) }}</a> | ||||
| 				{% endif %} | ||||
| 				{% if data.item_code %} | ||||
| 				<a class="btn btn-default btn-xs" href="#Form/Item/{{ data.item_code }}"> | ||||
| 				<a style="margin-right: 7px; margin-bottom: 7px"  class="btn btn-default btn-xs" href="/app/item/{{ data.item_code }}"> | ||||
| 					{{ __("Open Item {0}", [data.item_code.bold()]) }}</a> | ||||
| 				{% endif %} | ||||
| 			</p> | ||||
| 		</div> | ||||
| 	</div> | ||||
| 	<hr style="margin: 15px -15px;"> | ||||
| 	<p> | ||||
| 		{% if data.value %} | ||||
| 		<a style="margin-right: 7px; margin-bottom: 7px" class="btn btn-default btn-xs" href="/app/Form/BOM/{{ data.value }}"> | ||||
| 			{{ __("Open BOM {0}", [data.value.bold()]) }}</a> | ||||
| 		{% endif %} | ||||
| 		{% if data.item_code %} | ||||
| 		<a class="btn btn-default btn-xs" href="/app/Form/Item/{{ data.item_code }}"> | ||||
| 			{{ __("Open Item {0}", [data.item_code.bold()]) }}</a> | ||||
| 		{% endif %} | ||||
| 	</p> | ||||
| </div> | ||||
|  | ||||
| @ -66,6 +66,7 @@ frappe.treeview_settings["BOM"] = { | ||||
| 				var bom = frappe.model.get_doc("BOM", node.data.value); | ||||
| 				node.data.image = escape(bom.image) || ""; | ||||
| 				node.data.description = bom.description || ""; | ||||
| 				node.data.item_code = bom.item || ""; | ||||
| 			}); | ||||
| 		} | ||||
| 	}, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user