Merge pull request #17444 from nabinhait/work-order-bom-image-dev

feat: Added item image in work order and bom
This commit is contained in:
Nabin Hait 2019-05-01 19:31:15 +05:30 committed by GitHub
commit 4ee2cec8e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1900 additions and 1841 deletions

View File

@ -5,11 +5,6 @@ frappe.provide("erpnext.bom");
frappe.ui.form.on("BOM", {
setup: function(frm) {
frm.add_fetch("item", "description", "description");
frm.add_fetch("item", "image", "image");
frm.add_fetch("item", "item_name", "item_name");
frm.add_fetch("item", "stock_uom", "uom");
frm.set_query("bom_no", "items", function() {
return {
filters: {
@ -413,8 +408,4 @@ frappe.ui.form.on("BOM", "with_operations", function(frm) {
frm.set_value("operations", []);
}
toggle_operations(frm);
});
cur_frm.cscript.image = function() {
refresh_field("image_view");
};
});

View File

@ -20,6 +20,7 @@
"collapsible": 0,
"columns": 0,
"description": "Item to be manufactured or repacked",
"fetch_if_empty": 0,
"fieldname": "item",
"fieldtype": "Link",
"hidden": 0,
@ -55,6 +56,8 @@
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fetch_from": "item.item_name",
"fetch_if_empty": 0,
"fieldname": "item_name",
"fieldtype": "Data",
"hidden": 0,
@ -87,6 +90,43 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_from": "item.image",
"fetch_if_empty": 0,
"fieldname": "image",
"fieldtype": "Attach Image",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
"length": 0,
"no_copy": 0,
"options": "image",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_from": "item.stock_uom",
"fetch_if_empty": 0,
"fieldname": "uom",
"fieldtype": "Link",
"hidden": 0,
@ -121,6 +161,7 @@
"columns": 0,
"default": "1",
"description": "Quantity of item obtained after manufacturing / repacking from given quantities of raw materials",
"fetch_if_empty": 0,
"fieldname": "quantity",
"fieldtype": "Float",
"hidden": 0,
@ -154,6 +195,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "cb0",
"fieldtype": "Column Break",
"hidden": 0,
@ -185,6 +227,7 @@
"collapsible": 0,
"columns": 0,
"default": "1",
"fetch_if_empty": 0,
"fieldname": "is_active",
"fieldtype": "Check",
"hidden": 0,
@ -219,6 +262,7 @@
"collapsible": 0,
"columns": 0,
"default": "1",
"fetch_if_empty": 0,
"fieldname": "is_default",
"fieldtype": "Check",
"hidden": 0,
@ -253,6 +297,7 @@
"collapsible": 0,
"columns": 0,
"description": "Manage cost of operations",
"fetch_if_empty": 0,
"fieldname": "with_operations",
"fieldtype": "Check",
"hidden": 0,
@ -284,6 +329,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "inspection_required",
"fieldtype": "Check",
"hidden": 0,
@ -316,6 +362,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "allow_alternative_item",
"fieldtype": "Check",
"hidden": 0,
@ -348,6 +395,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "allow_same_item_multiple_times",
"fieldtype": "Check",
"hidden": 0,
@ -381,6 +429,7 @@
"collapsible": 0,
"columns": 0,
"default": "1",
"fetch_if_empty": 0,
"fieldname": "set_rate_of_sub_assembly_item_based_on_bom",
"fieldtype": "Check",
"hidden": 0,
@ -414,6 +463,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "inspection_required",
"fetch_if_empty": 0,
"fieldname": "quality_inspection_template",
"fieldtype": "Link",
"hidden": 0,
@ -447,6 +497,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "currency_detail",
"fieldtype": "Section Break",
"hidden": 0,
@ -479,6 +530,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
@ -513,6 +565,7 @@
"collapsible": 0,
"columns": 0,
"default": "",
"fetch_if_empty": 0,
"fieldname": "transfer_material_against",
"fieldtype": "Select",
"hidden": 0,
@ -546,6 +599,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "conversion_rate",
"fieldtype": "Float",
"hidden": 0,
@ -578,6 +632,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_12",
"fieldtype": "Column Break",
"hidden": 0,
@ -609,6 +664,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "currency",
"fieldtype": "Link",
"hidden": 0,
@ -643,6 +699,7 @@
"collapsible": 0,
"columns": 0,
"default": "Valuation Rate",
"fetch_if_empty": 0,
"fieldname": "rm_cost_as_per",
"fieldtype": "Select",
"hidden": 0,
@ -676,6 +733,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "eval:doc.rm_cost_as_per===\"Price List\"",
"fetch_if_empty": 0,
"fieldname": "buying_price_list",
"fieldtype": "Link",
"hidden": 0,
@ -710,6 +768,7 @@
"columns": 0,
"depends_on": "",
"description": "",
"fetch_if_empty": 0,
"fieldname": "operations_section",
"fieldtype": "Section Break",
"hidden": 0,
@ -742,6 +801,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "routing",
"fieldtype": "Link",
"hidden": 0,
@ -775,6 +835,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "operations",
"fieldtype": "Table",
"hidden": 0,
@ -809,6 +870,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "materials_section",
"fieldtype": "Section Break",
"hidden": 0,
@ -841,6 +903,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "items",
"fieldtype": "Table",
"hidden": 0,
@ -875,6 +938,7 @@
"bold": 0,
"collapsible": 1,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "scrap_section",
"fieldtype": "Section Break",
"hidden": 0,
@ -907,6 +971,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "scrap_items",
"fieldtype": "Table",
"hidden": 0,
@ -940,6 +1005,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "costing",
"fieldtype": "Section Break",
"hidden": 0,
@ -972,6 +1038,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "operating_cost",
"fieldtype": "Currency",
"hidden": 0,
@ -1004,6 +1071,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "raw_material_cost",
"fieldtype": "Currency",
"hidden": 0,
@ -1036,6 +1104,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "scrap_material_cost",
"fieldtype": "Currency",
"hidden": 0,
@ -1069,6 +1138,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "cb1",
"fieldtype": "Column Break",
"hidden": 0,
@ -1099,6 +1169,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "base_operating_cost",
"fieldtype": "Currency",
"hidden": 0,
@ -1132,6 +1203,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "base_raw_material_cost",
"fieldtype": "Currency",
"hidden": 0,
@ -1165,6 +1237,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "base_scrap_material_cost",
"fieldtype": "Data",
"hidden": 0,
@ -1198,6 +1271,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "total_cost_of_bom",
"fieldtype": "Section Break",
"hidden": 0,
@ -1229,6 +1303,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "total_cost",
"fieldtype": "Currency",
"hidden": 0,
@ -1261,6 +1336,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_26",
"fieldtype": "Column Break",
"hidden": 0,
@ -1292,6 +1368,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "base_total_cost",
"fieldtype": "Currency",
"hidden": 0,
@ -1325,6 +1402,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "more_info_section",
"fieldtype": "Section Break",
"hidden": 0,
@ -1356,6 +1434,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "project",
"fieldtype": "Link",
"hidden": 0,
@ -1390,6 +1469,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
@ -1422,6 +1502,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "col_break23",
"fieldtype": "Column Break",
"hidden": 0,
@ -1452,6 +1533,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break_25",
"fieldtype": "Section Break",
"hidden": 0,
@ -1483,6 +1565,8 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_from": "item.description",
"fetch_if_empty": 0,
"fieldname": "description",
"fieldtype": "Small Text",
"hidden": 0,
@ -1514,6 +1598,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_27",
"fieldtype": "Column Break",
"hidden": 0,
@ -1538,71 +1623,6 @@
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "image",
"fieldtype": "Attach",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "image_view",
"fieldtype": "Image",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image View",
"length": 0,
"no_copy": 0,
"options": "image",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
@ -1611,6 +1631,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "eval:!doc.__islocal",
"fetch_if_empty": 0,
"fieldname": "section_break0",
"fieldtype": "Section Break",
"hidden": 0,
@ -1642,6 +1663,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "exploded_items",
"fieldtype": "Table",
"hidden": 0,
@ -1676,6 +1698,7 @@
"bold": 0,
"collapsible": 1,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "website_section",
"fieldtype": "Section Break",
"hidden": 0,
@ -1710,6 +1733,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "",
"fetch_if_empty": 0,
"fieldname": "show_in_website",
"fieldtype": "Check",
"hidden": 0,
@ -1742,6 +1766,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "route",
"fieldtype": "Small Text",
"hidden": 0,
@ -1776,6 +1801,7 @@
"columns": 0,
"depends_on": "show_in_website",
"description": "Item Image (if not slideshow)",
"fetch_if_empty": 0,
"fieldname": "website_image",
"fieldtype": "Attach Image",
"hidden": 0,
@ -1808,6 +1834,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "thumbnail",
"fieldtype": "Data",
"hidden": 0,
@ -1842,6 +1869,7 @@
"collapsible_depends_on": "website_items",
"columns": 0,
"depends_on": "show_in_website",
"fetch_if_empty": 0,
"fieldname": "sb_web_spec",
"fieldtype": "Section Break",
"hidden": 0,
@ -1875,6 +1903,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "show_in_website",
"fetch_if_empty": 0,
"fieldname": "web_long_description",
"fieldtype": "Text Editor",
"hidden": 0,
@ -1908,6 +1937,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "show_in_website",
"fetch_if_empty": 0,
"fieldname": "show_items",
"fieldtype": "Check",
"hidden": 0,
@ -1941,6 +1971,7 @@
"collapsible": 0,
"columns": 0,
"depends_on": "eval:(doc.show_in_website && doc.with_operations)",
"fetch_if_empty": 0,
"fieldname": "show_operations",
"fieldtype": "Check",
"hidden": 0,
@ -1972,13 +2003,14 @@
"hide_toolbar": 0,
"icon": "fa fa-sitemap",
"idx": 1,
"image_field": "image",
"image_view": 0,
"in_create": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2019-01-30 16:39:34.353721",
"modified": "2019-05-01 16:36:05.197126",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "BOM",
@ -2026,7 +2058,7 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "item",
"search_fields": "item, item_name",
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",

File diff suppressed because it is too large Load Diff