mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 06:29:20 +00:00
fix: broken bom tree view and remove duplicate button (#28512)
* fix: broken bom tree view and remove duplicate button Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
committed by
GitHub
parent
34deab5b71
commit
7ae1369d64
@@ -16,26 +16,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr style="margin: 15px -15px;">
|
<hr style="margin: 15px -15px;">
|
||||||
<p>
|
<p>
|
||||||
{% if data.value %}
|
{% if data.value && data.value != "BOM" %}
|
||||||
<a style="margin-right: 7px; margin-bottom: 7px" class="btn btn-default btn-xs" href="#Form/BOM/{{ data.value }}">
|
<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>
|
{{ __("Open BOM {0}", [data.value.bold()]) }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if data.item_code %}
|
{% 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>
|
{{ __("Open Item {0}", [data.item_code.bold()]) }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</div>
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ frappe.treeview_settings["BOM"] = {
|
|||||||
var bom = frappe.model.get_doc("BOM", node.data.value);
|
var bom = frappe.model.get_doc("BOM", node.data.value);
|
||||||
node.data.image = escape(bom.image) || "";
|
node.data.image = escape(bom.image) || "";
|
||||||
node.data.description = bom.description || "";
|
node.data.description = bom.description || "";
|
||||||
|
node.data.item_code = bom.item || "";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user