From 8b608c904375b71163d78aeb75c7bd0bf1eedbb2 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Wed, 5 Aug 2015 11:59:30 +0530 Subject: [PATCH 01/26] Search Variants added to Item Master Added feature for Variants to hande numeric values --- erpnext/stock/doctype/item/item.js | 139 +- erpnext/stock/doctype/item/item.json | 2915 ++++++++++++----- erpnext/stock/doctype/item/item.py | 70 +- .../item_attribute/item_attribute.json | 196 +- .../doctype/item_attribute/item_attribute.py | 15 +- .../item_template_attribute/__init__.py | 0 .../item_template_attribute.json | 192 ++ .../item_template_attribute.py | 10 + .../manage_variants/manage_variants.py | 3 +- 9 files changed, 2618 insertions(+), 922 deletions(-) create mode 100644 erpnext/stock/doctype/item_template_attribute/__init__.py create mode 100644 erpnext/stock/doctype/item_template_attribute/item_template_attribute.json create mode 100644 erpnext/stock/doctype/item_template_attribute/item_template_attribute.py diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 35455b4fee..a94c8f6831 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -30,6 +30,10 @@ frappe.ui.form.on("Item", { frm.add_custom_button(__("Show Variants"), function() { frappe.set_route("List", "Item", {"variant_of": frm.doc.name}); }, "icon-list", "btn-default"); + + frm.add_custom_button(__("Search Variant"), function() { + erpnext.item.search_variant() + }, "icon-list", "btn-default"); } if (frm.doc.variant_of) { frm.set_intro(__("This Item is a Variant of {0} (Template). Attributes will be copied over from the template unless 'No Copy' is set", [frm.doc.variant_of]), true); @@ -53,7 +57,6 @@ frappe.ui.form.on("Item", { validate: function(frm){ erpnext.item.weight_to_validate(frm); - erpnext.item.variants_can_not_be_created_manually(frm); }, image: function(frm) { @@ -83,15 +86,6 @@ frappe.ui.form.on("Item", { is_stock_item: function(frm) { erpnext.item.toggle_reqd(frm); - }, - - manage_variants: function(frm) { - if (cur_frm.doc.__unsaved==1) { - frappe.throw(__("You have unsaved changes. Please save.")) - } else { - frappe.route_options = {"item_code": frm.doc.name }; - frappe.set_route("List", "Manage Variants"); - } } }); @@ -189,11 +183,126 @@ $.extend(erpnext.item, { validated = 0; } }, + + search_variant: function(doc) { + var fields = [] + + for(var i=0;i< cur_frm.doc.valid_attributes.length;i++){ + var fieldtype, desc; + var row = cur_frm.doc.valid_attributes[i]; + if (row.numeric_values){ + fieldtype = "Float"; + desc = "Min Value: "+ row.from_range +" , Max Value: "+ row.to_range +", in Increments of: "+ row.increment + } + else { + fieldtype = "Data"; + desc = "" + } + fields = fields.concat({ + "label": row.attribute, + "fieldname": row.attribute, + "fieldtype": fieldtype, + "reqd": 1, + "description": desc + }) + } + fields = fields.concat({ + "label": "Result", + "fieldname": "result", + "fieldtype": "HTML" + }) - variants_can_not_be_created_manually: function(frm) { - if (frm.doc.__islocal && frm.doc.variant_of) - frappe.throw(__("Variants can not be created manually, add item attributes in the template item")) + var d = new frappe.ui.Dialog({ + title: __("Search Variant"), + fields: fields + }); + + d.set_primary_action(__("Search"), function() { + args = d.get_values(); + if(!args) return; + frappe.call({ + method:"erpnext.stock.doctype.item.item.get_variant", + args: { + "item": cur_frm.doc.name, + "param": d.get_values() + }, + callback: function(r) { + if (r.message) { + d.get_field("result").set_value($(''+__("View {0}", [r.message[0]])+'') + .on("click", function() { + d.hide(); + frappe.set_route("Form", "Item", r.message[0]); + })); + } else { + d.get_field("result").set_value($('' + +__("Variant Not Found - Create New"+'')).on("click", function() { + d.hide(); + frappe.call({ + method:"erpnext.stock.doctype.item.item.create_variant", + args: { + "item": cur_frm.doc.name, + "param": d.get_values() + }, + callback: function(r) { + var doclist = frappe.model.sync(r.message); + frappe.set_route("Form", doclist[0].doctype, doclist[0].name); + } + }); + })); + } + } + }); + }); + + d.show(); + + $.each(d.fields_dict, function(i, field) { + + if(field.df.fieldtype !== "Data") { + return; + } + + $(field.input_area).addClass("ui-front"); + + field.$input.autocomplete({ + minLength: 0, + minChars: 0, + autoFocus: true, + source: function(request, response) { + frappe.call({ + method:"frappe.client.get_list", + args:{ + doctype:"Item Attribute Value", + filters: [ + ["parent","=", i], + ["attribute_value", "like", request.term + "%"] + ], + fields: ["attribute_value"] + }, + callback: function(r) { + d.get_field("result").set_value("") + if (r.message) { + response($.map(r.message, function(d) { return d.attribute_value; })); + } + } + }); + }, + select: function(event, ui) { + field.$input.val(ui.item.value); + field.$input.trigger("change"); + }, + }).on("focus", function(){ + setTimeout(function() { + if(!field.$input.val()) { + field.$input.autocomplete("search", ""); + } + }, 500); + }); + }); } - - }); + +cur_frm.add_fetch('attribute', 'numeric_values', 'numeric_values'); +cur_frm.add_fetch('attribute', 'from_range', 'from_range'); +cur_frm.add_fetch('attribute', 'to_range', 'to_range'); +cur_frm.add_fetch('attribute', 'increment', 'increment'); diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index 9a52a2345a..b8f996f956 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -1,1008 +1,2125 @@ { - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:item_code", - "creation": "2013-05-03 10:45:46", - "default_print_format": "Standard", - "description": "A Product or a Service that is bought, sold or kept in stock.", - "docstatus": 0, - "doctype": "DocType", - "document_type": "Master", + "allow_copy": 0, + "allow_import": 1, + "allow_rename": 1, + "autoname": "field:item_code", + "creation": "2013-05-03 10:45:46", + "custom": 0, + "default_print_format": "Standard", + "description": "A Product or a Service that is bought, sold or kept in stock.", + "docstatus": 0, + "doctype": "DocType", + "document_type": "Master", "fields": [ { - "fieldname": "name_and_description_section", - "fieldtype": "Section Break", - "label": "", - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "icon-flag", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "fieldname": "name_and_description_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "", + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "icon-flag", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Series", - "options": "ITEM-", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "fieldname": "naming_series", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Series", + "no_copy": 0, + "options": "ITEM-", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "description": "", - "fieldname": "item_code", - "fieldtype": "Data", - "in_filter": 0, - "label": "Item Code", - "no_copy": 1, - "oldfieldname": "item_code", - "oldfieldtype": "Data", - "permlevel": 0, - "read_only": 0, - "reqd": 0, - "search_index": 0 - }, + "allow_on_submit": 0, + "description": "", + "fieldname": "item_code", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Item Code", + "no_copy": 1, + "oldfieldname": "item_code", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "variant_of", - "description": "If item is a variant of another item then description, image, pricing, taxes etc will be set from the template unless explicitly specified", - "fieldname": "variant_of", - "fieldtype": "Link", - "label": "Variant Of", - "options": "Item", - "permlevel": 0, - "precision": "", - "read_only": 1 - }, + "allow_on_submit": 0, + "depends_on": "variant_of", + "description": "If item is a variant of another item then description, image, pricing, taxes etc will be set from the template unless explicitly specified", + "fieldname": "variant_of", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Variant Of", + "no_copy": 0, + "options": "Item", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "item_name", - "fieldtype": "Data", - "in_filter": 1, - "in_list_view": 0, - "label": "Item Name", - "oldfieldname": "item_name", - "oldfieldtype": "Data", - "permlevel": 0, - "read_only": 0, - "reqd": 1, - "search_index": 1 - }, + "allow_on_submit": 0, + "fieldname": "item_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 1, + "in_list_view": 0, + "label": "Item Name", + "no_copy": 0, + "oldfieldname": "item_name", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 1, + "set_only_once": 0, + "unique": 0 + }, { - "description": "", - "fieldname": "item_group", - "fieldtype": "Link", - "in_filter": 1, - "in_list_view": 1, - "label": "Item Group", - "oldfieldname": "item_group", - "oldfieldtype": "Link", - "options": "Item Group", - "permlevel": 0, - "read_only": 0, - "reqd": 1 - }, + "allow_on_submit": 0, + "description": "", + "fieldname": "item_group", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 1, + "in_list_view": 1, + "label": "Item Group", + "no_copy": 0, + "oldfieldname": "item_group", + "oldfieldtype": "Link", + "options": "Item Group", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "description": "", - "fieldname": "stock_uom", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Unit of Measure", - "oldfieldname": "stock_uom", - "oldfieldtype": "Link", - "options": "UOM", - "permlevel": 0, - "read_only": 0, - "reqd": 1 - }, + "allow_on_submit": 0, + "description": "", + "fieldname": "stock_uom", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "in_filter": 0, + "in_list_view": 0, + "label": "Default Unit of Measure", + "no_copy": 0, + "oldfieldname": "stock_uom", + "oldfieldtype": "Link", + "options": "UOM", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "brand", - "fieldtype": "Link", - "hidden": 0, - "label": "Brand", - "oldfieldname": "brand", - "oldfieldtype": "Link", - "options": "Brand", - "permlevel": 0, - "print_hide": 1, - "read_only": 0, - "reqd": 0 - }, + "allow_on_submit": 0, + "fieldname": "brand", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Brand", + "no_copy": 0, + "oldfieldname": "brand", + "oldfieldtype": "Link", + "options": "Brand", + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "barcode", - "fieldtype": "Data", - "label": "Barcode", - "no_copy": 1, - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "fieldname": "barcode", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Barcode", + "no_copy": 1, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "column_break0", - "fieldtype": "Column Break", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "fieldname": "column_break0", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "image", - "fieldtype": "Attach", - "label": "Image", - "options": "image", - "permlevel": 0, - "precision": "" - }, + "allow_on_submit": 0, + "fieldname": "image", + "fieldtype": "Attach", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Image", + "no_copy": 0, + "options": "image", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "image_view", - "fieldtype": "Image", - "in_list_view": 1, - "label": "Image View", - "options": "image", - "permlevel": 0, - "precision": "" - }, + "allow_on_submit": 0, + "fieldname": "image_view", + "fieldtype": "Image", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 1, + "label": "Image View", + "no_copy": 0, + "options": "image", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "section_break_11", - "fieldtype": "Section Break", - "permlevel": 0, - "precision": "" - }, + "allow_on_submit": 0, + "fieldname": "section_break_11", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "description", - "fieldtype": "Text Editor", - "in_filter": 0, - "in_list_view": 0, - "label": "Description", - "oldfieldname": "description", - "oldfieldtype": "Text", - "permlevel": 0, - "read_only": 0, - "reqd": 1, - "search_index": 0 - }, + "allow_on_submit": 0, + "fieldname": "description", + "fieldtype": "Text Editor", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Description", + "no_copy": 0, + "oldfieldname": "description", + "oldfieldtype": "Text", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "inventory", - "fieldtype": "Section Break", - "label": "Inventory", - "oldfieldtype": "Section Break", - "options": "icon-truck", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "fieldname": "inventory", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Inventory", + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "icon-truck", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "default": "1", - "description": "", - "fieldname": "is_stock_item", - "fieldtype": "Check", - "label": "Maintain Stock", - "oldfieldname": "is_stock_item", - "oldfieldtype": "Select", - "options": "", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "default": "1", + "description": "", + "fieldname": "is_stock_item", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Maintain Stock", + "no_copy": 0, + "oldfieldname": "is_stock_item", + "oldfieldtype": "Select", + "options": "", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "default": "", - "depends_on": "eval:doc.is_stock_item", - "fieldname": "has_batch_no", - "fieldtype": "Check", - "label": "Has Batch No", - "oldfieldname": "has_batch_no", - "oldfieldtype": "Select", - "options": "", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "default": "", + "depends_on": "eval:doc.is_stock_item", + "fieldname": "has_batch_no", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Has Batch No", + "no_copy": 0, + "oldfieldname": "has_batch_no", + "oldfieldtype": "Select", + "options": "", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "default": "", - "depends_on": "eval:doc.is_stock_item", - "description": "Selecting \"Yes\" will give a unique identity to each entity of this item which can be viewed in the Serial No master.", - "fieldname": "has_serial_no", - "fieldtype": "Check", - "in_filter": 1, - "label": "Has Serial No", - "oldfieldname": "has_serial_no", - "oldfieldtype": "Select", - "options": "", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "default": "", + "depends_on": "eval:doc.is_stock_item", + "description": "Selecting \"Yes\" will give a unique identity to each entity of this item which can be viewed in the Serial No master.", + "fieldname": "has_serial_no", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 1, + "in_list_view": 0, + "label": "Has Serial No", + "no_copy": 0, + "oldfieldname": "has_serial_no", + "oldfieldtype": "Select", + "options": "", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "has_serial_no", - "description": "Example: ABCD.#####\nIf series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.", - "fieldname": "serial_no_series", - "fieldtype": "Data", - "label": "Serial Number Series", - "no_copy": 0, - "permlevel": 0 - }, + "allow_on_submit": 0, + "depends_on": "has_serial_no", + "description": "Example: ABCD.#####\nIf series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.", + "fieldname": "serial_no_series", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Serial Number Series", + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "default": "", - "depends_on": "eval:doc.is_stock_item", - "description": "", - "fieldname": "is_asset_item", - "fieldtype": "Check", - "label": "Is Fixed Asset Item", - "oldfieldname": "is_asset_item", - "oldfieldtype": "Select", - "options": "", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "default": "", + "depends_on": "eval:doc.is_stock_item", + "description": "", + "fieldname": "is_asset_item", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Is Fixed Asset Item", + "no_copy": 0, + "oldfieldname": "is_asset_item", + "oldfieldtype": "Select", + "options": "", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "is_stock_item", - "fieldname": "column_break1", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "read_only": 0, + "allow_on_submit": 0, + "depends_on": "is_stock_item", + "fieldname": "column_break1", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0, "width": "50%" - }, + }, { - "depends_on": "", - "description": "", - "fieldname": "default_warehouse", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Warehouse", - "oldfieldname": "default_warehouse", - "oldfieldtype": "Link", - "options": "Warehouse", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "", + "description": "", + "fieldname": "default_warehouse", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "in_filter": 0, + "in_list_view": 0, + "label": "Default Warehouse", + "no_copy": 0, + "oldfieldname": "default_warehouse", + "oldfieldtype": "Link", + "options": "Warehouse", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "is_stock_item", - "description": "", - "fieldname": "tolerance", - "fieldtype": "Float", - "label": "Allow over delivery or receipt upto this percent", - "oldfieldname": "tolerance", - "oldfieldtype": "Currency", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "is_stock_item", + "description": "", + "fieldname": "tolerance", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Allow over delivery or receipt upto this percent", + "no_copy": 0, + "oldfieldname": "tolerance", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "is_stock_item", - "fieldname": "valuation_method", - "fieldtype": "Select", - "label": "Valuation Method", - "options": "\nFIFO\nMoving Average", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "is_stock_item", + "fieldname": "valuation_method", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Valuation Method", + "no_copy": 0, + "options": "\nFIFO\nMoving Average", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "default": "0.00", - "depends_on": "is_stock_item", - "description": "", - "fieldname": "min_order_qty", - "fieldtype": "Float", - "hidden": 0, - "label": "Minimum Order Qty", - "oldfieldname": "min_order_qty", - "oldfieldtype": "Currency", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "default": "0.00", + "depends_on": "is_stock_item", + "description": "", + "fieldname": "min_order_qty", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Minimum Order Qty", + "no_copy": 0, + "oldfieldname": "min_order_qty", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "eval:doc.is_stock_item", - "fieldname": "warranty_period", - "fieldtype": "Data", - "label": "Warranty Period (in days)", - "oldfieldname": "warranty_period", - "oldfieldtype": "Data", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "eval:doc.is_stock_item", + "fieldname": "warranty_period", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Warranty Period (in days)", + "no_copy": 0, + "oldfieldname": "warranty_period", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "default": "2099-12-31", - "depends_on": "is_stock_item", - "fieldname": "end_of_life", - "fieldtype": "Date", - "label": "End of Life", - "oldfieldname": "end_of_life", - "oldfieldtype": "Date", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "default": "2099-12-31", + "depends_on": "is_stock_item", + "fieldname": "end_of_life", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "End of Life", + "no_copy": 0, + "oldfieldname": "end_of_life", + "oldfieldtype": "Date", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "is_stock_item", - "description": "", - "fieldname": "net_weight", - "fieldtype": "Float", - "label": "Net Weight", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "is_stock_item", + "description": "", + "fieldname": "net_weight", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Net Weight", + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "eval:doc.is_stock_item", - "fieldname": "weight_uom", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Weight UOM", - "options": "UOM", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "eval:doc.is_stock_item", + "fieldname": "weight_uom", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "in_filter": 0, + "in_list_view": 0, + "label": "Weight UOM", + "no_copy": 0, + "options": "UOM", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "eval:doc.is_stock_item", - "description": "", - "fieldname": "reorder_section", - "fieldtype": "Section Break", - "label": "Auto re-order", - "options": "icon-rss", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "eval:doc.is_stock_item", + "description": "", + "fieldname": "reorder_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Auto re-order", + "no_copy": 0, + "options": "icon-rss", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "eval:(doc.is_stock_item && !doc.apply_warehouse_wise_reorder_level)", - "description": "Automatically create Material Request if quantity falls below this level", - "fieldname": "re_order_level", - "fieldtype": "Float", - "label": "Re-order Level", - "oldfieldname": "re_order_level", - "oldfieldtype": "Currency", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "eval:(doc.is_stock_item && !doc.apply_warehouse_wise_reorder_level)", + "description": "Automatically create Material Request if quantity falls below this level", + "fieldname": "re_order_level", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Re-order Level", + "no_copy": 0, + "oldfieldname": "re_order_level", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "eval:(doc.is_stock_item && !doc.apply_warehouse_wise_reorder_level)", - "fieldname": "re_order_qty", - "fieldtype": "Float", - "label": "Re-order Qty", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "eval:(doc.is_stock_item && !doc.apply_warehouse_wise_reorder_level)", + "fieldname": "re_order_qty", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Re-order Qty", + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "is_stock_item", - "fieldname": "apply_warehouse_wise_reorder_level", - "fieldtype": "Check", - "label": "Apply Warehouse-wise Reorder Level", - "permlevel": 0, - "precision": "" - }, + "allow_on_submit": 0, + "depends_on": "is_stock_item", + "fieldname": "apply_warehouse_wise_reorder_level", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Apply Warehouse-wise Reorder Level", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "eval:(doc.is_stock_item && doc.apply_warehouse_wise_reorder_level)", - "fieldname": "section_break_31", - "fieldtype": "Section Break", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "eval:(doc.is_stock_item && doc.apply_warehouse_wise_reorder_level)", + "fieldname": "section_break_31", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "eval:(doc.is_stock_item && doc.apply_warehouse_wise_reorder_level)", - "description": "Will also apply for variants unless overrridden", - "fieldname": "reorder_levels", - "fieldtype": "Table", - "label": "Warehouse-wise Reorder Levels", - "options": "Item Reorder", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "eval:(doc.is_stock_item && doc.apply_warehouse_wise_reorder_level)", + "description": "Will also apply for variants unless overrridden", + "fieldname": "reorder_levels", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Warehouse-wise Reorder Levels", + "no_copy": 0, + "options": "Item Reorder", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "eval:!doc.variant_of", - "fieldname": "variants_section", - "fieldtype": "Section Break", - "label": "Variants", - "permlevel": 0, - "precision": "" - }, + "allow_on_submit": 0, + "depends_on": "", + "fieldname": "variants_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Variants", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "default": "0", - "depends_on": "", - "description": "If this item has variants, then it cannot be selected in sales orders etc.", - "fieldname": "has_variants", - "fieldtype": "Check", - "label": "Has Variants", - "no_copy": 1, - "options": "", - "permlevel": 0, - "precision": "", - "read_only": 0 - }, + "allow_on_submit": 0, + "default": "0", + "depends_on": "eval:!doc.variant_of", + "description": "If this item has variants, then it cannot be selected in sales orders etc.", + "fieldname": "has_variants", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Has Variants", + "no_copy": 1, + "options": "", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "column_break_18", - "fieldtype": "Column Break", - "permlevel": 0, - "precision": "" - }, + "allow_on_submit": 0, + "depends_on": "has_variants", + "fieldname": "valid_attributes", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Valid Attributes", + "no_copy": 0, + "options": "Item Template Attribute", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "has_variants", - "fieldname": "manage_variants", - "fieldtype": "Button", - "label": "Manage Variants", - "permlevel": 0, - "precision": "" - }, + "allow_on_submit": 0, + "depends_on": "variant_of", + "fieldname": "attributes", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Attributes", + "no_copy": 1, + "options": "Variant Attribute", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "section_break_20", - "fieldtype": "Section Break", - "permlevel": 0, - "precision": "" - }, + "allow_on_submit": 0, + "fieldname": "purchase_details", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Purchase Details", + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "icon-shopping-cart", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "variant_of", - "fieldname": "attributes", - "fieldtype": "Table", - "hidden": 0, - "label": "Attributes", - "no_copy": 1, - "options": "Variant Attribute", - "permlevel": 0, - "precision": "", - "read_only": 1 - }, + "allow_on_submit": 0, + "default": "1", + "description": "", + "fieldname": "is_purchase_item", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Is Purchase Item", + "no_copy": 0, + "oldfieldname": "is_purchase_item", + "oldfieldtype": "Select", + "options": "", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "purchase_details", - "fieldtype": "Section Break", - "label": "Purchase Details", - "oldfieldtype": "Section Break", - "options": "icon-shopping-cart", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "is_purchase_item", + "description": "Average time taken by the supplier to deliver", + "fieldname": "lead_time_days", + "fieldtype": "Int", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Lead Time in days", + "no_copy": 0, + "oldfieldname": "lead_time_days", + "oldfieldtype": "Int", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "default": "1", - "description": "", - "fieldname": "is_purchase_item", - "fieldtype": "Check", - "label": "Is Purchase Item", - "oldfieldname": "is_purchase_item", - "oldfieldtype": "Select", - "options": "", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "is_purchase_item", + "description": "", + "fieldname": "buying_cost_center", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "in_filter": 0, + "in_list_view": 0, + "label": "Default Buying Cost Center", + "no_copy": 0, + "oldfieldname": "cost_center", + "oldfieldtype": "Link", + "options": "Cost Center", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "is_purchase_item", - "description": "Average time taken by the supplier to deliver", - "fieldname": "lead_time_days", - "fieldtype": "Int", - "label": "Lead Time in days", - "no_copy": 0, - "oldfieldname": "lead_time_days", - "oldfieldtype": "Int", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "is_purchase_item", + "description": "", + "fieldname": "expense_account", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "in_filter": 0, + "in_list_view": 0, + "label": "Default Expense Account", + "no_copy": 0, + "oldfieldname": "purchase_account", + "oldfieldtype": "Link", + "options": "Account", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "is_purchase_item", - "description": "", - "fieldname": "buying_cost_center", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Buying Cost Center", - "oldfieldname": "cost_center", - "oldfieldtype": "Link", - "options": "Cost Center", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "is_purchase_item", + "fieldname": "unit_of_measure_conversion", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Unit of Measure Conversion", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "is_purchase_item", - "description": "", - "fieldname": "expense_account", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Expense Account", - "oldfieldname": "purchase_account", - "oldfieldtype": "Link", - "options": "Account", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "is_purchase_item", + "description": "Will also apply for variants", + "fieldname": "uoms", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "UOMs", + "no_copy": 1, + "oldfieldname": "uom_conversion_details", + "oldfieldtype": "Table", + "options": "UOM Conversion Detail", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "is_purchase_item", - "fieldname": "unit_of_measure_conversion", - "fieldtype": "Column Break", - "label": "Unit of Measure Conversion", - "permlevel": 0, - "precision": "" - }, + "allow_on_submit": 0, + "depends_on": "is_purchase_item", + "fieldname": "last_purchase_rate", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Last Purchase Rate", + "no_copy": 1, + "oldfieldname": "last_purchase_rate", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "is_purchase_item", - "description": "Will also apply for variants", - "fieldname": "uoms", - "fieldtype": "Table", - "label": "UOMs", - "no_copy": 1, - "oldfieldname": "uom_conversion_details", - "oldfieldtype": "Table", - "options": "UOM Conversion Detail", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "is_purchase_item", + "fieldname": "supplier_details", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Supplier Details", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "is_purchase_item", - "fieldname": "last_purchase_rate", - "fieldtype": "Float", - "label": "Last Purchase Rate", - "no_copy": 1, - "oldfieldname": "last_purchase_rate", - "oldfieldtype": "Currency", - "permlevel": 0, - "read_only": 1 - }, + "allow_on_submit": 0, + "depends_on": "eval:doc.is_purchase_item", + "fieldname": "default_supplier", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "in_filter": 0, + "in_list_view": 0, + "label": "Default Supplier", + "no_copy": 0, + "options": "Supplier", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "is_purchase_item", - "fieldname": "supplier_details", - "fieldtype": "Section Break", - "label": "Supplier Details", - "permlevel": 0, - "precision": "" - }, + "allow_on_submit": 0, + "depends_on": "eval:doc.is_purchase_item", + "fieldname": "manufacturer", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Manufacturer", + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "eval:doc.is_purchase_item", - "fieldname": "default_supplier", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Supplier", - "options": "Supplier", - "permlevel": 0 - }, + "allow_on_submit": 0, + "depends_on": "eval:doc.is_purchase_item", + "fieldname": "manufacturer_part_no", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Manufacturer Part Number", + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "eval:doc.is_purchase_item", - "fieldname": "manufacturer", - "fieldtype": "Data", - "label": "Manufacturer", - "permlevel": 0, - "read_only": 0 - }, - { - "depends_on": "eval:doc.is_purchase_item", - "fieldname": "manufacturer_part_no", - "fieldtype": "Data", - "label": "Manufacturer Part Number", - "permlevel": 0, - "read_only": 0 - }, - { - "depends_on": "is_purchase_item", - "fieldname": "column_break2", - "fieldtype": "Column Break", - "label": "Item Code for Suppliers", - "oldfieldtype": "Column Break", - "permlevel": 0, - "read_only": 0, + "allow_on_submit": 0, + "depends_on": "is_purchase_item", + "fieldname": "column_break2", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Item Code for Suppliers", + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0, "width": "50%" - }, + }, { - "depends_on": "is_purchase_item", - "fieldname": "supplier_items", - "fieldtype": "Table", - "label": "Supplier Items", - "options": "Item Supplier", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "is_purchase_item", + "fieldname": "supplier_items", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Supplier Items", + "no_copy": 0, + "options": "Item Supplier", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "sales_details", - "fieldtype": "Section Break", - "label": "Sales Details", - "oldfieldtype": "Section Break", - "options": "icon-tag", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "fieldname": "sales_details", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Sales Details", + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "icon-tag", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "default": "1", - "description": "", - "fieldname": "is_sales_item", - "fieldtype": "Check", - "in_filter": 1, - "label": "Is Sales Item", - "oldfieldname": "is_sales_item", - "oldfieldtype": "Select", - "options": "", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "default": "1", + "description": "", + "fieldname": "is_sales_item", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 1, + "in_list_view": 0, + "label": "Is Sales Item", + "no_copy": 0, + "oldfieldname": "is_sales_item", + "oldfieldtype": "Select", + "options": "", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "default": "", - "depends_on": "eval:doc.is_sales_item", - "description": "Allow in Sales Order of type \"Service\"", - "fieldname": "is_service_item", - "fieldtype": "Check", - "in_filter": 1, - "label": "Is Service Item", - "oldfieldname": "is_service_item", - "oldfieldtype": "Select", - "options": "", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "default": "", + "depends_on": "eval:doc.is_sales_item", + "description": "Allow in Sales Order of type \"Service\"", + "fieldname": "is_service_item", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 1, + "in_list_view": 0, + "label": "Is Service Item", + "no_copy": 0, + "oldfieldname": "is_service_item", + "oldfieldtype": "Select", + "options": "", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "default": "0", - "description": "Publish Item to hub.erpnext.com", - "fieldname": "publish_in_hub", - "fieldtype": "Check", - "hidden": 1, - "label": "Publish in Hub", - "permlevel": 0, - "precision": "" - }, + "allow_on_submit": 0, + "default": "0", + "description": "Publish Item to hub.erpnext.com", + "fieldname": "publish_in_hub", + "fieldtype": "Check", + "hidden": 1, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Publish in Hub", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "default": "0", - "fieldname": "synced_with_hub", - "fieldtype": "Check", - "hidden": 1, - "label": "Synced With Hub", - "permlevel": 0, - "precision": "" - }, + "allow_on_submit": 0, + "default": "0", + "fieldname": "synced_with_hub", + "fieldtype": "Check", + "hidden": 1, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Synced With Hub", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "is_sales_item", - "fieldname": "income_account", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Income Account", - "options": "Account", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "is_sales_item", + "fieldname": "income_account", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "in_filter": 0, + "in_list_view": 0, + "label": "Default Income Account", + "no_copy": 0, + "options": "Account", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "is_sales_item", - "fieldname": "selling_cost_center", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default Selling Cost Center", - "options": "Cost Center", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "is_sales_item", + "fieldname": "selling_cost_center", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "in_filter": 0, + "in_list_view": 0, + "label": "Default Selling Cost Center", + "no_copy": 0, + "options": "Cost Center", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "is_sales_item", - "fieldname": "column_break3", - "fieldtype": "Column Break", - "label": "Customer Item Codes", - "oldfieldtype": "Column Break", - "permlevel": 0, - "read_only": 0, + "allow_on_submit": 0, + "depends_on": "is_sales_item", + "fieldname": "column_break3", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Customer Item Codes", + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0, "width": "50%" - }, + }, { - "depends_on": "is_sales_item", - "description": "", - "fieldname": "customer_items", - "fieldtype": "Table", - "label": "Customer Items", - "options": "Item Customer Detail", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "is_sales_item", + "description": "", + "fieldname": "customer_items", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Customer Items", + "no_copy": 0, + "options": "Item Customer Detail", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "eval:doc.is_sales_item", - "fieldname": "max_discount", - "fieldtype": "Float", - "label": "Max Discount (%)", - "oldfieldname": "max_discount", - "oldfieldtype": "Currency", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "eval:doc.is_sales_item", + "fieldname": "max_discount", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Max Discount (%)", + "no_copy": 0, + "oldfieldname": "max_discount", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "item_tax_section_break", - "fieldtype": "Section Break", - "label": "Item Tax", - "oldfieldtype": "Section Break", - "options": "icon-money", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "fieldname": "item_tax_section_break", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Item Tax", + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "icon-money", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "description": "Will also apply for variants", - "fieldname": "taxes", - "fieldtype": "Table", - "label": "Taxes", - "oldfieldname": "item_tax", - "oldfieldtype": "Table", - "options": "Item Tax", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "description": "Will also apply for variants", + "fieldname": "taxes", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Taxes", + "no_copy": 0, + "oldfieldname": "item_tax", + "oldfieldtype": "Table", + "options": "Item Tax", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "inspection_criteria", - "fieldtype": "Section Break", - "label": "Inspection Criteria", - "oldfieldtype": "Section Break", - "options": "icon-search", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "fieldname": "inspection_criteria", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Inspection Criteria", + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "icon-search", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "default": "", - "fieldname": "inspection_required", - "fieldtype": "Check", - "label": "Inspection Required", - "no_copy": 0, - "oldfieldname": "inspection_required", - "oldfieldtype": "Select", - "options": "", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "default": "", + "fieldname": "inspection_required", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Inspection Required", + "no_copy": 0, + "oldfieldname": "inspection_required", + "oldfieldtype": "Select", + "options": "", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "inspection_required", - "description": "Will also apply to variants", - "fieldname": "quality_parameters", - "fieldtype": "Table", - "label": "Quality Parameters", - "oldfieldname": "item_specification_details", - "oldfieldtype": "Table", - "options": "Item Quality Inspection Parameter", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "inspection_required", + "description": "Will also apply to variants", + "fieldname": "quality_parameters", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Quality Parameters", + "no_copy": 0, + "oldfieldname": "item_specification_details", + "oldfieldtype": "Table", + "options": "Item Quality Inspection Parameter", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "manufacturing", - "fieldtype": "Section Break", - "label": "Manufacturing", - "oldfieldtype": "Section Break", - "options": "icon-cogs", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "fieldname": "manufacturing", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Manufacturing", + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "icon-cogs", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "default": "", - "depends_on": "", - "description": "", - "fieldname": "is_pro_applicable", - "fieldtype": "Check", - "label": "Allow Production Order", - "oldfieldname": "is_pro_applicable", - "oldfieldtype": "Select", - "options": "", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "default": "", + "depends_on": "", + "description": "", + "fieldname": "is_pro_applicable", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Allow Production Order", + "no_copy": 0, + "oldfieldname": "is_pro_applicable", + "oldfieldtype": "Select", + "options": "", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "default": "", - "description": "If subcontracted to a vendor", - "fieldname": "is_sub_contracted_item", - "fieldtype": "Check", - "label": "Supply Raw Materials for Purchase", - "oldfieldname": "is_sub_contracted_item", - "oldfieldtype": "Select", - "options": "", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "default": "", + "description": "If subcontracted to a vendor", + "fieldname": "is_sub_contracted_item", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Supply Raw Materials for Purchase", + "no_copy": 0, + "oldfieldname": "is_sub_contracted_item", + "oldfieldtype": "Select", + "options": "", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "column_break_74", - "fieldtype": "Column Break", - "permlevel": 0, - "precision": "" - }, + "allow_on_submit": 0, + "fieldname": "column_break_74", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "", - "fieldname": "default_bom", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Default BOM", - "no_copy": 1, - "oldfieldname": "default_bom", - "oldfieldtype": "Link", - "options": "BOM", - "permlevel": 0, - "read_only": 1 - }, + "allow_on_submit": 0, + "depends_on": "", + "fieldname": "default_bom", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "in_filter": 0, + "in_list_view": 0, + "label": "Default BOM", + "no_copy": 1, + "oldfieldname": "default_bom", + "oldfieldtype": "Link", + "options": "BOM", + "permlevel": 0, + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "customer_code", - "fieldtype": "Data", - "hidden": 1, - "in_filter": 1, - "label": "Customer Code", - "no_copy": 1, - "permlevel": 0, - "print_hide": 1, - "read_only": 0 - }, + "allow_on_submit": 0, + "fieldname": "customer_code", + "fieldtype": "Data", + "hidden": 1, + "ignore_user_permissions": 0, + "in_filter": 1, + "in_list_view": 0, + "label": "Customer Code", + "no_copy": 1, + "permlevel": 0, + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "website_section", - "fieldtype": "Section Break", - "label": "Website", - "options": "icon-globe", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "fieldname": "website_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Website", + "no_copy": 0, + "options": "icon-globe", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "show_in_website", - "fieldtype": "Check", - "label": "Show in Website", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "fieldname": "show_in_website", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Show in Website", + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "show_in_website", - "description": "website page link", - "fieldname": "page_name", - "fieldtype": "Data", - "label": "Page Name", - "no_copy": 1, - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "show_in_website", + "description": "website page link", + "fieldname": "page_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Page Name", + "no_copy": 1, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "show_in_website", - "description": "Items with higher weightage will be shown higher", - "fieldname": "weightage", - "fieldtype": "Int", - "label": "Weightage", - "permlevel": 0, - "read_only": 0, - "search_index": 1 - }, + "allow_on_submit": 0, + "depends_on": "show_in_website", + "description": "Items with higher weightage will be shown higher", + "fieldname": "weightage", + "fieldtype": "Int", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Weightage", + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "show_in_website", - "description": "Show a slideshow at the top of the page", - "fieldname": "slideshow", - "fieldtype": "Link", - "label": "Slideshow", - "options": "Website Slideshow", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "show_in_website", + "description": "Show a slideshow at the top of the page", + "fieldname": "slideshow", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Slideshow", + "no_copy": 0, + "options": "Website Slideshow", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "show_in_website", - "description": "Item Image (if not slideshow)", - "fieldname": "website_image", - "fieldtype": "Attach", - "label": "Image", - "options": "", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "show_in_website", + "description": "Item Image (if not slideshow)", + "fieldname": "website_image", + "fieldtype": "Attach", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Image", + "no_copy": 0, + "options": "", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "cb72", - "fieldtype": "Column Break", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "fieldname": "cb72", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "show_in_website", - "description": "Show \"In Stock\" or \"Not in Stock\" based on stock available in this warehouse.", - "fieldname": "website_warehouse", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Website Warehouse", - "options": "Warehouse", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "show_in_website", + "description": "Show \"In Stock\" or \"Not in Stock\" based on stock available in this warehouse.", + "fieldname": "website_warehouse", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "in_filter": 0, + "in_list_view": 0, + "label": "Website Warehouse", + "no_copy": 0, + "options": "Warehouse", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "show_in_website", - "description": "List this Item in multiple groups on the website.", - "fieldname": "website_item_groups", - "fieldtype": "Table", - "label": "Website Item Groups", - "options": "Website Item Group", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "show_in_website", + "description": "List this Item in multiple groups on the website.", + "fieldname": "website_item_groups", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Website Item Groups", + "no_copy": 0, + "options": "Website Item Group", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "show_in_website", - "fieldname": "sb72", - "fieldtype": "Section Break", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "show_in_website", + "fieldname": "sb72", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "website_specifications_cb", - "fieldtype": "Column Break", - "label": "Website Specifications", - "permlevel": 0, - "precision": "" - }, + "allow_on_submit": 0, + "fieldname": "website_specifications_cb", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Website Specifications", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "show_in_website", - "fieldname": "copy_from_item_group", - "fieldtype": "Button", - "label": "Copy From Item Group", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "show_in_website", + "fieldname": "copy_from_item_group", + "fieldtype": "Button", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Copy From Item Group", + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "show_in_website", - "fieldname": "website_specifications", - "fieldtype": "Table", - "label": "Website Specifications", - "options": "Item Website Specification", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "show_in_website", + "fieldname": "website_specifications", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Website Specifications", + "no_copy": 0, + "options": "Item Website Specification", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "depends_on": "show_in_website", - "fieldname": "web_long_description", - "fieldtype": "Text Editor", - "label": "Website Description", - "permlevel": 0, - "read_only": 0 - }, + "allow_on_submit": 0, + "depends_on": "show_in_website", + "fieldname": "web_long_description", + "fieldtype": "Text Editor", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Website Description", + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { - "fieldname": "parent_website_route", - "fieldtype": "Read Only", - "ignore_user_permissions": 1, - "label": "Parent Website Route", - "no_copy": 1, - "options": "", - "permlevel": 0 + "allow_on_submit": 0, + "fieldname": "parent_website_route", + "fieldtype": "Read Only", + "hidden": 0, + "ignore_user_permissions": 1, + "in_filter": 0, + "in_list_view": 0, + "label": "Parent Website Route", + "no_copy": 1, + "options": "", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } - ], - "icon": "icon-tag", - "idx": 1, - "max_attachments": 1, - "modified": "2015-07-30 06:04:28.448050", - "modified_by": "Administrator", - "module": "Stock", - "name": "Item", - "owner": "Administrator", + ], + "hide_heading": 0, + "hide_toolbar": 0, + "icon": "icon-tag", + "idx": 1, + "in_create": 0, + "in_dialog": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 0, + "max_attachments": 1, + "modified": "2015-08-04 07:04:46.573200", + "modified_by": "Administrator", + "module": "Stock", + "name": "Item", + "owner": "Administrator", "permissions": [ { - "create": 1, - "delete": 1, - "email": 1, - "import": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Item Manager", - "share": 1, - "submit": 0, + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Item Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 0, "write": 1 - }, + }, { - "amend": 0, - "create": 0, - "delete": 0, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Stock Manager", - "submit": 0, + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock Manager", + "set_user_permissions": 0, + "share": 0, + "submit": 0, "write": 0 - }, + }, { - "amend": 0, - "apply_user_permissions": 1, - "create": 0, - "delete": 0, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Stock User", - "submit": 0, + "amend": 0, + "apply_user_permissions": 1, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, "write": 0 - }, + }, { - "apply_user_permissions": 1, - "permlevel": 0, - "read": 1, - "role": "Sales User" - }, + "amend": 0, + "apply_user_permissions": 1, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 0, + "read": 1, + "report": 0, + "role": "Sales User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 0 + }, { - "apply_user_permissions": 1, - "permlevel": 0, - "read": 1, - "role": "Purchase User" - }, + "amend": 0, + "apply_user_permissions": 1, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 0, + "read": 1, + "report": 0, + "role": "Purchase User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 0 + }, { - "apply_user_permissions": 1, - "permlevel": 0, - "read": 1, - "role": "Maintenance User" - }, + "amend": 0, + "apply_user_permissions": 1, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 0, + "read": 1, + "report": 0, + "role": "Maintenance User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 0 + }, { - "apply_user_permissions": 1, - "permlevel": 0, - "read": 1, - "role": "Accounts User" - }, + "amend": 0, + "apply_user_permissions": 1, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 0, + "read": 1, + "report": 0, + "role": "Accounts User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 0 + }, { - "apply_user_permissions": 1, - "permlevel": 0, - "read": 1, - "role": "Manufacturing User" + "amend": 0, + "apply_user_permissions": 1, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 0, + "read": 1, + "report": 0, + "role": "Manufacturing User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 0 } - ], - "search_fields": "item_name,description,item_group,customer_code", + ], + "read_only": 0, + "read_only_onload": 0, + "search_fields": "item_name,description,item_group,customer_code", "title_field": "item_name" -} +} \ No newline at end of file diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index eaf904d1a8..0f97f02028 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import frappe +import json from frappe import msgprint, _ from frappe.utils import cstr, flt, cint, getdate, now_datetime, formatdate from frappe.website.website_generator import WebsiteGenerator @@ -63,6 +64,7 @@ class Item(WebsiteGenerator): self.synced_with_hub = 0 self.validate_has_variants() self.validate_stock_for_template_must_be_zero() + self.validate_template_attributes() if not self.get("__islocal"): self.old_item_group = frappe.db.get_value(self.doctype, self.name, "item_group") @@ -315,7 +317,7 @@ class Item(WebsiteGenerator): or ifnull(reserved_qty, 0) > 0 or ifnull(indented_qty, 0) > 0 or ifnull(planned_qty, 0) > 0)""", self.name) if stock_in: frappe.throw(_("Item Template cannot have stock or Open Sales/Purchase/Production Orders."), ItemTemplateCannotHaveStock) - + def validate_uom(self): if not self.get("__islocal"): check_stock_uom_with_bin(self.name, self.stock_uom) @@ -327,6 +329,15 @@ class Item(WebsiteGenerator): if template_uom != self.stock_uom: frappe.throw(_("Default Unit of Measure for Variant must be same as Template")) + def validate_template_attributes(self): + if self.has_variants: + attributes = [] + for d in self.valid_attributes: + if d.attribute in attributes: + frappe.throw(_("Attribute {0} selected multiple times in Attributes Table".format(d.attribute))) + else: + attributes.append(d.attribute) + def validate_end_of_life(item_code, end_of_life=None, verbose=1): if not end_of_life: end_of_life = frappe.db.get_value("Item", item_code, "end_of_life") @@ -458,3 +469,60 @@ def check_stock_uom_with_bin(item, stock_uom): frappe.throw(_("Default Unit of Measure for Item {0} cannot be changed directly because \ you have already made some transaction(s) with another UOM. To change default UOM, \ use 'UOM Replace Utility' tool under Stock module.").format(item)) + +@frappe.whitelist() +def get_variant(item, param): + args = json.loads(param) + attributes = {} + numeric_attributes = [] + for t in frappe.db.get_all("Item Attribute Value", fields=["parent", "attribute_value"]): + attributes.setdefault(t.parent, []).append(t.attribute_value) + + for t in frappe.get_list("Item Attribute", filters={"numeric_values":1}): + numeric_attributes.append(t.name) + + for d in args: + if d in numeric_attributes: + values = frappe.db.sql("""select from_range, to_range, increment from `tabItem Template Attribute` \ + where parent = %s and attribute = %s""", (item, d), as_dict=1)[0] + + if (not values.from_range < args[d] < values.to_range) or ((args[d] - values.from_range) % values.increment != 0): + frappe.throw(_("Attribute value {0} for attribute {1} must be within range of {2} to {3} and in increments of {4}") + .format(args[d], d, values.from_range, values.to_range, values.increment)) + else: + if args[d] not in attributes.get(d): + frappe.throw(_("Attribute value {0} for attribute {1} does not exist \ + in Item Attribute Master.").format(args[d], d)) + + conds="" + attributes = "" + for d in args: + if conds: + conds+= " and " + attributes+= ", " + + conds += """ exists(select iv.name from `tabVariant Attribute` iv where iv.parent = i.name and + iv.attribute= "{0}" and iv.attribute_value= "{1}")""".format(d, args[d]) + attributes += "'{0}'".format(d) + + conds += """and not exists (select iv.name from `tabVariant Attribute` iv where iv.parent = i.name and + iv.attribute not in ({0}))""".format(attributes) + + variant= frappe.db.sql("""select i.name from tabItem i where {0}""".format(conds)) + return variant + +@frappe.whitelist() +def create_variant(item, param): + from erpnext.stock.doctype.manage_variants.manage_variants import copy_attributes_to_variant + args = json.loads(param) + variant = frappe.new_doc("Item") + variant.item_code = item + variant_attributes = [] + for d in args: + variant_attributes.append({ + "attribute": d, + "attribute_value": args[d] + }) + variant.set("attributes", variant_attributes) + copy_attributes_to_variant(item, variant) + return variant diff --git a/erpnext/stock/doctype/item_attribute/item_attribute.json b/erpnext/stock/doctype/item_attribute/item_attribute.json index 1824fb68f5..35711dea74 100644 --- a/erpnext/stock/doctype/item_attribute/item_attribute.json +++ b/erpnext/stock/doctype/item_attribute/item_attribute.json @@ -26,24 +26,211 @@ "report_hide": 0, "reqd": 1, "search_index": 0, - "set_only_once": 0 + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "default": "1", + "depends_on": "eval: doc.numeric_values==0", "description": "Lower the number, higher the priority in the Item Code suffix that will be created for this Item Attribute for the Item Variant", "fieldname": "priority", "fieldtype": "Int", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Priority", + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, + "fieldname": "column_break_3", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "default": "0", + "fieldname": "numeric_values", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Numeric Values", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "depends_on": "numeric_values", + "fieldname": "section_break_5", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "fieldname": "from_range", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "From Range", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "fieldname": "increment", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Increment", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "fieldname": "column_break_8", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "fieldname": "to_range", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "To Range", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "depends_on": "eval: doc.numeric_values==0", + "fieldname": "section_break_10", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, "fieldname": "item_attribute_values", "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Item Attribute Values", + "no_copy": 0, "options": "Item Attribute Value", "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], "hide_heading": 0, @@ -54,7 +241,7 @@ "is_submittable": 0, "issingle": 0, "istable": 0, - "modified": "2015-07-13 05:28:20.561939", + "modified": "2015-08-05 05:27:55.912105", "modified_by": "Administrator", "module": "Stock", "name": "Item Attribute", @@ -69,6 +256,7 @@ "delete": 1, "email": 0, "export": 0, + "if_owner": 0, "import": 0, "permlevel": 0, "print": 0, diff --git a/erpnext/stock/doctype/item_attribute/item_attribute.py b/erpnext/stock/doctype/item_attribute/item_attribute.py index 171e1186f6..8350bed454 100644 --- a/erpnext/stock/doctype/item_attribute/item_attribute.py +++ b/erpnext/stock/doctype/item_attribute/item_attribute.py @@ -8,10 +8,20 @@ from frappe import _ class ItemAttribute(Document): def validate(self): + self.validate_numeric() self.validate_duplication() self.validate_attribute_values() - + def validate_numeric(self): + if self.numeric_values: + self.set("item_attribute_values", []) + if not self.from_range or not self.to_range: + frappe.throw(_("Please specify from/to Range")) + elif self.from_range > self.to_range: + frappe.throw(_("From Range cannot be greater than to Range")) + else: + self.from_range = self.to_range = self.increment = 0 + def validate_duplication(self): values, abbrs = [], [] for d in self.item_attribute_values: @@ -33,4 +43,5 @@ class ItemAttribute(Document): if variant_attributes: for d in variant_attributes: if d[0] not in attribute_values: - frappe.throw(_("Attribute Value {0} cannot be removed from {1} as Item Variants exist with this Attribute.").format(d[0], self.name)) + frappe.throw(_("Attribute Value {0} cannot be removed from {1} as Item Variants \ + exist with this Attribute.").format(d[0], self.name)) diff --git a/erpnext/stock/doctype/item_template_attribute/__init__.py b/erpnext/stock/doctype/item_template_attribute/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/stock/doctype/item_template_attribute/item_template_attribute.json b/erpnext/stock/doctype/item_template_attribute/item_template_attribute.json new file mode 100644 index 0000000000..40c1707eeb --- /dev/null +++ b/erpnext/stock/doctype/item_template_attribute/item_template_attribute.json @@ -0,0 +1,192 @@ +{ + "allow_copy": 0, + "allow_import": 1, + "allow_rename": 0, + "autoname": "", + "creation": "2015-07-31 02:14:41.660844", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "Other", + "fields": [ + { + "allow_on_submit": 0, + "fieldname": "attribute", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 1, + "label": "Attribute", + "no_copy": 0, + "options": "Item Attribute", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "fieldname": "column_break_2", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "fieldname": "numeric_values", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Numeric Values", + "no_copy": 0, + "options": "", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "depends_on": "numeric_values", + "fieldname": "section_break_4", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "fieldname": "from_range", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "From Range", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "fieldname": "increment", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Increment", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "fieldname": "column_break_7", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "fieldname": "to_range", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "To Range", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + } + ], + "hide_heading": 0, + "hide_toolbar": 0, + "icon": "", + "in_create": 0, + "in_dialog": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 1, + "modified": "2015-08-05 07:50:03.836731", + "modified_by": "Administrator", + "module": "Stock", + "name": "Item Template Attribute", + "name_case": "", + "owner": "Administrator", + "permissions": [], + "read_only": 0, + "read_only_onload": 0, + "sort_field": "modified", + "sort_order": "DESC" +} \ No newline at end of file diff --git a/erpnext/stock/doctype/item_template_attribute/item_template_attribute.py b/erpnext/stock/doctype/item_template_attribute/item_template_attribute.py new file mode 100644 index 0000000000..b82bebdad9 --- /dev/null +++ b/erpnext/stock/doctype/item_template_attribute/item_template_attribute.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from frappe.model.document import Document + +class ItemTemplateAttribute(Document): + pass diff --git a/erpnext/stock/doctype/manage_variants/manage_variants.py b/erpnext/stock/doctype/manage_variants/manage_variants.py index 4dcfb22dac..d88c5bcdae 100644 --- a/erpnext/stock/doctype/manage_variants/manage_variants.py +++ b/erpnext/stock/doctype/manage_variants/manage_variants.py @@ -6,6 +6,7 @@ from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document +from frappe.utils import cstr import copy import json @@ -204,4 +205,4 @@ def copy_attributes_to_variant(item, variant, variant_attribute=None, insert=Fal if variant.attributes: variant.description += "\n" for d in variant.attributes: - variant.description += "

" + d.attribute + ": " + d.attribute_value + "

" \ No newline at end of file + variant.description += "

" + d.attribute + ": " + cstr(d.attribute_value) + "

" \ No newline at end of file From ebf4cbeae3dbd0acd49fc86c39d0bbbf817953a3 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Wed, 5 Aug 2015 20:06:59 +0530 Subject: [PATCH 02/26] Fixed Manage Variant --- .../manage_variants/manage_variants.py | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/doctype/manage_variants/manage_variants.py b/erpnext/stock/doctype/manage_variants/manage_variants.py index d88c5bcdae..3114a6cdd6 100644 --- a/erpnext/stock/doctype/manage_variants/manage_variants.py +++ b/erpnext/stock/doctype/manage_variants/manage_variants.py @@ -6,7 +6,7 @@ from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document -from frappe.utils import cstr +from frappe.utils import cstr, flt import copy import json @@ -70,12 +70,26 @@ class ManageVariants(Document): def validate_attribute_values(self): attributes = {} + numeric_attributes = [] for t in frappe.db.get_all("Item Attribute Value", fields=["parent", "attribute_value"]): attributes.setdefault(t.parent, []).append(t.attribute_value) - + + for t in frappe.get_list("Item Attribute", filters={"numeric_values":1}): + numeric_attributes.append(t.name) + for d in self.attributes: - if d.attribute_value not in attributes.get(d.attribute): - frappe.throw(_("Attribute value {0} does not exist in Item Attribute Master.").format(d.attribute_value)) + if d.attribute in numeric_attributes: + values = frappe.db.sql("""select from_range, to_range, increment from `tabItem Template Attribute` \ + where parent = %s and attribute = %s""", (self.item_code, d.attribute), as_dict=1)[0] + + if (not values.from_range < flt(d.attribute_value) < values.to_range) \ + or ((flt(d.attribute_value) - values.from_range) % values.increment != 0): + frappe.throw(_("Attribute value {0} for attribute {1} must be within range of {2} to {3} and in increments of {4}") + .format(d.attribute_value, d.attribute, values.from_range, values.to_range, values.increment)) + else: + if d.attribute_value not in attributes.get(d.attribute): + frappe.throw(_("Attribute value {0} for attribute {1} does not exist \ + in Item Attribute Master.").format(d.attribute_value, d.attribute)) def validate_attributes_are_unique(self): attributes = [] From b9b49632f2ec4c006bd1ef99877b789ed6646de0 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Thu, 6 Aug 2015 13:35:12 +0530 Subject: [PATCH 03/26] Added patch to fetch Item Template Attributes --- erpnext/patches.txt | 1 + erpnext/patches/v5_4/item_template.py | 16 ++++++++++++++++ erpnext/stock/doctype/item/item_list.js | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 erpnext/patches/v5_4/item_template.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 8e3aab1d97..c7c938832b 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -192,3 +192,4 @@ erpnext.patches.v5_4.fix_missing_item_images erpnext.patches.v5_4.stock_entry_additional_costs erpnext.patches.v5_4.cleanup_journal_entry execute:frappe.db.sql("update `tabProduction Order` pro set description = (select description from tabItem where name=pro.production_item) where ifnull(description, '') = ''") +erpnext.patches.v5_4.item_template diff --git a/erpnext/patches/v5_4/item_template.py b/erpnext/patches/v5_4/item_template.py new file mode 100644 index 0000000000..4183654d16 --- /dev/null +++ b/erpnext/patches/v5_4/item_template.py @@ -0,0 +1,16 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + item_attribute = {} + for d in frappe.db.sql("""select DISTINCT va.attribute, i.variant_of from `tabVariant Attribute` va, `tabItem` i \ + where va.parent = i.name""", as_dict=1): + item_attribute.setdefault(d.variant_of, []).append({"attribute": d.attribute}) + + for item, attributes in item_attribute.items(): + template = frappe.get_doc("Item", item) + template.set('valid_attributes', attributes) + template.save() \ No newline at end of file diff --git a/erpnext/stock/doctype/item/item_list.js b/erpnext/stock/doctype/item/item_list.js index 6eaa4920ea..46a22ea5d5 100644 --- a/erpnext/stock/doctype/item/item_list.js +++ b/erpnext/stock/doctype/item/item_list.js @@ -6,7 +6,7 @@ frappe.listview_settings['Item'] = { if(doc.end_of_life && doc.end_of_life < frappe.datetime.get_today()) { return [__("Expired"), "grey", "end_of_life,<,Today"] } else if(doc.has_variants) { - return [__("Template"), "blue", "has_variant,=,1"] + return [__("Template"), "blue", "has_variants,=,Yes"] } else if(doc.variant_of) { return [__("Variant"), "green", "variant_of,=," + doc.variant_of] } else { From cdc060cb7c22b38437024f1698117ac9af3a80ed Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Thu, 6 Aug 2015 15:24:35 +0530 Subject: [PATCH 04/26] Allow Editing variant attribute in Variant. Add validation to check duplication. --- erpnext/stock/doctype/item/item.js | 2 +- erpnext/stock/doctype/item/item.py | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index a94c8f6831..bb86885ec2 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -224,7 +224,7 @@ $.extend(erpnext.item, { method:"erpnext.stock.doctype.item.item.get_variant", args: { "item": cur_frm.doc.name, - "param": d.get_values() + "args": d.get_values() }, callback: function(r) { if (r.message) { diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 0f97f02028..66d24134b3 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -65,6 +65,7 @@ class Item(WebsiteGenerator): self.validate_has_variants() self.validate_stock_for_template_must_be_zero() self.validate_template_attributes() + self.validate_variant_attributes() if not self.get("__islocal"): self.old_item_group = frappe.db.get_value(self.doctype, self.name, "item_group") @@ -337,6 +338,16 @@ class Item(WebsiteGenerator): frappe.throw(_("Attribute {0} selected multiple times in Attributes Table".format(d.attribute))) else: attributes.append(d.attribute) + + def validate_variant_attributes(self): + if self.variant_of: + args = {} + for d in self.attributes: + args[d.attribute] = d.attribute_value + + variant = get_variant(self.variant_of, args) + if variant and not variant[0][0] == self.name: + frappe.throw(_("Item variant {0} exists with same attributes".format(variant[0][0]) )) def validate_end_of_life(item_code, end_of_life=None, verbose=1): if not end_of_life: @@ -471,8 +482,9 @@ def check_stock_uom_with_bin(item, stock_uom): use 'UOM Replace Utility' tool under Stock module.").format(item)) @frappe.whitelist() -def get_variant(item, param): - args = json.loads(param) +def get_variant(item, args): + if not type(args) == dict: + args = json.loads(args) attributes = {} numeric_attributes = [] for t in frappe.db.get_all("Item Attribute Value", fields=["parent", "attribute_value"]): @@ -486,7 +498,7 @@ def get_variant(item, param): values = frappe.db.sql("""select from_range, to_range, increment from `tabItem Template Attribute` \ where parent = %s and attribute = %s""", (item, d), as_dict=1)[0] - if (not values.from_range < args[d] < values.to_range) or ((args[d] - values.from_range) % values.increment != 0): + if (not values.from_range < cint(args[d]) < values.to_range) or ((cint(args[d]) - values.from_range) % values.increment != 0): frappe.throw(_("Attribute value {0} for attribute {1} must be within range of {2} to {3} and in increments of {4}") .format(args[d], d, values.from_range, values.to_range, values.increment)) else: From 62dba50e9bc663009c335a93109700890f3835fc Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Mon, 10 Aug 2015 15:51:13 +0530 Subject: [PATCH 05/26] Multiple Fixes --- erpnext/change_log/v5/v5_1_0.md | 1 - erpnext/change_log/v5/v5_1_3.md | 1 - erpnext/config/stock.py | 7 +- erpnext/manufacturing/doctype/bom/bom.json | 462 +++++++++++++-- .../bom_explosion_item.json | 232 +++++++- .../doctype/bom_item/bom_item.json | 238 +++++++- .../doctype/bom_operation/bom_operation.json | 107 +++- .../bom_replace_tool/bom_replace_tool.json | 61 +- .../production_order/production_order.json | 530 +++++++++++++++-- erpnext/patches.txt | 1 - erpnext/patches/v5_0/item_variants.py | 19 - erpnext/patches/v5_4/item_template.py | 7 +- erpnext/projects/doctype/project/project.json | 561 ++++++++++++++++-- .../doctype/project_task/project_task.json | 75 ++- erpnext/stock/doctype/item/item.js | 78 +-- erpnext/stock/doctype/item/item.json | 30 +- erpnext/stock/doctype/item/item.py | 30 +- .../item_attribute/item_attribute.json | 54 +- .../item_template_attribute/__init__.py | 0 .../item_template_attribute.json | 192 ------ .../item_template_attribute.py | 10 - .../stock/doctype/manage_variants/__init__.py | 0 .../manage_variants/manage_variants.js | 60 -- .../manage_variants/manage_variants.json | 103 ---- .../manage_variants/manage_variants.py | 222 ------- .../manage_variants/test_manage_variants.py | 49 -- .../doctype/manage_variants_item/__init__.py | 0 .../manage_variants_item.json | 76 --- .../manage_variants_item.py | 10 - .../doctype/stock_entry/stock_entry.json | 2 +- .../doctype/stock_entry/test_stock_entry.py | 16 - .../stock_entry_detail.json | 2 +- .../stock_settings/stock_settings.json | 2 +- .../stock_uom_replace_utility.json | 104 +++- .../variant_attribute/variant_attribute.json | 161 ++++- 35 files changed, 2425 insertions(+), 1078 deletions(-) delete mode 100644 erpnext/patches/v5_0/item_variants.py delete mode 100644 erpnext/stock/doctype/item_template_attribute/__init__.py delete mode 100644 erpnext/stock/doctype/item_template_attribute/item_template_attribute.json delete mode 100644 erpnext/stock/doctype/item_template_attribute/item_template_attribute.py delete mode 100644 erpnext/stock/doctype/manage_variants/__init__.py delete mode 100644 erpnext/stock/doctype/manage_variants/manage_variants.js delete mode 100644 erpnext/stock/doctype/manage_variants/manage_variants.json delete mode 100644 erpnext/stock/doctype/manage_variants/manage_variants.py delete mode 100644 erpnext/stock/doctype/manage_variants/test_manage_variants.py delete mode 100644 erpnext/stock/doctype/manage_variants_item/__init__.py delete mode 100644 erpnext/stock/doctype/manage_variants_item/manage_variants_item.json delete mode 100644 erpnext/stock/doctype/manage_variants_item/manage_variants_item.py diff --git a/erpnext/change_log/v5/v5_1_0.md b/erpnext/change_log/v5/v5_1_0.md index 3ed2227f82..bf869a0a68 100644 --- a/erpnext/change_log/v5/v5_1_0.md +++ b/erpnext/change_log/v5/v5_1_0.md @@ -1,4 +1,3 @@ -- Item variants is now manageable via dedicated tool **Manage Variants**. To learn about it, check [Manual Page for Item variants](https://manual.erpnext.com/contents/stock/item/item-variants) - Against account in General Ledger will show Party instead of Account (which is not useful) - Print format for recurring documents can be set by the users - Recurring documents won't be created for Stopped Sales / Purchase Orders. diff --git a/erpnext/change_log/v5/v5_1_3.md b/erpnext/change_log/v5/v5_1_3.md index 9825a10ffb..d6fbb7bb3a 100644 --- a/erpnext/change_log/v5/v5_1_3.md +++ b/erpnext/change_log/v5/v5_1_3.md @@ -1,3 +1,2 @@ - Hide zero balance rows in batch-wise balance history report -- Autocomplete issue fixed in Manage Variants - Remove user permission (Employee role) if user id is unset from Employee record \ No newline at end of file diff --git a/erpnext/config/stock.py b/erpnext/config/stock.py index f4ec6f087c..f5ecba0458 100644 --- a/erpnext/config/stock.py +++ b/erpnext/config/stock.py @@ -82,12 +82,7 @@ def get_data(): "type": "doctype", "name": "Stock UOM Replace Utility", "description": _("Change UOM for an Item."), - }, - { - "type": "doctype", - "name": "Manage Variants", - "description": _("Manage Item Variants."), - }, + } ] }, { diff --git a/erpnext/manufacturing/doctype/bom/bom.json b/erpnext/manufacturing/doctype/bom/bom.json index 67e2b78bbb..b1ffd4d642 100644 --- a/erpnext/manufacturing/doctype/bom/bom.json +++ b/erpnext/manufacturing/doctype/bom/bom.json @@ -3,50 +3,112 @@ "allow_import": 1, "allow_rename": 0, "creation": "2013-01-22 15:11:38", + "custom": 0, "docstatus": 0, "doctype": "DocType", "document_type": "Master", "fields": [ { + "allow_on_submit": 0, "description": "Item to be manufactured or repacked", "fieldname": "item", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, "in_filter": 1, "in_list_view": 1, "label": "Item", + "no_copy": 0, "oldfieldname": "item", "oldfieldtype": "Link", "options": "Item", "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, "reqd": 1, - "search_index": 1 + "search_index": 1, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "item_name", "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Item Name", + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "rm_cost_as_per", "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Rate Of Materials Based On", + "no_copy": 0, "options": "Valuation Rate\nLast Purchase Rate\nPrice List", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "depends_on": "eval:doc.rm_cost_as_per===\"Price List\"", "fieldname": "buying_price_list", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Price List", + "no_copy": 0, "options": "Price List", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "cb0", "fieldtype": "Column Break", - "permlevel": 0 + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { "allow_on_submit": 1, @@ -54,213 +116,517 @@ "fieldname": "is_active", "fieldtype": "Check", "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Is Active", "no_copy": 1, "oldfieldname": "is_active", "oldfieldtype": "Select", "permlevel": 0, - "reqd": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { "allow_on_submit": 1, "default": "1", "fieldname": "is_default", "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Is Default", "no_copy": 1, "oldfieldname": "is_default", "oldfieldtype": "Check", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "description": "Manage cost of operations", "fieldname": "with_operations", "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "With Operations", - "permlevel": 0 + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "depends_on": "", "description": "Specify the operations, operating cost and give a unique Operation no to your operations.", "fieldname": "operations_section", "fieldtype": "Section Break", - "label": "Operations", - "oldfieldtype": "Section Break", - "permlevel": 0 - }, - { - "fieldname": "operations", - "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 0, "label": "Operations", + "no_copy": 0, + "oldfieldtype": "Section Break", + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "fieldname": "operations", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Operations", + "no_copy": 0, "oldfieldname": "bom_operations", "oldfieldtype": "Table", "options": "BOM Operation", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "materials_section", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Materials", + "no_copy": 0, "oldfieldtype": "Section Break", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "items", "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Items", + "no_copy": 0, "oldfieldname": "bom_materials", "oldfieldtype": "Table", "options": "BOM Item", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "default": "1", "description": "Quantity of item obtained after manufacturing / repacking from given quantities of raw materials", "fieldname": "quantity", "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Quantity", + "no_copy": 0, "oldfieldname": "quantity", "oldfieldtype": "Currency", "permlevel": 0, - "reqd": 1 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "costing", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Costing", + "no_copy": 0, "oldfieldtype": "Section Break", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "operating_cost", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 0, "label": "Operating Cost", + "no_copy": 0, "options": "Company:company:default_currency", "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "raw_material_cost", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Raw Material Cost", + "no_copy": 0, "options": "Company:company:default_currency", "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "cb1", "fieldtype": "Column Break", - "permlevel": 0 + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "total_cost", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Total Cost", + "no_copy": 0, "options": "Company:company:default_currency", "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "more_info_section", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "", - "permlevel": 0 + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "project_name", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, "in_filter": 1, + "in_list_view": 0, "label": "Project Name", + "no_copy": 0, "oldfieldname": "project_name", "oldfieldtype": "Link", "options": "Project", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "company", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Company", + "no_copy": 0, "options": "Company", "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "amended_from", "fieldtype": "Link", + "hidden": 0, "ignore_user_permissions": 1, + "in_filter": 0, + "in_list_view": 0, "label": "Amended From", "no_copy": 1, "options": "BOM", "permlevel": 0, "print_hide": 1, - "read_only": 1 + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "col_break23", "fieldtype": "Column Break", - "permlevel": 0 + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "uom", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Item UOM", + "no_copy": 0, "options": "UOM", "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "section_break_25", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "description", "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 0, "label": "Item Desription", + "no_copy": 0, "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break_27", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "image", "fieldtype": "Attach", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Image", + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { - "fieldname": "Image_view", + "allow_on_submit": 0, + "fieldname": "image_view", "fieldtype": "Image", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Image View", + "no_copy": 0, "options": "image", "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "depends_on": "eval:!doc.__islocal", "fieldname": "section_break0", "fieldtype": "Section Break", "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Materials Required (Exploded)", + "no_copy": 0, "permlevel": 0, - "print_hide": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "exploded_items", "fieldtype": "Table", "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Exploded_items", "no_copy": 1, "oldfieldname": "flat_bom_details", @@ -268,7 +634,12 @@ "options": "BOM Explosion Item", "permlevel": 0, "print_hide": 1, - "read_only": 1 + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], "hide_heading": 0, @@ -276,46 +647,59 @@ "icon": "icon-sitemap", "idx": 1, "in_create": 0, + "in_dialog": 0, "is_submittable": 1, "issingle": 0, "istable": 0, - "modified": "2015-06-26 02:02:30.705279", + "modified": "2015-08-12 08:52:36.656865", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM", "owner": "Administrator", "permissions": [ { + "amend": 0, + "apply_user_permissions": 0, "cancel": 1, "create": 1, "delete": 1, "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, "permlevel": 0, "print": 1, "read": 1, "report": 1, "role": "Manufacturing Manager", + "set_user_permissions": 0, "share": 1, "submit": 1, "write": 1 }, { + "amend": 0, "apply_user_permissions": 1, "cancel": 1, "create": 1, "delete": 1, "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, "permlevel": 0, "print": 1, "read": 1, "report": 1, "role": "Manufacturing User", + "set_user_permissions": 0, "share": 1, "submit": 1, "write": 1 } ], "read_only": 0, + "read_only_onload": 0, "search_fields": "item", "sort_field": "modified", "sort_order": "DESC" diff --git a/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json b/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json index 14f091a068..a05113df4d 100644 --- a/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json +++ b/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json @@ -1,150 +1,336 @@ { + "allow_copy": 0, + "allow_import": 0, + "allow_rename": 0, "autoname": "hash", "creation": "2013-03-07 11:42:57", + "custom": 0, "default_print_format": "Standard", "docstatus": 0, "doctype": "DocType", "fields": [ { + "allow_on_submit": 0, "fieldname": "item_code", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Item Code", + "no_copy": 0, "oldfieldname": "item_code", "oldfieldtype": "Link", "options": "Item", "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "cb", "fieldtype": "Column Break", - "permlevel": 0, - "precision": "" - }, - { - "fieldname": "item_name", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Item Name", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, "precision": "", - "read_only": 1 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, + "fieldname": "item_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 1, + "label": "Item Name", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, "fieldname": "section_break_3", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "description", "fieldtype": "Text", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Description", + "no_copy": 0, "oldfieldname": "description", "oldfieldtype": "Text", "permlevel": 0, + "print_hide": 0, "print_width": "300px", "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0, "width": "300px" }, { + "allow_on_submit": 0, "fieldname": "column_break_2", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "image", "fieldtype": "Attach", "hidden": 1, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Image", + "no_copy": 0, "permlevel": 0, "precision": "", - "print_hide": 1 + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "image_view", "fieldtype": "Image", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Image View", + "no_copy": 0, "options": "image", "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "section_break_4", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "qty", "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Qty", + "no_copy": 0, "oldfieldname": "qty", "oldfieldtype": "Currency", "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "rate", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Rate", + "no_copy": 0, "oldfieldname": "standard_rate", "oldfieldtype": "Currency", "options": "Company:company:default_currency", "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "qty_consumed_per_unit", "fieldtype": "Float", "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Qty Consumed Per Unit", "no_copy": 0, "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break_8", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "stock_uom", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 0, "label": "Stock UOM", + "no_copy": 0, "oldfieldname": "stock_uom", "oldfieldtype": "Link", "options": "UOM", "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "amount", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Amount", + "no_copy": 0, "oldfieldname": "amount_as_per_sr", "oldfieldtype": "Currency", "options": "Company:company:default_currency", "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], + "hide_heading": 0, + "hide_toolbar": 0, "idx": 1, + "in_create": 0, + "in_dialog": 0, + "is_submittable": 0, + "issingle": 0, "istable": 1, - "modified": "2015-02-19 01:06:59.399382", + "modified": "2015-08-12 08:52:39.190103", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM Explosion Item", "owner": "Administrator", "permissions": [], - "read_only": 0 + "read_only": 0, + "read_only_onload": 0 } \ No newline at end of file diff --git a/erpnext/manufacturing/doctype/bom_item/bom_item.json b/erpnext/manufacturing/doctype/bom_item/bom_item.json index 4870241836..06d8350361 100644 --- a/erpnext/manufacturing/doctype/bom_item/bom_item.json +++ b/erpnext/manufacturing/doctype/bom_item/bom_item.json @@ -1,174 +1,382 @@ { + "allow_copy": 0, + "allow_import": 0, + "allow_rename": 0, "creation": "2013-02-22 01:27:49", + "custom": 0, "docstatus": 0, "doctype": "DocType", "fields": [ { + "allow_on_submit": 0, "fieldname": "item_code", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, "in_filter": 1, "in_list_view": 1, "label": "Item Code", + "no_copy": 0, "oldfieldname": "item_code", "oldfieldtype": "Link", "options": "Item", "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, "reqd": 1, - "search_index": 1 + "search_index": 1, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "item_name", "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Item Name", + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break_3", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "bom_no", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, "in_filter": 1, "in_list_view": 0, "label": "BOM No", + "no_copy": 0, "oldfieldname": "bom_no", "oldfieldtype": "Link", "options": "BOM", "permlevel": 0, + "print_hide": 0, "print_width": "150px", + "read_only": 0, + "report_hide": 0, "reqd": 0, "search_index": 1, + "set_only_once": 0, + "unique": 0, "width": "150px" }, { + "allow_on_submit": 0, "fieldname": "section_break_5", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "description", "fieldtype": "Text", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Item Description", + "no_copy": 0, "oldfieldname": "description", "oldfieldtype": "Text", "permlevel": 0, + "print_hide": 0, "print_width": "250px", + "read_only": 0, + "report_hide": 0, "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0, "width": "250px" }, { + "allow_on_submit": 0, "fieldname": "col_break1", "fieldtype": "Column Break", - "permlevel": 0 + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "image", "fieldtype": "Attach", "hidden": 1, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Image", + "no_copy": 0, "permlevel": 0, "precision": "", - "print_hide": 1 + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "image_view", "fieldtype": "Image", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Image View", + "no_copy": 0, "options": "image", "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "quantity_and_rate", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Quantity and Rate", - "permlevel": 0 + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "qty", "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Qty", + "no_copy": 0, "oldfieldname": "qty", "oldfieldtype": "Currency", "permlevel": 0, - "reqd": 1 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "description": "See \"Rate Of Materials Based On\" in Costing Section", "fieldname": "rate", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Rate", + "no_copy": 0, "options": "Company:company:default_currency", "permlevel": 0, - "reqd": 1 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "col_break2", "fieldtype": "Column Break", - "permlevel": 0 + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "stock_uom", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 0, "label": "Stock UOM", + "no_copy": 0, "oldfieldname": "stock_uom", "oldfieldtype": "Data", "options": "UOM", "permlevel": 0, + "print_hide": 0, "read_only": 1, - "reqd": 1 + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "amount", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Amount", + "no_copy": 0, "oldfieldname": "amount_as_per_mar", "oldfieldtype": "Currency", "options": "Company:company:default_currency", "permlevel": 0, + "print_hide": 0, "print_width": "150px", "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0, "width": "150px" }, { + "allow_on_submit": 0, "fieldname": "scrap", "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Scrap %", + "no_copy": 0, "oldfieldname": "scrap", "oldfieldtype": "Currency", "permlevel": 0, - "print_hide": 1 + "print_hide": 1, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "qty_consumed_per_unit", "fieldtype": "Float", "hidden": 1, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Qty Consumed Per Unit", + "no_copy": 0, "oldfieldname": "qty_consumed_per_unit", "oldfieldtype": "Float", "permlevel": 0, "print_hide": 1, - "read_only": 1 + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], + "hide_heading": 0, + "hide_toolbar": 0, "idx": 1, + "in_create": 0, + "in_dialog": 0, + "is_submittable": 0, + "issingle": 0, "istable": 1, - "modified": "2015-02-12 15:17:18.324810", + "modified": "2015-08-12 08:52:41.512788", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM Item", "owner": "Administrator", "permissions": [], + "read_only": 0, + "read_only_onload": 0, "sort_field": "modified", "sort_order": "DESC" } \ No newline at end of file diff --git a/erpnext/manufacturing/doctype/bom_operation/bom_operation.json b/erpnext/manufacturing/doctype/bom_operation/bom_operation.json index 0c25e8fcc2..59f0eb1e1c 100644 --- a/erpnext/manufacturing/doctype/bom_operation/bom_operation.json +++ b/erpnext/manufacturing/doctype/bom_operation/bom_operation.json @@ -1,86 +1,175 @@ { + "allow_copy": 0, + "allow_import": 0, + "allow_rename": 0, "creation": "2013-02-22 01:27:49", + "custom": 0, "docstatus": 0, "doctype": "DocType", "fields": [ { + "allow_on_submit": 0, "fieldname": "operation", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Operation", + "no_copy": 0, "oldfieldname": "operation_no", "oldfieldtype": "Data", "options": "Operation", "permlevel": 0, - "reqd": 1 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "workstation", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Workstation", + "no_copy": 0, "oldfieldname": "workstation", "oldfieldtype": "Link", "options": "Workstation", "permlevel": 0, - "reqd": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "description", "fieldtype": "Text", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Operation Description", + "no_copy": 0, "oldfieldname": "opn_description", "oldfieldtype": "Text", "permlevel": 0, - "reqd": 1 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "col_break1", "fieldtype": "Column Break", - "permlevel": 0 + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "hour_rate", "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 0, "label": "Hour Rate", + "no_copy": 0, "oldfieldname": "hour_rate", "oldfieldtype": "Currency", "permlevel": 0, - "reqd": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "description": "In minutes", "fieldname": "time_in_mins", "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 0, "label": "Operation Time ", + "no_copy": 0, "oldfieldname": "time_in_mins", "oldfieldtype": "Currency", "options": "", "permlevel": 0, - "reqd": 1 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { "allow_on_submit": 0, "fieldname": "operating_cost", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Operating Cost", + "no_copy": 0, "oldfieldname": "operating_cost", "oldfieldtype": "Currency", "permlevel": 0, + "print_hide": 0, "read_only": 1, - "reqd": 0 + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], + "hide_heading": 0, + "hide_toolbar": 0, "idx": 1, + "in_create": 0, + "in_dialog": 0, + "is_submittable": 0, + "issingle": 0, "istable": 1, - "modified": "2015-04-22 03:24:47.809532", + "modified": "2015-08-12 08:52:43.922881", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM Operation", "owner": "Administrator", - "permissions": [] + "permissions": [], + "read_only": 0, + "read_only_onload": 0 } \ No newline at end of file diff --git a/erpnext/manufacturing/doctype/bom_replace_tool/bom_replace_tool.json b/erpnext/manufacturing/doctype/bom_replace_tool/bom_replace_tool.json index a1e215dd05..91ee189d7e 100644 --- a/erpnext/manufacturing/doctype/bom_replace_tool/bom_replace_tool.json +++ b/erpnext/manufacturing/doctype/bom_replace_tool/bom_replace_tool.json @@ -1,40 +1,77 @@ { "allow_copy": 1, "allow_email": 1, + "allow_import": 0, "allow_print": 1, + "allow_rename": 0, "creation": "2012-12-06 12:10:10", + "custom": 0, "description": "Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate \"BOM Explosion Item\" table as per new BOM", "docstatus": 0, "doctype": "DocType", "document_type": "Other", "fields": [ { + "allow_on_submit": 0, "description": "The BOM which will be replaced", "fieldname": "current_bom", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Current BOM", + "no_copy": 0, "options": "BOM", "permlevel": 0, + "print_hide": 0, "read_only": 0, - "reqd": 1 + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "description": "The new BOM after replacement", "fieldname": "new_bom", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "New BOM", + "no_copy": 0, "options": "BOM", "permlevel": 0, + "print_hide": 0, "read_only": 0, - "reqd": 1 + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "replace", "fieldtype": "Button", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Replace", + "no_copy": 0, "options": "replace_bom", "permlevel": 0, - "read_only": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], "hide_heading": 1, @@ -42,23 +79,37 @@ "icon": "icon-magic", "idx": 1, "in_create": 1, + "in_dialog": 0, + "is_submittable": 0, "issingle": 1, - "modified": "2015-02-05 05:11:35.233845", + "istable": 0, + "modified": "2015-08-12 08:52:46.035343", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM Replace Tool", "owner": "Administrator", "permissions": [ { + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, "create": 1, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, "permlevel": 0, + "print": 0, "read": 1, "report": 0, "role": "Manufacturing Manager", + "set_user_permissions": 0, "share": 1, "submit": 0, "write": 1 } ], - "read_only": 1 + "read_only": 1, + "read_only_onload": 0 } \ No newline at end of file diff --git a/erpnext/manufacturing/doctype/production_order/production_order.json b/erpnext/manufacturing/doctype/production_order/production_order.json index e07ac5bf97..19107668aa 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.json +++ b/erpnext/manufacturing/doctype/production_order/production_order.json @@ -1,31 +1,62 @@ { + "allow_copy": 0, "allow_import": 1, + "allow_rename": 0, "autoname": "naming_series:", "creation": "2013-01-10 16:34:16", + "custom": 0, "docstatus": 0, "doctype": "DocType", "fields": [ { + "allow_on_submit": 0, "fieldname": "item", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "", + "no_copy": 0, "options": "icon-gift", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "default": "PRO-", "fieldname": "naming_series", "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Series", + "no_copy": 0, "options": "PRO-", "permlevel": 0, - "reqd": 1 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "default": "Draft", "depends_on": "eval:!doc.__islocal", "fieldname": "status", "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, "in_filter": 1, "in_list_view": 0, "label": "Status", @@ -34,333 +65,739 @@ "oldfieldtype": "Select", "options": "\nDraft\nSubmitted\nStopped\nIn Process\nCompleted\nCancelled", "permlevel": 0, + "print_hide": 0, "read_only": 1, + "report_hide": 0, "reqd": 1, - "search_index": 1 + "search_index": 1, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "production_item", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, "in_filter": 1, "in_list_view": 1, "label": "Item To Manufacture", + "no_copy": 0, "oldfieldname": "production_item", "oldfieldtype": "Link", "options": "Item", "permlevel": 0, + "print_hide": 0, "read_only": 0, - "reqd": 1 + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "depends_on": "", "description": "", "fieldname": "bom_no", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 0, "label": "BOM No", + "no_copy": 0, "oldfieldname": "bom_no", "oldfieldtype": "Link", "options": "BOM", "permlevel": 0, + "print_hide": 0, "read_only": 0, - "reqd": 1 + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "default": "1", "description": "Plan material for sub-assemblies", "fieldname": "use_multi_level_bom", "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Use Multi-Level BOM", - "permlevel": 0 + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break1", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "oldfieldtype": "Column Break", "permlevel": 0, + "print_hide": 0, "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0, "width": "50%" }, { + "allow_on_submit": 0, "depends_on": "", "fieldname": "qty", "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 0, "label": "Qty To Manufacture", + "no_copy": 0, "oldfieldname": "qty", "oldfieldtype": "Currency", "permlevel": 0, + "print_hide": 0, "read_only": 0, - "reqd": 1 + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "default": "0", "depends_on": "eval:doc.docstatus==1", "description": "", "fieldname": "material_transferred_for_manufacturing", "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Material Transferred for Manufacturing", "no_copy": 1, "permlevel": 0, "precision": "", - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "default": "0", "depends_on": "eval:doc.docstatus==1", "description": "", "fieldname": "produced_qty", "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Manufactured Qty", "no_copy": 1, "oldfieldname": "produced_qty", "oldfieldtype": "Currency", "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "warehouses", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Warehouses", + "no_copy": 0, "options": "icon-building", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "wip_warehouse", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Work-in-Progress Warehouse", + "no_copy": 0, "options": "Warehouse", "permlevel": 0, - "reqd": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break_12", "fieldtype": "Column Break", - "permlevel": 0 + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "depends_on": "", "description": "", "fieldname": "fg_warehouse", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 0, "label": "Target Warehouse", + "no_copy": 0, "options": "Warehouse", "permlevel": 0, + "print_hide": 0, "read_only": 0, - "reqd": 0 + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "time", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Time", + "no_copy": 0, "options": "icon-time", "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "depends_on": "", "fieldname": "expected_delivery_date", "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Expected Delivery Date", + "no_copy": 0, "permlevel": 0, - "read_only": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "default": "now", "fieldname": "planned_start_date", "fieldtype": "Datetime", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Planned Start Date", + "no_copy": 0, "permlevel": 0, "precision": "", - "reqd": 1 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "planned_end_date", "fieldtype": "Datetime", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Planned End Date", "no_copy": 1, "permlevel": 0, "precision": "", - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break_13", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "actual_start_date", "fieldtype": "Datetime", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Actual Start Date", + "no_copy": 0, "permlevel": 0, "precision": "", - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "actual_end_date", "fieldtype": "Datetime", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Actual End Date", + "no_copy": 0, "permlevel": 0, "precision": "", - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "depends_on": "", "fieldname": "operations_section", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Operations", + "no_copy": 0, "options": "icon-wrench", "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "depends_on": "", "fieldname": "operations", "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Operations", + "no_copy": 0, "options": "Production Order Operation", "permlevel": 0, "precision": "", - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "depends_on": "operations", "fieldname": "section_break_22", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Operation Cost", + "no_copy": 0, "options": "", "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "planned_operating_cost", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Planned Operating Cost", "no_copy": 0, "options": "Company:company:default_currency", "permlevel": 0, "precision": "", - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "actual_operating_cost", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Actual Operating Cost", "no_copy": 1, "options": "Company:company:default_currency", "permlevel": 0, "precision": "", - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "additional_operating_cost", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Additional Operating Cost", "no_copy": 1, "options": "Company:company:default_currency", "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break_24", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "total_operating_cost", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Total Operating Cost", "no_copy": 1, "options": "Company:company:default_currency", "permlevel": 0, "precision": "", - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "more_info", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "More Info", + "no_copy": 0, "options": "icon-file-text", "permlevel": 0, - "read_only": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "description", "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Item Description", + "no_copy": 0, "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "depends_on": "", "fieldname": "stock_uom", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Stock UOM", + "no_copy": 0, "oldfieldname": "stock_uom", "oldfieldtype": "Data", "options": "UOM", "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break2", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, + "print_hide": 0, "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0, "width": "50%" }, { + "allow_on_submit": 0, "fieldname": "project_name", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, "in_filter": 1, + "in_list_view": 0, "label": "Project Name", + "no_copy": 0, "oldfieldname": "project_name", "oldfieldtype": "Link", "options": "Project", "permlevel": 0, - "read_only": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "description": "Manufacture against Sales Order", "fieldname": "sales_order", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Sales Order", + "no_copy": 0, "options": "Sales Order", "permlevel": 0, - "read_only": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "company", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Company", + "no_copy": 0, "oldfieldname": "company", "oldfieldtype": "Link", "options": "Company", "permlevel": 0, + "print_hide": 0, "read_only": 0, - "reqd": 1 + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "amended_from", "fieldtype": "Link", + "hidden": 0, "ignore_user_permissions": 1, + "in_filter": 0, + "in_list_view": 0, "label": "Amended From", "no_copy": 1, "oldfieldname": "amended_from", "oldfieldtype": "Data", "options": "Production Order", "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], + "hide_heading": 0, + "hide_toolbar": 0, "icon": "icon-cogs", "idx": 1, "in_create": 0, + "in_dialog": 0, "is_submittable": 1, - "modified": "2015-07-21 07:45:53.206902", + "issingle": 0, + "istable": 0, + "modified": "2015-08-12 08:50:32.803526", "modified_by": "Administrator", "module": "Manufacturing", "name": "Production Order", @@ -373,22 +810,41 @@ "create": 1, "delete": 1, "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, "permlevel": 0, "print": 1, "read": 1, "report": 1, "role": "Manufacturing User", + "set_user_permissions": 0, "share": 1, "submit": 1, "write": 1 }, { + "amend": 0, "apply_user_permissions": 1, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, "permlevel": 0, + "print": 0, "read": 1, "report": 1, - "role": "Stock User" + "role": "Stock User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 0 } ], + "read_only": 0, + "read_only_onload": 0, "title_field": "production_item" } \ No newline at end of file diff --git a/erpnext/patches.txt b/erpnext/patches.txt index c7c938832b..acd5253e8d 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -172,7 +172,6 @@ execute:frappe.delete_doc("Page", "users") erpnext.patches.v5_0.update_material_transferred_for_manufacturing_again erpnext.patches.v5_0.index_on_account_and_gl_entry execute:frappe.db.sql("""delete from `tabProject Task`""") -erpnext.patches.v5_0.item_variants erpnext.patches.v5_0.update_item_desc_in_invoice erpnext.patches.v5_1.fix_against_account erpnext.patches.v5_1.fix_credit_days_based_on diff --git a/erpnext/patches/v5_0/item_variants.py b/erpnext/patches/v5_0/item_variants.py deleted file mode 100644 index 66300be671..0000000000 --- a/erpnext/patches/v5_0/item_variants.py +++ /dev/null @@ -1,19 +0,0 @@ -import frappe - -def execute(): - frappe.reload_doctype("Item") - for dt in ["manage_variants", "manage_variants_item", "variant_attribute"]: - frappe.reload_doc("stock", "doctype", dt) - - for d in frappe.get_list("Item", filters={"has_variants":1}): - manage_variant = frappe.new_doc("Manage Variants") - manage_variant.item_code = d.name - manage_variant.attributes = frappe.db.sql("select item_attribute as attribute, item_attribute_value as attribute_value \ - from `tabItem Variant` where parent = %s", d.name, as_dict=1) - if manage_variant.attributes: - if not frappe.get_list("Item", filters={"variant_of": d.name}, limit_page_length=1): - frappe.db.sql("delete from `tabItem Variant` where parent=%s", d.name) - else: - manage_variant.generate_combinations() - manage_variant.create_variants() - frappe.delete_doc("DocType", "Item Variant") \ No newline at end of file diff --git a/erpnext/patches/v5_4/item_template.py b/erpnext/patches/v5_4/item_template.py index 4183654d16..455aae6cb3 100644 --- a/erpnext/patches/v5_4/item_template.py +++ b/erpnext/patches/v5_4/item_template.py @@ -12,5 +12,8 @@ def execute(): for item, attributes in item_attribute.items(): template = frappe.get_doc("Item", item) - template.set('valid_attributes', attributes) - template.save() \ No newline at end of file + template.set('attributes', attributes) + template.save() + + frappe.delete_doc("DocType", "Manage Variants") + frappe.delete_doc("DocType", "Manage Variants Item") \ No newline at end of file diff --git a/erpnext/projects/doctype/project/project.json b/erpnext/projects/doctype/project/project.json index 486d86112e..04d6cb48aa 100644 --- a/erpnext/projects/doctype/project/project.json +++ b/erpnext/projects/doctype/project/project.json @@ -1,68 +1,129 @@ { + "allow_copy": 0, "allow_import": 1, "allow_rename": 1, "autoname": "field:project_name", "creation": "2013-03-07 11:55:07", + "custom": 0, "docstatus": 0, "doctype": "DocType", "document_type": "Master", "fields": [ { + "allow_on_submit": 0, "description": "", "fieldname": "project_name", "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Project Name", "no_copy": 0, "oldfieldname": "project_name", "oldfieldtype": "Data", "permlevel": 0, - "reqd": 1 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "default": "Open", "fieldname": "status", "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, "in_filter": 1, + "in_list_view": 0, "label": "Status", "no_copy": 1, "oldfieldname": "status", "oldfieldtype": "Select", "options": "Open\nCompleted\nCancelled", "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, "reqd": 1, - "search_index": 1 + "search_index": 1, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "project_type", "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Project Type", "no_copy": 0, "oldfieldname": "project_type", "oldfieldtype": "Data", "options": "Internal\nExternal\nOther", "permlevel": 0, - "search_index": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break_5", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "is_active", "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Is Active", "no_copy": 0, "oldfieldname": "is_active", "oldfieldtype": "Select", "options": "Yes\nNo", "permlevel": 0, - "search_index": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "priority", "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 0, "label": "Priority", "no_copy": 0, @@ -70,53 +131,123 @@ "oldfieldtype": "Select", "options": "Medium\nLow\nHigh", "permlevel": 0, - "search_index": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "section_break_12", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "expected_start_date", "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, "in_filter": 1, + "in_list_view": 0, "label": "Expected Start Date", "no_copy": 0, "oldfieldname": "project_start_date", "oldfieldtype": "Date", "permlevel": 0, - "search_index": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break_11", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "expected_end_date", "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Expected End Date", "no_copy": 0, "oldfieldname": "completion_date", "oldfieldtype": "Date", "permlevel": 0, - "search_index": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "customer_details", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "", + "no_copy": 0, "oldfieldtype": "Section Break", "options": "icon-user", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "customer", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, "in_filter": 1, + "in_list_view": 0, "label": "Customer", "no_copy": 0, "oldfieldname": "customer", @@ -124,115 +255,281 @@ "options": "Customer", "permlevel": 0, "print_hide": 1, + "read_only": 0, + "report_hide": 0, "reqd": 0, - "search_index": 1 + "search_index": 1, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break_14", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "sales_order", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Sales Order", + "no_copy": 0, "options": "Sales Order", "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "sb_milestones", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Tasks", + "no_copy": 0, "oldfieldtype": "Section Break", "options": "icon-flag", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "tasks", "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Tasks", + "no_copy": 0, "options": "Project Task", "permlevel": 0, "precision": "", - "reqd": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "percent_complete", "fieldtype": "Percent", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 0, "label": "% Tasks Completed", "no_copy": 1, "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "section_break0", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "", + "no_copy": 0, "oldfieldtype": "Section Break", "options": "icon-list", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "notes", "fieldtype": "Text Editor", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Notes", "no_copy": 0, "oldfieldname": "notes", "oldfieldtype": "Text Editor", "permlevel": 0, - "search_index": 0 + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "section_break_18", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "actual_start_date", "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Actual Start Date", + "no_copy": 0, "permlevel": 0, "precision": "", - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "actual_time", "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Actual Time (in Hours)", + "no_copy": 0, "permlevel": 0, "precision": "", - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break_20", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "actual_end_date", "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Actual End Date", "no_copy": 0, "oldfieldname": "act_completion_date", "oldfieldtype": "Date", "permlevel": 0, + "print_hide": 0, "read_only": 1, - "search_index": 0 + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "section_break_26", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "estimated_costing", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, "in_list_view": 1, "label": "Estimated Costing", "no_copy": 0, @@ -240,124 +537,292 @@ "oldfieldtype": "Currency", "options": "Company:company:default_currency", "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, "reqd": 0, - "search_index": 0 + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break_22", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "company", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Company", + "no_copy": 0, "options": "Company", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "cost_center", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Default Cost Center", + "no_copy": 0, "options": "Cost Center", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "project_details", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "", + "no_copy": 0, "oldfieldtype": "Section Break", "options": "icon-money", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "description": "", "fieldname": "total_costing_amount", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Total Costing Amount (via Time Logs)", + "no_copy": 0, "permlevel": 0, "precision": "", - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "description": "", "fieldname": "total_expense_claim", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Total Expense Claim (via Expense Claims)", + "no_copy": 0, "permlevel": 0, "precision": "", - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break_28", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "description": "", "fieldname": "total_billing_amount", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Total Billing Amount (via Time Logs)", + "no_copy": 0, "permlevel": 0, "precision": "", - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "total_purchase_cost", "fieldtype": "Currency", "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Total Purchase Cost (via Purchase Invoice)", + "no_copy": 0, "permlevel": 0, "precision": "", - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "margin", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "", + "no_copy": 0, "oldfieldtype": "Column Break", "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0, "width": "50%" }, { + "allow_on_submit": 0, "fieldname": "gross_margin", "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Gross Margin", "no_copy": 0, "oldfieldname": "gross_margin_value", "oldfieldtype": "Currency", "options": "Company:company:default_currency", "permlevel": 0, + "print_hide": 0, "read_only": 1, + "report_hide": 0, "reqd": 0, - "search_index": 0 + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break_37", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "per_gross_margin", "fieldtype": "Percent", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Gross Margin %", "no_copy": 0, "oldfieldname": "per_gross_margin", "oldfieldtype": "Currency", "options": "", "permlevel": 0, + "print_hide": 0, "read_only": 1, + "report_hide": 0, "reqd": 0, - "search_index": 0 + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], + "hide_heading": 0, + "hide_toolbar": 0, "icon": "icon-puzzle-piece", "idx": 1, + "in_create": 0, + "in_dialog": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 0, "max_attachments": 4, - "modified": "2015-06-12 09:00:54.080220", + "modified": "2015-08-12 08:51:43.620261", "modified_by": "Administrator", "module": "Projects", "name": "Project", @@ -366,29 +831,45 @@ { "amend": 0, "apply_user_permissions": 1, + "cancel": 0, "create": 1, "delete": 1, "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, "permlevel": 0, "print": 1, "read": 1, "report": 1, "role": "Projects User", + "set_user_permissions": 0, "share": 1, "submit": 0, "write": 1 }, { "amend": 0, + "apply_user_permissions": 0, "cancel": 0, "create": 0, "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, "permlevel": 1, + "print": 0, "read": 1, "report": 1, "role": "All", - "submit": 0 + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 0 } ], + "read_only": 0, + "read_only_onload": 0, "search_fields": "customer, status, priority, is_active" } \ No newline at end of file diff --git a/erpnext/projects/doctype/project_task/project_task.json b/erpnext/projects/doctype/project_task/project_task.json index e5aae3eb4b..44180cb9a3 100644 --- a/erpnext/projects/doctype/project_task/project_task.json +++ b/erpnext/projects/doctype/project_task/project_task.json @@ -25,7 +25,8 @@ "report_hide": 0, "reqd": 1, "search_index": 0, - "set_only_once": 0 + "set_only_once": 0, + "unique": 0 }, { "allow_on_submit": 0, @@ -46,21 +47,48 @@ "report_hide": 0, "reqd": 1, "search_index": 0, - "set_only_once": 0 + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "depends_on": "task_id", "fieldname": "edit_task", "fieldtype": "Button", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "View Task", + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "column_break_3", "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { "allow_on_submit": 0, @@ -79,7 +107,8 @@ "report_hide": 0, "reqd": 0, "search_index": 0, - "set_only_once": 0 + "set_only_once": 0, + "unique": 0 }, { "allow_on_submit": 0, @@ -99,13 +128,27 @@ "report_hide": 0, "reqd": 0, "search_index": 0, - "set_only_once": 0 + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "section_break_6", "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { "allow_on_submit": 0, @@ -124,17 +167,29 @@ "report_hide": 0, "reqd": 0, "search_index": 0, - "set_only_once": 0 + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "task_id", "fieldtype": "Link", "hidden": 1, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Task ID", "no_copy": 1, "options": "Task", "permlevel": 0, - "precision": "" + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], "hide_heading": 0, @@ -144,7 +199,7 @@ "is_submittable": 0, "issingle": 0, "istable": 1, - "modified": "2015-04-23 05:48:00.504508", + "modified": "2015-08-12 08:51:46.609018", "modified_by": "Administrator", "module": "Projects", "name": "Project Task", diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index bb86885ec2..477d3063ec 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -6,6 +6,10 @@ frappe.provide("erpnext.item"); frappe.ui.form.on("Item", { onload: function(frm) { erpnext.item.setup_queries(frm); + if (frm.doc.variant_of){ + frm.fields_dict["attributes"].grid.set_column_disp("attribute_value", true); + } + }, refresh: function(frm) { @@ -31,8 +35,8 @@ frappe.ui.form.on("Item", { frappe.set_route("List", "Item", {"variant_of": frm.doc.name}); }, "icon-list", "btn-default"); - frm.add_custom_button(__("Search Variant"), function() { - erpnext.item.search_variant() + frm.add_custom_button(__("Make Variant"), function() { + erpnext.item.make_variant() }, "icon-list", "btn-default"); } if (frm.doc.variant_of) { @@ -53,6 +57,8 @@ frappe.ui.form.on("Item", { } erpnext.item.toggle_reqd(frm); + + erpnext.item.toggle_attributes(frm); }, validate: function(frm){ @@ -86,6 +92,10 @@ frappe.ui.form.on("Item", { is_stock_item: function(frm) { erpnext.item.toggle_reqd(frm); + }, + + has_variants: function(frm) { + erpnext.item.toggle_attributes(frm); } }); @@ -184,12 +194,12 @@ $.extend(erpnext.item, { } }, - search_variant: function(doc) { + make_variant: function(doc) { var fields = [] - for(var i=0;i< cur_frm.doc.valid_attributes.length;i++){ + for(var i=0;i< cur_frm.doc.attributes.length;i++){ var fieldtype, desc; - var row = cur_frm.doc.valid_attributes[i]; + var row = cur_frm.doc.attributes[i]; if (row.numeric_values){ fieldtype = "Float"; desc = "Min Value: "+ row.from_range +" , Max Value: "+ row.to_range +", in Increments of: "+ row.increment @@ -206,18 +216,13 @@ $.extend(erpnext.item, { "description": desc }) } - fields = fields.concat({ - "label": "Result", - "fieldname": "result", - "fieldtype": "HTML" - }) var d = new frappe.ui.Dialog({ - title: __("Search Variant"), + title: __("Make Variant"), fields: fields }); - d.set_primary_action(__("Search"), function() { + d.set_primary_action(__("Make"), function() { args = d.get_values(); if(!args) return; frappe.call({ @@ -227,28 +232,32 @@ $.extend(erpnext.item, { "args": d.get_values() }, callback: function(r) { + // returns variant item if (r.message) { - d.get_field("result").set_value($(''+__("View {0}", [r.message[0]])+'') - .on("click", function() { - d.hide(); - frappe.set_route("Form", "Item", r.message[0]); - })); + var variant = r.message[0]; + var msgprint_dialog = frappe.msgprint(__("Item Variant {0} already exists with same attributes", + [repl('%(item)s', { + item_encoded: encodeURIComponent(variant), + item: variant + })] + )); + msgprint_dialog.hide_on_page_refresh = true; + msgprint_dialog.$wrapper.find(".variant-click").on("click", function() { + d.hide(); + }); } else { - d.get_field("result").set_value($('' - +__("Variant Not Found - Create New"+'')).on("click", function() { - d.hide(); - frappe.call({ - method:"erpnext.stock.doctype.item.item.create_variant", - args: { - "item": cur_frm.doc.name, - "param": d.get_values() - }, - callback: function(r) { - var doclist = frappe.model.sync(r.message); - frappe.set_route("Form", doclist[0].doctype, doclist[0].name); - } - }); - })); + d.hide(); + frappe.call({ + method:"erpnext.stock.doctype.item.item.create_variant", + args: { + "item": cur_frm.doc.name, + "param": d.get_values() + }, + callback: function(r) { + var doclist = frappe.model.sync(r.message); + frappe.set_route("Form", doclist[0].doctype, doclist[0].name); + } + }); } } }); @@ -280,7 +289,6 @@ $.extend(erpnext.item, { fields: ["attribute_value"] }, callback: function(r) { - d.get_field("result").set_value("") if (r.message) { response($.map(r.message, function(d) { return d.attribute_value; })); } @@ -299,6 +307,10 @@ $.extend(erpnext.item, { }, 500); }); }); + }, + toggle_attributes: function(frm) { + frm.toggle_display("attributes", frm.doc.has_variants || frm.doc.variant_of); + frm.fields_dict.attributes.grid.toggle_reqd("attribute_value", frm.doc.variant_of ? 1 : 0); } }); diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index b8f996f956..997d8e8fd0 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -819,32 +819,10 @@ }, { "allow_on_submit": 0, - "depends_on": "has_variants", - "fieldname": "valid_attributes", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Valid Attributes", - "no_copy": 0, - "options": "Item Template Attribute", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "depends_on": "variant_of", + "depends_on": "", "fieldname": "attributes", "fieldtype": "Table", - "hidden": 0, + "hidden": 1, "ignore_user_permissions": 0, "in_filter": 0, "in_list_view": 0, @@ -854,7 +832,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, - "read_only": 1, + "read_only": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -1951,7 +1929,7 @@ "issingle": 0, "istable": 0, "max_attachments": 1, - "modified": "2015-08-04 07:04:46.573200", + "modified": "2015-08-12 10:28:54.242793", "modified_by": "Administrator", "module": "Stock", "name": "Item", diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 66d24134b3..5902c685f4 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -10,7 +10,6 @@ from frappe.website.website_generator import WebsiteGenerator from erpnext.setup.doctype.item_group.item_group import invalidate_cache_for, get_parent_item_groups from frappe.website.render import clear_cache from frappe.website.doctype.website_slideshow.website_slideshow import get_slideshow -from erpnext.stock.doctype.manage_variants.manage_variants import update_variant class WarehouseNotSet(frappe.ValidationError): pass class ItemTemplateCannotHaveStock(frappe.ValidationError): pass @@ -301,7 +300,9 @@ class Item(WebsiteGenerator): updated = [] variants = frappe.db.get_all("Item", fields=["item_code"], filters={"variant_of": self.name }) for d in variants: - update_variant(self.name, d) + variant = frappe.get_doc("Item", d) + copy_attributes_to_variant(self, variant) + variant.save() updated.append(d.item_code) if updated: frappe.msgprint(_("Item Variants {0} updated").format(", ".join(updated))) @@ -333,7 +334,9 @@ class Item(WebsiteGenerator): def validate_template_attributes(self): if self.has_variants: attributes = [] - for d in self.valid_attributes: + if not self.attributes: + frappe.throw(_("Attribute is mandatory for Item Template")) + for d in self.attributes: if d.attribute in attributes: frappe.throw(_("Attribute {0} selected multiple times in Attributes Table".format(d.attribute))) else: @@ -343,6 +346,8 @@ class Item(WebsiteGenerator): if self.variant_of: args = {} for d in self.attributes: + if not d.attribute_value: + frappe.throw(_("Please specify Attribute Value for attribute {0}").format(d.attribute)) args[d.attribute] = d.attribute_value variant = get_variant(self.variant_of, args) @@ -495,7 +500,7 @@ def get_variant(item, args): for d in args: if d in numeric_attributes: - values = frappe.db.sql("""select from_range, to_range, increment from `tabItem Template Attribute` \ + values = frappe.db.sql("""select from_range, to_range, increment from `tabVariant Attribute` \ where parent = %s and attribute = %s""", (item, d), as_dict=1)[0] if (not values.from_range < cint(args[d]) < values.to_range) or ((cint(args[d]) - values.from_range) % values.increment != 0): @@ -525,10 +530,8 @@ def get_variant(item, args): @frappe.whitelist() def create_variant(item, param): - from erpnext.stock.doctype.manage_variants.manage_variants import copy_attributes_to_variant args = json.loads(param) variant = frappe.new_doc("Item") - variant.item_code = item variant_attributes = [] for d in args: variant_attributes.append({ @@ -538,3 +541,18 @@ def create_variant(item, param): variant.set("attributes", variant_attributes) copy_attributes_to_variant(item, variant) return variant + +def copy_attributes_to_variant(item, variant): + from frappe.model import no_value_fields + for field in item.meta.fields: + if field.fieldtype not in no_value_fields and (not field.no_copy)\ + and field.fieldname not in ("item_code", "item_name"): + if variant.get(field.fieldname) != item.get(field.fieldname): + variant.set(field.fieldname, item.get(field.fieldname)) + variant.variant_of = item.name + variant.has_variants = 0 + variant.show_in_website = 0 + if variant.attributes: + variant.description += "\n" + for d in variant.attributes: + variant.description += "

" + d.attribute + ": " + cstr(d.attribute_value) + "

" diff --git a/erpnext/stock/doctype/item_attribute/item_attribute.json b/erpnext/stock/doctype/item_attribute/item_attribute.json index 35711dea74..d23fe4d427 100644 --- a/erpnext/stock/doctype/item_attribute/item_attribute.json +++ b/erpnext/stock/doctype/item_attribute/item_attribute.json @@ -29,48 +29,6 @@ "set_only_once": 0, "unique": 0 }, - { - "allow_on_submit": 0, - "default": "1", - "depends_on": "eval: doc.numeric_values==0", - "description": "Lower the number, higher the priority in the Item Code suffix that will be created for this Item Attribute for the Item Variant", - "fieldname": "priority", - "fieldtype": "Int", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Priority", - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "fieldname": "column_break_3", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, { "allow_on_submit": 0, "default": "0", @@ -95,7 +53,7 @@ { "allow_on_submit": 0, "depends_on": "numeric_values", - "fieldname": "section_break_5", + "fieldname": "section_break_4", "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, @@ -114,6 +72,7 @@ }, { "allow_on_submit": 0, + "depends_on": "", "fieldname": "from_range", "fieldtype": "Float", "hidden": 0, @@ -134,6 +93,7 @@ }, { "allow_on_submit": 0, + "depends_on": "", "fieldname": "increment", "fieldtype": "Float", "hidden": 0, @@ -173,6 +133,7 @@ }, { "allow_on_submit": 0, + "depends_on": "", "fieldname": "to_range", "fieldtype": "Float", "hidden": 0, @@ -193,8 +154,8 @@ }, { "allow_on_submit": 0, - "depends_on": "eval: doc.numeric_values==0", - "fieldname": "section_break_10", + "depends_on": "eval: !doc.numeric_values", + "fieldname": "section_break_5", "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, @@ -213,6 +174,7 @@ }, { "allow_on_submit": 0, + "depends_on": "", "fieldname": "item_attribute_values", "fieldtype": "Table", "hidden": 0, @@ -241,7 +203,7 @@ "is_submittable": 0, "issingle": 0, "istable": 0, - "modified": "2015-08-05 05:27:55.912105", + "modified": "2015-08-11 08:43:10.240847", "modified_by": "Administrator", "module": "Stock", "name": "Item Attribute", diff --git a/erpnext/stock/doctype/item_template_attribute/__init__.py b/erpnext/stock/doctype/item_template_attribute/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/stock/doctype/item_template_attribute/item_template_attribute.json b/erpnext/stock/doctype/item_template_attribute/item_template_attribute.json deleted file mode 100644 index 40c1707eeb..0000000000 --- a/erpnext/stock/doctype/item_template_attribute/item_template_attribute.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "allow_copy": 0, - "allow_import": 1, - "allow_rename": 0, - "autoname": "", - "creation": "2015-07-31 02:14:41.660844", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "Other", - "fields": [ - { - "allow_on_submit": 0, - "fieldname": "attribute", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 1, - "label": "Attribute", - "no_copy": 0, - "options": "Item Attribute", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "fieldname": "column_break_2", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "fieldname": "numeric_values", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Numeric Values", - "no_copy": 0, - "options": "", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 1, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "depends_on": "numeric_values", - "fieldname": "section_break_4", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "fieldname": "from_range", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "From Range", - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "fieldname": "increment", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Increment", - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "fieldname": "column_break_7", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "fieldname": "to_range", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "To Range", - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - } - ], - "hide_heading": 0, - "hide_toolbar": 0, - "icon": "", - "in_create": 0, - "in_dialog": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "modified": "2015-08-05 07:50:03.836731", - "modified_by": "Administrator", - "module": "Stock", - "name": "Item Template Attribute", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "read_only": 0, - "read_only_onload": 0, - "sort_field": "modified", - "sort_order": "DESC" -} \ No newline at end of file diff --git a/erpnext/stock/doctype/item_template_attribute/item_template_attribute.py b/erpnext/stock/doctype/item_template_attribute/item_template_attribute.py deleted file mode 100644 index b82bebdad9..0000000000 --- a/erpnext/stock/doctype/item_template_attribute/item_template_attribute.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class ItemTemplateAttribute(Document): - pass diff --git a/erpnext/stock/doctype/manage_variants/__init__.py b/erpnext/stock/doctype/manage_variants/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/stock/doctype/manage_variants/manage_variants.js b/erpnext/stock/doctype/manage_variants/manage_variants.js deleted file mode 100644 index edbfcd269a..0000000000 --- a/erpnext/stock/doctype/manage_variants/manage_variants.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -// License: GNU General Public License v3. See license.txt - -frappe.ui.form.on("Manage Variants", { - onload: function(frm) { - var df = frappe.meta.get_docfield("Variant Attribute", "attribute_value", "Manage Variants"); - df.on_make = function(field) { - $(field.input_area).addClass("ui-front"); - field.$input.autocomplete({ - minLength: 0, - minChars: 0, - source: function(request, response) { - frappe.call({ - method:"frappe.client.get_list", - args:{ - doctype:"Item Attribute Value", - filters: [ - ["parent","=", field.doc.attribute], - ["attribute_value", "like", request.term + "%"] - ], - fields: ["attribute_value"] - }, - callback: function(r) { - response($.map(r.message, function(d) { return d.attribute_value; })); - } - }); - }, - select: function(event, ui) { - field.$input.val(ui.item.value); - field.$input.trigger("change"); - } - }); - } - }, - - refresh: function(frm) { - frm.disable_save(); - frm.page.set_primary_action(__("Create Variants"), function() { - frappe.call({ - method: "create_variants", - doc:frm.doc - }) - }); - }, - - onload_post_render: function(frm) { - frm.get_field("variants").grid.cannot_add_rows = true; - }, - - item_code:function(frm) { - return frappe.call({ - method: "get_item_details", - doc:frm.doc, - callback: function(r) { - refresh_field('attributes'); - refresh_field('variants'); - } - }) - } -}); diff --git a/erpnext/stock/doctype/manage_variants/manage_variants.json b/erpnext/stock/doctype/manage_variants/manage_variants.json deleted file mode 100644 index ff4f4367ef..0000000000 --- a/erpnext/stock/doctype/manage_variants/manage_variants.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "allow_copy": 0, - "allow_import": 0, - "allow_rename": 0, - "creation": "2015-05-19 05:39:59.345901", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "fields": [ - { - "fieldname": "item_code", - "fieldtype": "Link", - "label": "Item Code", - "options": "Item", - "permlevel": 0, - "precision": "", - "reqd": 1 - }, - { - "fieldname": "section_break_2", - "fieldtype": "Section Break", - "label": "Item Variant Attributes", - "permlevel": 0, - "precision": "" - }, - { - "allow_on_submit": 0, - "fieldname": "attributes", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Attributes", - "no_copy": 0, - "options": "Variant Attribute", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0 - }, - { - "fieldname": "generate_combinations", - "fieldtype": "Button", - "label": "Generate Combinations", - "options": "generate_combinations", - "permlevel": 0, - "precision": "" - }, - { - "fieldname": "section_break_4", - "fieldtype": "Section Break", - "label": "Item Variants", - "permlevel": 0, - "precision": "" - }, - { - "fieldname": "variants", - "fieldtype": "Table", - "label": "Variants", - "options": "Manage Variants Item", - "permlevel": 0, - "precision": "" - } - ], - "hide_heading": 0, - "hide_toolbar": 0, - "in_create": 1, - "in_dialog": 0, - "is_submittable": 0, - "issingle": 1, - "istable": 0, - "modified": "2015-07-13 05:28:29.057918", - "modified_by": "Administrator", - "module": "Stock", - "name": "Manage Variants", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 0, - "role": "Item Manager", - "share": 1, - "write": 1 - } - ], - "read_only": 1, - "read_only_onload": 0, - "sort_field": "modified", - "sort_order": "DESC" -} \ No newline at end of file diff --git a/erpnext/stock/doctype/manage_variants/manage_variants.py b/erpnext/stock/doctype/manage_variants/manage_variants.py deleted file mode 100644 index 3114a6cdd6..0000000000 --- a/erpnext/stock/doctype/manage_variants/manage_variants.py +++ /dev/null @@ -1,222 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.utils import cstr, flt -import copy -import json - -class DuplicateAttribute(frappe.ValidationError): pass - -class ManageVariants(Document): - - def get_item_details(self): - self.clear_tables() - if self.item_code: - self.get_attributes() - self.get_variants() - - def generate_combinations(self): - self.validate_attributes() - self.validate_template_item() - self.validate_attribute_values() - self.validate_attributes_are_unique() - self.get_variant_item_codes() - - def create_variants(self): - self.sync_variants() - - def clear_tables(self): - self.set('attributes', []) - self.set('variants', []) - - def get_attributes(self): - attributes = {} - self.set('attributes', []) - for d in frappe.db.sql("""select attr.attribute, attr.attribute_value from `tabVariant Attribute` as attr, - `tabItem` as item where attr.parent = item.name and item.variant_of = %s""", self.item_code, as_dict=1): - attributes.setdefault(d.attribute, []).append(d.attribute_value) - for d in attributes: - attribute_values = set(attributes[d]) - for value in attribute_values: - self.append('attributes',{"attribute": d, "attribute_value": value}) - - def get_variants(self): - variants = [d.name for d in frappe.get_all("Item", - filters={"variant_of":self.item_code})] - data = frappe.db.sql("""select parent, attribute, attribute_value from `tabVariant Attribute`""", as_dict=1) - for d in variants: - variant_attributes, attributes = "", [] - for attribute in data: - if attribute.parent == d: - variant_attributes += attribute.attribute_value + " | " - attributes.append([attribute.attribute, attribute.attribute_value]) - self.append('variants',{"variant": d, "variant_attributes": variant_attributes[: -3], "attributes": json.dumps(attributes)}) - - def validate_attributes(self): - if not self.attributes: - frappe.throw(_("Enter atleast one Attribute & its Value in Attribute table.")) - - def validate_template_item(self): - if not frappe.db.get_value("Item", self.item_code, "has_variants"): - frappe.throw(_("Selected Item cannot have Variants.")) - - if frappe.db.get_value("Item", self.item_code, "variant_of"): - frappe.throw(_("Item cannot be a variant of a variant")) - - def validate_attribute_values(self): - attributes = {} - numeric_attributes = [] - for t in frappe.db.get_all("Item Attribute Value", fields=["parent", "attribute_value"]): - attributes.setdefault(t.parent, []).append(t.attribute_value) - - for t in frappe.get_list("Item Attribute", filters={"numeric_values":1}): - numeric_attributes.append(t.name) - - for d in self.attributes: - if d.attribute in numeric_attributes: - values = frappe.db.sql("""select from_range, to_range, increment from `tabItem Template Attribute` \ - where parent = %s and attribute = %s""", (self.item_code, d.attribute), as_dict=1)[0] - - if (not values.from_range < flt(d.attribute_value) < values.to_range) \ - or ((flt(d.attribute_value) - values.from_range) % values.increment != 0): - frappe.throw(_("Attribute value {0} for attribute {1} must be within range of {2} to {3} and in increments of {4}") - .format(d.attribute_value, d.attribute, values.from_range, values.to_range, values.increment)) - else: - if d.attribute_value not in attributes.get(d.attribute): - frappe.throw(_("Attribute value {0} for attribute {1} does not exist \ - in Item Attribute Master.").format(d.attribute_value, d.attribute)) - - def validate_attributes_are_unique(self): - attributes = [] - for d in self.attributes: - key = (d.attribute, d.attribute_value) - if key in attributes: - frappe.throw(_("{0} {1} is entered more than once in Attributes table") - .format(d.attribute, d.attribute_value), DuplicateAttribute) - attributes.append(key) - - def get_variant_item_codes(self): - """Get all possible suffixes for variants""" - variant_dict = {} - self.set('variants', []) - - for d in self.attributes: - variant_dict.setdefault(d.attribute, []).append(d.attribute_value) - - all_attributes = [d.name for d in frappe.get_all("Item Attribute", order_by = "priority asc")] - - # sort attributes by their priority - attributes = filter(None, map(lambda d: d if d in variant_dict else None, all_attributes)) - - def add_attribute_suffixes(item_code, my_attributes, attributes): - attr = frappe.get_doc("Item Attribute", attributes[0]) - for value in attr.item_attribute_values: - if value.attribute_value in variant_dict[attr.name]: - _my_attributes = copy.deepcopy(my_attributes) - _my_attributes.append([attr.name, value.attribute_value]) - if len(attributes) > 1: - add_attribute_suffixes(item_code + "-" + value.abbr, _my_attributes, attributes[1:]) - else: - variant_attributes = "" - for d in _my_attributes: - variant_attributes += d[1] + " | " - self.append('variants', {"variant": item_code + "-" + value.abbr, - "attributes": json.dumps(_my_attributes), "variant_attributes": variant_attributes[: -3]}) - add_attribute_suffixes(self.item_code, [], attributes) - - def sync_variants(self): - variant_item_codes = [] - item_variants_attributes = {} - inserted, updated, old_variant_name, new_variant_name, deleted = [], [], [], [], [] - - for v in self.variants: - variant_item_codes.append(v.variant) - - existing_variants = [d.name for d in frappe.get_all("Item", - filters={"variant_of":self.item_code})] - - for d in existing_variants: - attributes = [] - for attribute in frappe.db.sql("""select attribute, attribute_value from `tabVariant Attribute` where parent = %s""", d): - attributes.append([attribute[0], attribute[1]]) - item_variants_attributes.setdefault(d, []).append(attributes) - - for existing_variant in existing_variants: - if existing_variant not in variant_item_codes: - att = item_variants_attributes[existing_variant][0] - for variant in self.variants: - if sorted(json.loads(variant.attributes) ,key=lambda x: x[0]) == \ - sorted(att ,key=lambda x: x[0]): - rename_variant(existing_variant, variant.variant) - old_variant_name.append(existing_variant) - new_variant_name.append(variant.variant) - - if existing_variant not in old_variant_name: - delete_variant(existing_variant) - deleted.append(existing_variant) - - for item_code in variant_item_codes: - if item_code not in existing_variants: - if item_code not in new_variant_name: - make_variant(self.item_code, item_code, self.variants) - inserted.append(item_code) - else: - update_variant(self.item_code, item_code, self.variants) - updated.append(item_code) - - if inserted: - frappe.msgprint(_("Item Variants {0} created").format(", ".join(inserted))) - - if updated: - frappe.msgprint(_("Item Variants {0} updated").format(", ".join(updated))) - - if old_variant_name: - frappe.msgprint(_("Item Variants {0} renamed").format(", ".join(old_variant_name))) - - if deleted: - frappe.msgprint(_("Item Variants {0} deleted").format(", ".join(deleted))) - -def make_variant(item, variant_code, variant_attribute): - variant = frappe.new_doc("Item") - variant.item_code = variant_code - copy_attributes_to_variant(item, variant, variant_attribute, insert=True) - variant.insert() - -def update_variant(item, variant_code, variant_attribute=None): - variant = frappe.get_doc("Item", variant_code) - copy_attributes_to_variant(item, variant, variant_attribute, insert=True) - variant.save() - -def rename_variant(old_variant_code, new_variant_code): - frappe.rename_doc("Item", old_variant_code, new_variant_code) - -def delete_variant(variant_code): - frappe.delete_doc("Item", variant_code) - -def copy_attributes_to_variant(item, variant, variant_attribute=None, insert=False): - template = frappe.get_doc("Item", item) - from frappe.model import no_value_fields - for field in template.meta.fields: - if field.fieldtype not in no_value_fields and (insert or not field.no_copy)\ - and field.fieldname not in ("item_code", "item_name"): - if variant.get(field.fieldname) != template.get(field.fieldname): - variant.set(field.fieldname, template.get(field.fieldname)) - variant.item_name = template.item_name + variant.item_code[len(template.name):] - variant.variant_of = template.name - variant.has_variants = 0 - variant.show_in_website = 0 - if variant_attribute: - for d in variant_attribute: - if d.variant == variant.item_code: - variant.attributes= [] - for a in json.loads(d.attributes): - variant.append('attributes', {"attribute": a[0], "attribute_value": a[1]}) - if variant.attributes: - variant.description += "\n" - for d in variant.attributes: - variant.description += "

" + d.attribute + ": " + cstr(d.attribute_value) + "

" \ No newline at end of file diff --git a/erpnext/stock/doctype/manage_variants/test_manage_variants.py b/erpnext/stock/doctype/manage_variants/test_manage_variants.py deleted file mode 100644 index 6aa7f832f1..0000000000 --- a/erpnext/stock/doctype/manage_variants/test_manage_variants.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt - -from __future__ import unicode_literals -import unittest -import frappe - -from erpnext.stock.doctype.manage_variants.manage_variants import DuplicateAttribute - -class TestManageVariants(unittest.TestCase): - def test_variant_item_codes(self): - manage_variant = frappe.new_doc("Manage Variants") - manage_variant.update({ - "item_code": "_Test Variant Item", - "attributes": [ - { - "attribute": "Test Size", - "attribute_value": "Small" - }, - { - "attribute": "Test Size", - "attribute_value": "Large" - } - ] - }) - manage_variant.generate_combinations() - self.assertEqual(manage_variant.variants[0].variant, "_Test Variant Item-S") - self.assertEqual(manage_variant.variants[1].variant, "_Test Variant Item-L") - - self.assertEqual(manage_variant.variants[0].variant_attributes, "Small") - self.assertEqual(manage_variant.variants[1].variant_attributes, "Large") - manage_variant.create_variants() - - def test_attributes_are_unique(self): - manage_variant = frappe.new_doc("Manage Variants") - manage_variant.update({ - "item_code": "_Test Variant Item", - "attributes": [ - { - "attribute": "Test Size", - "attribute_value": "Small" - }, - { - "attribute": "Test Size", - "attribute_value": "Small" - } - ] - }) - self.assertRaises(DuplicateAttribute, manage_variant.generate_combinations) diff --git a/erpnext/stock/doctype/manage_variants_item/__init__.py b/erpnext/stock/doctype/manage_variants_item/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/stock/doctype/manage_variants_item/manage_variants_item.json b/erpnext/stock/doctype/manage_variants_item/manage_variants_item.json deleted file mode 100644 index a8bb61d5e4..0000000000 --- a/erpnext/stock/doctype/manage_variants_item/manage_variants_item.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "allow_copy": 0, - "allow_import": 1, - "allow_rename": 0, - "autoname": "", - "creation": "2015-05-19 05:55:31.155672", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "Other", - "fields": [ - { - "allow_on_submit": 0, - "fieldname": "variant", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 1, - "label": "Variant", - "no_copy": 0, - "options": "", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0 - }, - { - "fieldname": "column_break_2", - "fieldtype": "Column Break", - "permlevel": 0, - "precision": "" - }, - { - "fieldname": "variant_attributes", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Variant Attributes", - "permlevel": 0, - "precision": "", - "read_only": 1 - }, - { - "fieldname": "attributes", - "fieldtype": "Text", - "hidden": 1, - "label": "attributes", - "permlevel": 0, - "precision": "", - "read_only": 1 - } - ], - "hide_heading": 0, - "hide_toolbar": 0, - "icon": "", - "in_create": 0, - "in_dialog": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "modified": "2015-06-30 03:19:07.548196", - "modified_by": "Administrator", - "module": "Stock", - "name": "Manage Variants Item", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "read_only": 0, - "read_only_onload": 0, - "sort_field": "modified", - "sort_order": "DESC" -} \ No newline at end of file diff --git a/erpnext/stock/doctype/manage_variants_item/manage_variants_item.py b/erpnext/stock/doctype/manage_variants_item/manage_variants_item.py deleted file mode 100644 index 800888a864..0000000000 --- a/erpnext/stock/doctype/manage_variants_item/manage_variants_item.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class ManageVariantsItem(Document): - pass diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.json b/erpnext/stock/doctype/stock_entry/stock_entry.json index 165c4741d9..bf3c9766b1 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.json +++ b/erpnext/stock/doctype/stock_entry/stock_entry.json @@ -1178,7 +1178,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2015-08-07 12:28:35.832492", + "modified": "2015-08-12 08:51:07.002600", "modified_by": "Administrator", "module": "Stock", "name": "Stock Entry", diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index f00a235fa7..03a2ffec35 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -68,22 +68,6 @@ class TestStockEntry(unittest.TestCase): def test_auto_material_request(self): self._test_auto_material_request("_Test Item") - def test_auto_material_request_for_variant(self): - manage_variant = frappe.new_doc("Manage Variants") - - manage_variant.update({ - "item_code": "_Test Variant Item", - "attributes": [ - { - "attribute": "Test Size", - "attribute_value": "Small" - } - ] - }) - manage_variant.generate_combinations() - manage_variant.create_variants() - self._test_auto_material_request("_Test Variant Item-S") - def _test_auto_material_request(self, item_code): item = frappe.get_doc("Item", item_code) diff --git a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json index fe8a1b15be..62c2a782e9 100644 --- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json +++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json @@ -828,7 +828,7 @@ "is_submittable": 0, "issingle": 0, "istable": 1, - "modified": "2015-08-07 13:21:23.840052", + "modified": "2015-08-12 08:51:15.789056", "modified_by": "Administrator", "module": "Stock", "name": "Stock Entry Detail", diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index a6dc6d485d..cd6043d41c 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -311,7 +311,7 @@ "is_submittable": 0, "issingle": 1, "istable": 0, - "modified": "2015-08-03 13:00:36.082986", + "modified": "2015-08-12 08:51:24.798096", "modified_by": "Administrator", "module": "Stock", "name": "Stock Settings", diff --git a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.json b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.json index 3747f5c449..365abaae36 100644 --- a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.json +++ b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.json @@ -1,78 +1,168 @@ { + "allow_copy": 0, + "allow_import": 0, + "allow_rename": 0, "creation": "2013-01-10 16:34:30", + "custom": 0, "docstatus": 0, "doctype": "DocType", "fields": [ { + "allow_on_submit": 0, "fieldname": "item_code", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Item", + "no_copy": 0, "options": "Item", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "current_stock_uom", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Current Stock UOM", + "no_copy": 0, "options": "UOM", "permlevel": 0, - "read_only": 1 + "print_hide": 0, + "read_only": 1, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "new_stock_uom", "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "New Stock UOM", + "no_copy": 0, "options": "UOM", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "conversion_factor", "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Conversion Factor", - "permlevel": 0 + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 }, { + "allow_on_submit": 0, "fieldname": "update", "fieldtype": "Button", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, "label": "Update", + "no_copy": 0, "options": "update_stock_uom", - "permlevel": 0 + "permlevel": 0, + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], + "hide_heading": 0, + "hide_toolbar": 0, "icon": "icon-magic", "idx": 1, "in_create": 0, + "in_dialog": 0, + "is_submittable": 0, "issingle": 1, - "modified": "2015-07-13 05:28:25.689187", + "istable": 0, + "modified": "2015-08-12 08:52:09.322664", "modified_by": "Administrator", "module": "Stock", "name": "Stock UOM Replace Utility", "owner": "Administrator", "permissions": [ { + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, "create": 1, + "delete": 0, "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, "permlevel": 0, "print": 1, "read": 1, "report": 0, "role": "Item Manager", + "set_user_permissions": 0, "share": 1, "submit": 0, "write": 1 }, { + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, "create": 1, + "delete": 0, "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, "permlevel": 0, "print": 1, "read": 1, "report": 0, "role": "Stock Manager", + "set_user_permissions": 0, "share": 1, "submit": 0, "write": 1 } ], - "read_only": 0 + "read_only": 0, + "read_only_onload": 0 } \ No newline at end of file diff --git a/erpnext/stock/doctype/variant_attribute/variant_attribute.json b/erpnext/stock/doctype/variant_attribute/variant_attribute.json index 5ab3d73239..f560a70752 100644 --- a/erpnext/stock/doctype/variant_attribute/variant_attribute.json +++ b/erpnext/stock/doctype/variant_attribute/variant_attribute.json @@ -27,19 +27,34 @@ "report_hide": 0, "reqd": 1, "search_index": 0, - "set_only_once": 0 - }, - { - "fieldname": "column_break_2", - "fieldtype": "Column Break", - "permlevel": 0, - "precision": "" + "set_only_once": 0, + "unique": 0 }, { "allow_on_submit": 0, + "fieldname": "column_break_2", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "depends_on": "", "fieldname": "attribute_value", "fieldtype": "Data", - "hidden": 0, + "hidden": 1, "ignore_user_permissions": 0, "in_filter": 0, "in_list_view": 1, @@ -51,9 +66,133 @@ "print_hide": 0, "read_only": 0, "report_hide": 0, - "reqd": 1, + "reqd": 0, "search_index": 0, - "set_only_once": 0 + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "depends_on": "has_variants", + "fieldname": "numeric_values", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Numeric Values", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "depends_on": "numeric_values", + "fieldname": "section_break_4", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "depends_on": "", + "fieldname": "from_range", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "From Range", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "depends_on": "", + "fieldname": "increment", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Increment", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "fieldname": "column_break_8", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "depends_on": "", + "fieldname": "to_range", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "To Range", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], "hide_heading": 0, @@ -64,7 +203,7 @@ "is_submittable": 0, "issingle": 0, "istable": 1, - "modified": "2015-05-20 06:16:16.803578", + "modified": "2015-08-12 02:47:07.959104", "modified_by": "Administrator", "module": "Stock", "name": "Variant Attribute", From 9710eede0001b0546c0eb9af84eb9bc23d49349e Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Thu, 13 Aug 2015 13:22:31 +0530 Subject: [PATCH 06/26] Fixed Test Cases --- erpnext/stock/doctype/item/item.py | 3 ++- erpnext/stock/doctype/item/test_item.py | 9 ++++++++- erpnext/stock/doctype/item/test_records.json | 5 +++++ erpnext/stock/doctype/stock_entry/test_stock_entry.py | 3 +++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 5902c685f4..4b8aa1523b 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -539,7 +539,8 @@ def create_variant(item, param): "attribute_value": args[d] }) variant.set("attributes", variant_attributes) - copy_attributes_to_variant(item, variant) + template = frappe.get_doc("Item", item) + copy_attributes_to_variant(template, variant) return variant def copy_attributes_to_variant(item, variant): diff --git a/erpnext/stock/doctype/item/test_item.py b/erpnext/stock/doctype/item/test_item.py index 9235becba1..8db2d2d61b 100644 --- a/erpnext/stock/doctype/item/test_item.py +++ b/erpnext/stock/doctype/item/test_item.py @@ -6,7 +6,7 @@ import unittest import frappe from frappe.test_runner import make_test_records -from erpnext.stock.doctype.item.item import WarehouseNotSet, ItemTemplateCannotHaveStock +from erpnext.stock.doctype.item.item import WarehouseNotSet, ItemTemplateCannotHaveStock, create_variant from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry test_ignore = ["BOM"] @@ -98,5 +98,12 @@ class TestItem(unittest.TestCase): for key, value in to_check.iteritems(): self.assertEquals(value, details.get(key)) + + def test_make_item_variant(self): + if not frappe.db.exists("Item", "_Test Variant Item-S"): + variant = create_variant("_Test Variant Item", """{"Test Size": "Small"}""") + variant.item_code = "_Test Variant Item-S" + variant.item_name = "_Test Variant Item-S" + variant.save() test_records = frappe.get_test_records('Item') diff --git a/erpnext/stock/doctype/item/test_records.json b/erpnext/stock/doctype/item/test_records.json index 5dd63e38de..f12c7cccf7 100644 --- a/erpnext/stock/doctype/item/test_records.json +++ b/erpnext/stock/doctype/item/test_records.json @@ -273,6 +273,11 @@ "item_name": "_Test Variant Item", "stock_uom": "_Test UOM", "has_variants": 1, + "attributes": [ + { + "attribute": "Test Size" + } + ], "apply_warehouse_wise_reorder_level": 1, "reorder_levels": [ { diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index 03a2ffec35..29f2a21a01 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -67,6 +67,9 @@ class TestStockEntry(unittest.TestCase): def test_auto_material_request(self): self._test_auto_material_request("_Test Item") + + def test_auto_material_request_for_variant(self): + self._test_auto_material_request("_Test Variant Item-S") def _test_auto_material_request(self, item_code): item = frappe.get_doc("Item", item_code) From 6cce304b27360b2841a4cba7bb17f4aa2221e3a4 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Thu, 13 Aug 2015 16:14:24 +0530 Subject: [PATCH 07/26] Changelog added --- erpnext/change_log/current/item_variants.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 erpnext/change_log/current/item_variants.md diff --git a/erpnext/change_log/current/item_variants.md b/erpnext/change_log/current/item_variants.md new file mode 100644 index 0000000000..268b59534c --- /dev/null +++ b/erpnext/change_log/current/item_variants.md @@ -0,0 +1,6 @@ +- Make Variants added to Item Master +- Added ability to specify Range of Numeric Values in Attribute Master +- Fixed an issue in filtering Templates in Item List View +- Added Patch to fetch Item Template Attributes +- Allow Editing variant attribute in Variant. Add validation to check duplication. +- Removed Manage Variants \ No newline at end of file From 68f66a7e8b22fddf66fabf35e643aa6806f7a603 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Thu, 13 Aug 2015 17:10:53 +0530 Subject: [PATCH 08/26] fixed Test Cases --- erpnext/stock/doctype/item/test_item.py | 7 +++++++ erpnext/stock/doctype/item_attribute/item_attribute.py | 2 +- erpnext/stock/doctype/stock_entry/test_stock_entry.py | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/item/test_item.py b/erpnext/stock/doctype/item/test_item.py index 8db2d2d61b..488bd05716 100644 --- a/erpnext/stock/doctype/item/test_item.py +++ b/erpnext/stock/doctype/item/test_item.py @@ -106,4 +106,11 @@ class TestItem(unittest.TestCase): variant.item_name = "_Test Variant Item-S" variant.save() +def make_item_variant(): + if not frappe.db.exists("Item", "_Test Variant Item-S"): + variant = create_variant("_Test Variant Item", """{"Test Size": "Small"}""") + variant.item_code = "_Test Variant Item-S" + variant.item_name = "_Test Variant Item-S" + variant.save() + test_records = frappe.get_test_records('Item') diff --git a/erpnext/stock/doctype/item_attribute/item_attribute.py b/erpnext/stock/doctype/item_attribute/item_attribute.py index 8350bed454..766668fbc8 100644 --- a/erpnext/stock/doctype/item_attribute/item_attribute.py +++ b/erpnext/stock/doctype/item_attribute/item_attribute.py @@ -42,6 +42,6 @@ class ItemAttribute(Document): variant_attributes = frappe.db.sql("select DISTINCT attribute_value from `tabVariant Attribute` where attribute=%s", self.name) if variant_attributes: for d in variant_attributes: - if d[0] not in attribute_values: + if d[0] and d[0] not in attribute_values: frappe.throw(_("Attribute Value {0} cannot be removed from {1} as Item Variants \ exist with this Attribute.").format(d[0], self.name)) diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index 29f2a21a01..174bc1a6df 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -64,8 +64,10 @@ class TestStockEntry(unittest.TestCase): self.assertEqual([[1, 20],[1, 30]], eval(sle.stock_queue)) frappe.db.set_default("allow_negative_stock", 0) - + def test_auto_material_request(self): + from erpnext.stock.doctype.item.test_item import make_item_variant + make_item_variant() self._test_auto_material_request("_Test Item") def test_auto_material_request_for_variant(self): From d74d1211995f8245d9cbf2e868741d558b1b19f0 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 13 Aug 2015 17:24:52 +0530 Subject: [PATCH 09/26] [hotfix] [report] payment period based on invoice date --- .../payment_period_based_on_invoice_date.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py index 604bc5660a..786a494eba 100644 --- a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py +++ b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py @@ -18,7 +18,7 @@ def execute(filters=None): data = [] for d in entries: - against_date = invoice_posting_date_map[d.reference_name] or "" + against_date = invoice_posting_date_map.get(d.reference_name) or "" if d.reference_type=="Purchase Invoice": payment_amount = flt(d.debit) or -1 * flt(d.credit) else: From b3340659772bf5a90ab46a8c9ffbc08f7f3d2801 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 14 Aug 2015 11:45:43 +0530 Subject: [PATCH 10/26] [hotfix] translation in es.csv --- erpnext/translations/es.csv | 124 ++++++++++++++++++------------------ 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/erpnext/translations/es.csv b/erpnext/translations/es.csv index c2e7ec15a7..ece00abfe2 100644 --- a/erpnext/translations/es.csv +++ b/erpnext/translations/es.csv @@ -255,7 +255,7 @@ apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py +122,Row {0 apps/erpnext/erpnext/stock/utils.py +174,Warehouse {0} does not belong to company {1},Almacén {0} no pertenece a la empresa {1} DocType: Bulk Email,Message,Mensaje DocType: Item Website Specification,Item Website Specification,Artículo Website Especificación -DocType: Backup Manager,Dropbox Access Key,Clave de Acceso de Dropbox +DocType: Backup Manager,Dropbox Access Key,Clave de Acceso de Dropbox DocType: Payment Tool,Reference No,Referencia apps/erpnext/erpnext/hr/doctype/leave_application/leave_application.py +349,Leave Blocked,Vacaciones Bloqueadas apps/erpnext/erpnext/stock/doctype/item/item.py +349,Item {0} has reached its end of life on {1},Artículo {0} ha llegado al término de la vida en {1} @@ -367,7 +367,7 @@ DocType: Delivery Note,Instructions,Instrucciones DocType: Quality Inspection,Inspected By,Inspección realizada por DocType: Maintenance Visit,Maintenance Type,Tipo de Mantenimiento apps/erpnext/erpnext/selling/doctype/installation_note/installation_note.py +69,Serial No {0} does not belong to Delivery Note {1},Número de orden {0} no pertenece a la nota de entrega {1} -DocType: Item Quality Inspection Parameter,Item Quality Inspection Parameter,Parámetro de Inspección de Calidad del Articulo +DocType: Item Quality Inspection Parameter,Item Quality Inspection Parameter,Parámetro de Inspección de Calidad del Articulo DocType: Leave Application,Leave Approver Name,Nombre de Supervisor de Vacaciones ,Schedule Date,Horario Fecha DocType: Packed Item,Packed Item,Artículo Empacado @@ -433,7 +433,7 @@ DocType: Purchase Taxes and Charges,"If checked, the tax amount will be consider apps/erpnext/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py +48,Total Qty,Cantidad Total DocType: Employee,Health Concerns,Preocupaciones de salud apps/erpnext/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js +15,Unpaid,No Pagado -DocType: Packing Slip,From Package No.,Del Paquete N º +DocType: Packing Slip,From Package No.,Del Paquete N º apps/erpnext/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py +29,Securities and Deposits,Valores y Depósitos DocType: Features Setup,Imports,Importaciones apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/operations.py +143,Adhesive bonding,Union adhesiva @@ -504,7 +504,7 @@ DocType: Job Applicant,Thread HTML,Tema HTML DocType: Company,Ignore,Pasar por Alto apps/erpnext/erpnext/setup/doctype/sms_settings/sms_settings.py +86,SMS sent to following numbers: {0},SMS enviado a los teléfonos: {0} DocType: Backup Manager,Enter Verification Code,Instroduzca el Código de Verificación -apps/erpnext/erpnext/controllers/buying_controller.py +135,Supplier Warehouse mandatory for sub-contracted Purchase Receipt,Almacén de Proveedor es necesario para recibos de compras sub contratadas +apps/erpnext/erpnext/controllers/buying_controller.py +135,Supplier Warehouse mandatory for sub-contracted Purchase Receipt,Almacén de Proveedor es necesario para recibos de compras sub contratadas DocType: Pricing Rule,Valid From,Válido desde DocType: Sales Invoice,Total Commission,Total Comisión DocType: Pricing Rule,Sales Partner,Socio de Ventas @@ -683,7 +683,7 @@ The tax rate you define here will be the standard tax rate for all **Items**. If #### Description of Columns -1. Calculation Type: +1. Calculation Type: - This can be on **Net Total** (that is the sum of basic amount). - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total. - **Actual** (as mentioned). @@ -694,19 +694,19 @@ The tax rate you define here will be the standard tax rate for all **Items**. If 6. Amount: Tax amount. 7. Total: Cumulative total to this point. 8. Enter Row: If based on ""Previous Row Total"" you can select the row number which will be taken as a base for this calculation (default is the previous row). -9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.","Plantilla de gravamen que puede aplicarse a todas las transacciones de venta. Esta plantilla puede contener lista de cabezas de impuestos y también otros jefes de gastos / ingresos como ""envío"", ""Seguros"", ""Manejo"", etc. +9. Is this Tax included in Basic Rate?: If you check this, it means that this tax will not be shown below the item table, but will be included in the Basic Rate in your main item table. This is useful where you want give a flat price (inclusive of all taxes) price to customers.","Plantilla de gravamen que puede aplicarse a todas las transacciones de venta. Esta plantilla puede contener lista de cabezas de impuestos y también otros jefes de gastos / ingresos como ""envío"", ""Seguros"", ""Manejo"", etc. - #### Nota + #### Nota La tasa de impuesto que definir aquí será el tipo impositivo general para todos los artículos ** **. Si hay ** ** Los artículos que tienen diferentes tasas, deben ser añadidos en el Impuesto ** ** Artículo mesa en el Artículo ** ** maestro. - #### Descripción de las Columnas + #### Descripción de las Columnas - 1. Tipo de Cálculo: + 1. Tipo de Cálculo: - Esto puede ser en ** Neto Total ** (que es la suma de la cantidad básica). - ** En Fila Anterior total / importe ** (por impuestos o cargos acumulados). Si selecciona esta opción, el impuesto se aplica como un porcentaje de la fila anterior (en la tabla de impuestos) Cantidad o total. - Actual ** ** (como se ha mencionado). - 2. Cuenta Cabeza: El libro mayor de cuentas en las que se reservó este impuesto + 2. Cuenta Cabeza: El libro mayor de cuentas en las que se reservó este impuesto 3. Centro de Costo: Si el impuesto / carga es un ingreso (como el envío) o gasto en que debe ser reservado en contra de un centro de costos. 4. Descripción: Descripción del impuesto (que se imprimirán en facturas / comillas). 5. Rate: Tasa de impuesto. @@ -888,7 +888,7 @@ apps/erpnext/erpnext/setup/page/setup_wizard/setup_wizard.js +492,Upload your le apps/erpnext/erpnext/setup/page/setup_wizard/install_fixtures.py +156,White,Blanco DocType: SMS Center,All Lead (Open),Todas las Oportunidades (Abiertas) DocType: Purchase Invoice,Get Advances Paid,Cómo anticipos pagados -apps/erpnext/erpnext/setup/page/setup_wizard/setup_wizard.js +362,Attach Your Picture,Adjunte su Fotografía +apps/erpnext/erpnext/setup/page/setup_wizard/setup_wizard.js +362,Attach Your Picture,Adjunte su Fotografía DocType: Journal Entry,Total Amount in Words,Importe Total con Letras DocType: Workflow State,Stop,Deténgase apps/erpnext/erpnext/setup/doctype/email_digest/email_digest.js +7,There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists.,"Ha ocurrido un error . Una razón probable podría ser que usted no ha guardado el formulario. Por favor, póngase en contacto con support@erpnext.com si el problema persiste." @@ -975,7 +975,7 @@ DocType: Journal Entry,Make Difference Entry,Hacer Entrada de Diferencia DocType: Upload Attendance,Attendance From Date,Asistencia De Fecha DocType: Appraisal Template Goal,Key Performance Area,Área Clave de Rendimiento apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/industry_type.py +53,Transportation,Transporte -DocType: SMS Center,Total Characters,Total Caracteres +DocType: SMS Center,Total Characters,Total Caracteres apps/erpnext/erpnext/controllers/buying_controller.py +139,Please select BOM in BOM field for Item {0},"Por favor, seleccione la Solicitud de Materiales en el campo de Solicitud de Materiales para el punto {0}" DocType: C-Form Invoice Detail,C-Form Invoice Detail,Detalle C -Form Factura DocType: Payment Reconciliation Invoice,Payment Reconciliation Invoice,Factura Reconciliación Pago @@ -1018,7 +1018,7 @@ apps/erpnext/erpnext/stock/utils.py +167,{0} valid serial nos for Item {1},{0} N apps/erpnext/erpnext/stock/doctype/serial_no/serial_no.py +58,Item Code cannot be changed for Serial No.,Código del Artículo no se puede cambiar de Número de Serie apps/erpnext/erpnext/accounts/doctype/pos_profile/pos_profile.py +23,POS Profile {0} already created for user: {1} and company {2},POS Perfil {0} ya creado para el usuario: {1} y compañía {2} DocType: Purchase Order Item,UOM Conversion Factor,Factor de Conversión de Unidad de Medida -DocType: Stock Settings,Default Item Group,Grupo de artículos predeterminado +DocType: Stock Settings,Default Item Group,Grupo de artículos predeterminado apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/operations.py +155,Laminated object manufacturing,Fabricación de objetos laminado apps/erpnext/erpnext/config/buying.py +13,Supplier database.,Base de datos de proveedores. DocType: Account,Balance Sheet,Hoja de Balance @@ -1042,7 +1042,7 @@ DocType: Event,Saturday,Sábado DocType: Leave Control Panel,Leave blank if considered for all branches,Dejar en blanco si se considera para todas las ramas ,Daily Time Log Summary,Resumen Diario de Registro de Hora DocType: DocField,Label,Etiqueta -DocType: Payment Reconciliation,Unreconciled Payment Details,Detalles de Pago No Conciliadas +DocType: Payment Reconciliation,Unreconciled Payment Details,Detalles de Pago No Conciliadas DocType: Global Defaults,Current Fiscal Year,Año Fiscal Actual DocType: Global Defaults,Disable Rounded Total,Desactivar Total Redondeado DocType: Lead,Call,Llamada @@ -1064,7 +1064,7 @@ DocType: Sales Order,Delivery Status,Estado del Envío DocType: Production Order,Manufacture against Sales Order,Fabricación contra Pedido de Ventas apps/erpnext/erpnext/setup/page/setup_wizard/setup_wizard.py +496,Rest Of The World,Resto del mundo apps/erpnext/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py +79,The Item {0} cannot have Batch,El artículo {0} no puede tener lotes -,Budget Variance Report,Informe de Varianza en el Presupuesto +,Budget Variance Report,Informe de Varianza en el Presupuesto DocType: Salary Slip,Gross Pay,Pago bruto apps/erpnext/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py +186,Dividends Paid,Dividendos pagados DocType: Stock Reconciliation,Difference Amount,Diferencia @@ -1116,7 +1116,7 @@ apps/erpnext/erpnext/setup/page/setup_wizard/setup_wizard.js +611,Your Products DocType: Mode of Payment,Mode of Payment,Modo de Pago apps/erpnext/erpnext/setup/doctype/item_group/item_group.js +31,This is a root item group and cannot be edited.,Se trata de un grupo de elementos raíz y no se puede editar . DocType: Purchase Invoice Item,Purchase Order,Orden de Compra -DocType: Warehouse,Warehouse Contact Info,Información de Contacto del Almacén +DocType: Warehouse,Warehouse Contact Info,Información de Contacto del Almacén sites/assets/js/form.min.js +182,Name is required,El nombre es necesario DocType: Purchase Invoice,Recurring Type,Tipo Recurrente DocType: Address,City/Town,Ciudad/Provincia @@ -1127,7 +1127,7 @@ apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +416,Delive apps/erpnext/erpnext/stock/get_item_details.py +136,Item {0} must be a Sub-contracted Item,Artículo {0} debe ser un artículo subcontratada apps/erpnext/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py +41,Capital Equipments,Equipos de Capitales apps/erpnext/erpnext/accounts/doctype/pricing_rule/pricing_rule.js +31,"Pricing Rule is first selected based on 'Apply On' field, which can be Item, Item Group or Brand.","Regla precios se selecciona por primera vez basado en 'Aplicar On' de campo, que puede ser elemento, elemento de grupo o Marca." -DocType: Hub Settings,Seller Website,Sitio Web Vendedor +DocType: Hub Settings,Seller Website,Sitio Web Vendedor apps/erpnext/erpnext/controllers/selling_controller.py +147,Total allocated percentage for sales team should be 100,Porcentaje del total asignado para el equipo de ventas debe ser de 100 apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py +108,Production Order status is {0},Estado de la orden de producción es de {0} DocType: Appraisal Goal,Goal,Meta/Objetivo @@ -1163,7 +1163,7 @@ DocType: BOM Operation,Workstation,Puesto de Trabajo apps/erpnext/erpnext/setup/page/setup_wizard/install_fixtures.py +112,Hardware,Hardware DocType: Attendance,HR Manager,Gerente de Recursos Humanos apps/erpnext/erpnext/setup/page/setup_wizard/install_fixtures.py +50,Privilege Leave,Permiso con Privilegio -DocType: Purchase Invoice,Supplier Invoice Date,Fecha de la Factura de Proveedor +DocType: Purchase Invoice,Supplier Invoice Date,Fecha de la Factura de Proveedor apps/erpnext/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py +169,You need to enable Shopping Cart,Necesita habilitar Carito de Compras sites/assets/js/form.min.js +200,No Data,No hay datos DocType: Appraisal Template Goal,Appraisal Template Goal,Objetivo Plantilla de Evaluación @@ -1354,7 +1354,7 @@ DocType: Quality Inspection Reading,Reading 4,Lectura 4 apps/erpnext/erpnext/config/hr.py +23,Claims for company expense.,Peticiones para gastos de empresa. apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/operations.py +7,Centrifugal casting,La fundición centrífuga apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/operations.py +118,Magnetic field-assisted finishing,Acabado asistida por campo magnético -DocType: Company,Default Holiday List,Lista de vacaciones Por Defecto +DocType: Company,Default Holiday List,Lista de vacaciones Por Defecto apps/erpnext/erpnext/projects/doctype/time_log/time_log.py +229,Task is Mandatory if Time Log is against a project,Tarea es obligatoria si Hora de registro está en contra de un proyecto apps/erpnext/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py +165,Stock Liabilities,Inventario de Pasivos DocType: Purchase Receipt,Supplier Warehouse,Almacén Proveedor @@ -1374,7 +1374,7 @@ apps/erpnext/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sa sites/assets/js/erpnext.min.js +49,{0} View,{0} Ver DocType: Salary Structure Deduction,Salary Structure Deduction,Estructura Salarial Deducción apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/operations.py +157,Selective laser sintering,Sinterización selectiva por láser -apps/erpnext/erpnext/stock/doctype/item/item.py +153,Unit of Measure {0} has been entered more than once in Conversion Factor Table,Unidad de Medida {0} se ha introducido más de una vez en la Tabla de Factores de Conversión +apps/erpnext/erpnext/stock/doctype/item/item.py +153,Unit of Measure {0} has been entered more than once in Conversion Factor Table,Unidad de Medida {0} se ha introducido más de una vez en la Tabla de Factores de Conversión apps/frappe/frappe/core/page/data_import_tool/data_import_tool.js +83,Import Successful!,¡Importación Exitosa! apps/erpnext/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py +27,Cost of Issued Items,Costo de Artículos Emitidas DocType: Email Digest,Expenses Booked,gastos Reservados @@ -1408,7 +1408,7 @@ apps/erpnext/erpnext/accounts/doctype/payment_tool/payment_tool.js +189,Row {0}: DocType: Expense Claim,Total Amount Reimbursed,Monto total reembolsado apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/operations.py +151,Press fitting,Press apropiado apps/erpnext/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +63,Against Supplier Invoice {0} dated {1},Contra Factura de Proveedor {0} con fecha{1} -DocType: Selling Settings,Default Price List,Lista de precios Por defecto +DocType: Selling Settings,Default Price List,Lista de precios Por defecto DocType: Journal Entry,User Remark will be added to Auto Remark,Observación usuario se añadirá a Observación Auto DocType: Payment Reconciliation,Payments,Pagos apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/operations.py +23,Hot isostatic pressing,Prensado isostático en caliente @@ -1442,7 +1442,7 @@ apps/erpnext/erpnext/stock/get_item_details.py +122,Item {0} must be a Service I apps/erpnext/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py +158,Please select item code,"Por favor, seleccione el código del artículo" DocType: Salary Structure Deduction,Reduce Deduction for Leave Without Pay (LWP),Reducir Deducción por Licencia sin Sueldo ( LWP ) DocType: Territory,Territory Manager,Gerente de Territorio -DocType: Selling Settings,Selling Settings,Configuración de Ventas +DocType: Selling Settings,Selling Settings,Configuración de Ventas apps/erpnext/erpnext/stock/doctype/manage_variants/manage_variants.py +68,Item cannot be a variant of a variant,El Artículo no puede ser una variante de una variante apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/industry_type.py +38,Online Auctions,Subastas en Línea apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +94,Please specify either Quantity or Valuation Rate or both,Por favor especificar Cantidad o valoración de tipo o ambos @@ -1647,7 +1647,7 @@ apps/erpnext/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +492, apps/erpnext/erpnext/accounts/party.py +152,Please select company first.,Por favor seleccione la empresa en primer lugar. DocType: Activity Cost,Costing Rate,Costeo Rate DocType: Journal Entry Account,Against Journal Entry,Contra la Entrada de Diario -DocType: Employee,Resignation Letter Date,Fecha de Carta de Renuncia +DocType: Employee,Resignation Letter Date,Fecha de Carta de Renuncia apps/erpnext/erpnext/accounts/doctype/pricing_rule/pricing_rule.js +37,Pricing Rules are further filtered based on quantity.,Reglas de de precios también se filtran en base a la cantidad. apps/erpnext/erpnext/buying/page/purchase_analytics/purchase_analytics.js +137,Not Set,No Especificado DocType: Communication,Date,Fecha @@ -2025,7 +2025,7 @@ DocType: Item,Will also apply for variants unless overrridden,También se aplica DocType: Purchase Invoice,Advances,Anticipos apps/erpnext/erpnext/setup/doctype/authorization_rule/authorization_rule.py +32,Approving User cannot be same as user the rule is Applicable To,El usuario que aprueba no puede ser igual que el usuario para el que la regla es aplicable DocType: SMS Log,No of Requested SMS,No. de SMS solicitados -DocType: Campaign,Campaign-.####,Campaña-.#### +DocType: Campaign,Campaign-.####,Campaña-.#### apps/erpnext/erpnext/buying/doctype/purchase_order/purchase_order.js +480,Make Invoice,Hacer Factura apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/operations.py +54,Piercing,Perforación DocType: Customer,Your Customer's TAX registration numbers (if applicable) or any general information,Los números de registro de impuestos de su cliente ( si es aplicable) o cualquier información de carácter general @@ -2046,7 +2046,7 @@ The tax rate you define here will be the standard tax rate for all **Items**. If #### Description of Columns -1. Calculation Type: +1. Calculation Type: - This can be on **Net Total** (that is the sum of basic amount). - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total. - **Actual** (as mentioned). @@ -2058,19 +2058,19 @@ The tax rate you define here will be the standard tax rate for all **Items**. If 7. Total: Cumulative total to this point. 8. Enter Row: If based on ""Previous Row Total"" you can select the row number which will be taken as a base for this calculation (default is the previous row). 9. Consider Tax or Charge for: In this section you can specify if the tax / charge is only for valuation (not a part of total) or only for total (does not add value to the item) or for both. -10. Add or Deduct: Whether you want to add or deduct the tax.","Plantilla de gravamen que puede aplicarse a todas las operaciones de compra. Esta plantilla puede contener lista de cabezas de impuestos y también otros jefes de gastos como ""envío"", ""Seguros"", ""Manejo"", etc. +10. Add or Deduct: Whether you want to add or deduct the tax.","Plantilla de gravamen que puede aplicarse a todas las operaciones de compra. Esta plantilla puede contener lista de cabezas de impuestos y también otros jefes de gastos como ""envío"", ""Seguros"", ""Manejo"", etc. - #### Nota + #### Nota El tipo impositivo se define aquí será el tipo de gravamen general para todos los artículos ** **. Si hay ** ** Los artículos que tienen diferentes tasas, deben ser añadidos en el Impuesto ** ** Artículo mesa en el Artículo ** ** maestro. - #### Descripción de las Columnas + #### Descripción de las Columnas - 1. Tipo de Cálculo: + 1. Tipo de Cálculo: - Esto puede ser en ** Neto Total ** (que es la suma de la cantidad básica). - ** En Fila Anterior total / importe ** (por impuestos o cargos acumulados). Si selecciona esta opción, el impuesto se aplica como un porcentaje de la fila anterior (en la tabla de impuestos) Cantidad o total. - Actual ** ** (como se ha mencionado). - 2. Cuenta Cabeza: El libro mayor de cuentas en las que se reservó este impuesto + 2. Cuenta Cabeza: El libro mayor de cuentas en las que se reservó este impuesto 3. Centro de Costo: Si el impuesto / carga es un ingreso (como el envío) o gasto en que debe ser reservado en contra de un centro de costos. 4. Descripción: Descripción del impuesto (que se imprimirán en facturas / comillas). 5. Rate: Tasa de impuesto. @@ -2252,7 +2252,7 @@ Examples: 1. Ways of addressing disputes, indemnity, liability, etc. 1. Address and Contact of your Company.","Términos y Condiciones que se pueden agregar a compras y ventas estándar. - Ejemplos: + Ejemplos: 1. Validez de la oferta. 1. Condiciones de pago (por adelantado, el crédito, parte antelación etc). @@ -2261,7 +2261,7 @@ Examples: 1. Garantía si los hay. 1. Política de las vueltas. 1. Términos de envío, si aplica. - 1. Formas de disputas que abordan, indemnización, responsabilidad, etc. + 1. Formas de disputas que abordan, indemnización, responsabilidad, etc. 1. Dirección y contacto de su empresa." DocType: Attendance,Leave Type,Tipo de Vacaciones apps/erpnext/erpnext/controllers/stock_controller.py +173,Expense / Difference account ({0}) must be a 'Profit or Loss' account,"Cuenta de gastos / Diferencia ({0}) debe ser una cuenta de 'utilidad o pérdida """ @@ -2535,7 +2535,7 @@ apps/erpnext/erpnext/manufacturing/doctype/bom/bom.js +18,Browse BOM,Navegar por apps/erpnext/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py +175,Secured Loans,Préstamos Garantizados apps/erpnext/erpnext/utilities/doctype/rename_tool/rename_tool.py +49,Ignored:,Ignorado: apps/erpnext/erpnext/shopping_cart/__init__.py +68,{0} cannot be purchased using Shopping Cart,{0} no se puede comprar con el carrito -apps/erpnext/erpnext/setup/page/setup_wizard/data/sample_home_page.html +3,Awesome Products,Productos Increíbles +apps/erpnext/erpnext/setup/page/setup_wizard/data/sample_home_page.html +3,Awesome Products,Productos Increíbles apps/erpnext/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py +189,Opening Balance Equity,Saldo inicial Equidad apps/erpnext/erpnext/hr/doctype/leave_application/leave_application.py +80,Cannot approve leave as you are not authorized to approve leaves on Block Dates,"No se puede permitir la aprobación, ya que no está autorizado para aprobar sobre fechas bloqueadas" DocType: Appraisal,Appraisal,Evaluación @@ -2655,7 +2655,7 @@ apps/erpnext/erpnext/config/manufacturing.py +34,Where manufacturing operations DocType: Page,All,Todos DocType: Stock Entry Detail,Source Warehouse,fuente de depósito DocType: Installation Note,Installation Date,Fecha de Instalación -DocType: Employee,Confirmation Date,Fecha Confirmación +DocType: Employee,Confirmation Date,Fecha Confirmación DocType: C-Form,Total Invoiced Amount,Total Facturado DocType: Communication,Sales User,Usuario de Ventas apps/erpnext/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +46,Min Qty can not be greater than Max Qty,Qty del minuto no puede ser mayor que Max Und @@ -2672,7 +2672,7 @@ DocType: Sales Invoice,Against Income Account,Contra la Cuenta de Utilidad apps/erpnext/erpnext/controllers/website_list_for_contact.py +52,{0}% Delivered,{0}% Entregado apps/erpnext/erpnext/buying/doctype/purchase_order/purchase_order.py +82,Item {0}: Ordered qty {1} cannot be less than minimum order qty {2} (defined in Item).,Artículo {0}: Cantidad ordenada {1} no puede ser menor que el qty pedido mínimo {2} (definido en el artículo). DocType: Monthly Distribution Percentage,Monthly Distribution Percentage,Distribución Mensual Porcentual -DocType: Territory,Territory Targets,Territorios Objetivos +DocType: Territory,Territory Targets,Territorios Objetivos DocType: Delivery Note,Transporter Info,Información de Transportista DocType: Purchase Order Item Supplied,Purchase Order Item Supplied,Orden de Compra del Artículo Suministrado apps/erpnext/erpnext/config/setup.py +27,Letter Heads for print templates.,Membretes para las plantillas de impresión. @@ -2784,7 +2784,7 @@ apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/operations.py +78,Decamber apps/erpnext/erpnext/setup/doctype/company/company.js +22,Please re-type company name to confirm,"Por favor, vuelva a escribir nombre de la empresa para confirmar" apps/erpnext/erpnext/accounts/report/accounts_receivable/accounts_receivable.html +70,Total Outstanding Amt,Monto Total Soprepasado DocType: Time Log Batch,Total Hours,Total de Horas -apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py +265,Total Debit must be equal to Total Credit. The difference is {0},El total de Débitos debe ser igual al total de Créditos. La diferencia es {0} +apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py +265,Total Debit must be equal to Total Credit. The difference is {0},El total de Débitos debe ser igual al total de Créditos. La diferencia es {0} apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/industry_type.py +10,Automotive,Automotor apps/erpnext/erpnext/hr/doctype/leave_allocation/leave_allocation.py +37,Leaves for type {0} already allocated for Employee {1} for Fiscal Year {0},Vacaciones para el tipo {0} ya asignado para Empleado {1} para el Año Fiscal {0} apps/erpnext/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py +15,Item is required,Articulo es requerido @@ -2906,7 +2906,7 @@ DocType: BOM Replace Tool,The new BOM after replacement,La nueva Solicitud de Ma DocType: Features Setup,Point of Sale,Punto de Venta apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/operations.py +82,Curling,Curling DocType: Account,Tax,Impuesto -apps/erpnext/erpnext/accounts/doctype/payment_tool/payment_tool.py +34,Row {0}: {1} is not a valid {2},Fila {0}: {1} no es un {2} válido +apps/erpnext/erpnext/accounts/doctype/payment_tool/payment_tool.py +34,Row {0}: {1} is not a valid {2},Fila {0}: {1} no es un {2} válido apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/operations.py +88,Refining,Refinación DocType: Production Planning Tool,Production Planning Tool,Herramienta de Planificación de la producción DocType: Quality Inspection,Report Date,Fecha del Informe @@ -2921,7 +2921,7 @@ apps/erpnext/erpnext/config/support.py +28,Visit report for maintenance call.,In DocType: Stock Settings,Percentage you are allowed to receive or deliver more against the quantity ordered. For example: If you have ordered 100 units. and your Allowance is 10% then you are allowed to receive 110 units.,"Porcentaje que se les permite recibir o entregar más en contra de la cantidad pedida . Por ejemplo : Si se ha pedido 100 unidades. y el subsidio es de 10 %, entonces se le permite recibir 110 unidades." DocType: Pricing Rule,Customer Group,Grupo de Clientes apps/erpnext/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +156,Expense account is mandatory for item {0},Cuenta de gastos es obligatorio para el elemento {0} -DocType: Item,Website Description,Descripción del Sitio Web +DocType: Item,Website Description,Descripción del Sitio Web DocType: Serial No,AMC Expiry Date,AMC Fecha de caducidad ,Sales Register,Resitro de Ventas DocType: Quotation,Quotation Lost Reason,Cotización Pérdida Razón @@ -2955,7 +2955,7 @@ DocType: Project,Expected End Date,Fecha de finalización prevista DocType: Appraisal Template,Appraisal Template Title,Titulo de la Plantilla deEvaluación apps/erpnext/erpnext/setup/page/setup_wizard/setup_wizard.py +419,Commercial,Comercial DocType: Cost Center,Distribution Id,Id Distribución -apps/erpnext/erpnext/setup/page/setup_wizard/data/sample_home_page.html +14,Awesome Services,Servicios Impresionantes +apps/erpnext/erpnext/setup/page/setup_wizard/data/sample_home_page.html +14,Awesome Services,Servicios Impresionantes apps/erpnext/erpnext/config/manufacturing.py +29,All Products or Services.,Todos los Productos o Servicios . DocType: Purchase Invoice,Supplier Address,Dirección del proveedor DocType: Contact Us Settings,Address Line 2,Dirección Línea 2 @@ -2969,7 +2969,7 @@ apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/industry_type.py +27,Finan DocType: Opportunity,Sales,Venta apps/erpnext/erpnext/stock/doctype/delivery_note/delivery_note.py +155,Warehouse required for stock Item {0},Almacén requerido para la acción del artículo {0} apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.js +87,Cr,Cr -DocType: Customer,Default Receivable Accounts,Cuentas por Cobrar Por Defecto +DocType: Customer,Default Receivable Accounts,Cuentas por Cobrar Por Defecto apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/operations.py +101,Sawing,Serrar apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/operations.py +31,Laminating,Laminación DocType: Item Reorder,Transfer,Transferencia @@ -3011,7 +3011,7 @@ apps/erpnext/erpnext/accounts/page/accounts_browser/accounts_browser.js +212,Opt apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +104,Negative Valuation Rate is not allowed,Negativo valoración de tipo no está permitida DocType: Holiday List,Weekly Off,Semanal Desactivado DocType: Fiscal Year,"For e.g. 2012, 2012-13","Por ejemplo, 2012 , 2012-13" -apps/erpnext/erpnext/accounts/report/balance_sheet/balance_sheet.py +32,Provisional Profit / Loss (Credit),Beneficio / Pérdida (Crédito) Provisional +apps/erpnext/erpnext/accounts/report/balance_sheet/balance_sheet.py +32,Provisional Profit / Loss (Credit),Beneficio / Pérdida (Crédito) Provisional DocType: Sales Invoice,Return Against Sales Invoice,Regreso Contra Ventas Factura apps/erpnext/erpnext/stock/report/bom_search/bom_search.js +32,Item 5,Tema 5 apps/erpnext/erpnext/accounts/utils.py +243,Please set default value {0} in Company {1},"Por favor, establece el valor por defecto {0} en la empresa {1}" @@ -3029,9 +3029,9 @@ DocType: Sales Team,Contact No.,Contacto No. apps/erpnext/erpnext/accounts/doctype/gl_entry/gl_entry.py +64,'Profit and Loss' type account {0} not allowed in Opening Entry,"""Pérdidas y Ganancias "" tipo de cuenta {0} no se permite en la Entrada de Apertura" DocType: Workflow State,Time,Tiempo DocType: Features Setup,Sales Discounts,Descuentos sobre Ventas -DocType: Hub Settings,Seller Country,País del Vendedor +DocType: Hub Settings,Seller Country,País del Vendedor DocType: Authorization Rule,Authorization Rule,Regla de Autorización -DocType: Sales Invoice,Terms and Conditions Details,Detalle de Términos y Condiciones +DocType: Sales Invoice,Terms and Conditions Details,Detalle de Términos y Condiciones apps/erpnext/erpnext/templates/generators/item.html +52,Specifications,Especificaciones DocType: Sales Taxes and Charges Template,Sales Taxes and Charges Template,Impuestos y cargos de venta de plantilla apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/industry_type.py +9,Apparel & Accessories,Ropa y Accesorios @@ -3120,7 +3120,7 @@ apps/erpnext/erpnext/crm/doctype/newsletter/newsletter.py +135,Thank you for you ,Qty to Transfer,Cantidad a Transferir apps/erpnext/erpnext/config/selling.py +18,Quotes to Leads or Customers.,Cotizaciones a Oportunidades o Clientes DocType: Stock Settings,Role Allowed to edit frozen stock,Función Permitida para editar Inventario Congelado -,Territory Target Variance Item Group-Wise,Variación de Grupo por Territorio Objetivo +,Territory Target Variance Item Group-Wise,Variación de Grupo por Territorio Objetivo apps/erpnext/erpnext/setup/page/setup_wizard/install_fixtures.py +101,All Customer Groups,Todos los Grupos de Clientes apps/erpnext/erpnext/controllers/accounts_controller.py +399,{0} is mandatory. Maybe Currency Exchange record is not created for {1} to {2}.,{0} es obligatorio. Tal vez no se ha creado registro para el Tipo de Cambio {1} a {2}. apps/erpnext/erpnext/accounts/doctype/account/account.py +37,Account {0}: Parent account {1} does not exist,Cuenta {0}: Cuenta Padre {1} no existe @@ -3157,7 +3157,7 @@ apps/erpnext/erpnext/selling/report/territory_target_variance_item_group_wise/te DocType: Accounts Settings,"If enabled, the system will post accounting entries for inventory automatically.","Si está habilitado, el sistema contabiliza los asientos contables para el inventario de forma automática." apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/industry_type.py +14,Brokerage,Brokerage DocType: Production Order Operation,"in Minutes -Updated via 'Time Log'","en minutos +Updated via 'Time Log'","en minutos Actualizado a través de 'Hora de registro'" DocType: Customer,From Lead,De la iniciativa apps/erpnext/erpnext/config/manufacturing.py +19,Orders released for production.,Las órdenes publicadas para la producción. @@ -3306,7 +3306,7 @@ apps/erpnext/erpnext/buying/doctype/purchase_common/purchase_common.py +45,Pleas apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py +35,Warning: Sales Order {0} already exists against same Purchase Order number,Advertencia: Orden de Venta {0} ya existe contra el mismo número de Orden de Compra DocType: Employee External Work History,Employee External Work History,Historial de Trabajo Externo del Empleado DocType: Notification Control,Purchase,Compra -apps/erpnext/erpnext/buying/doctype/purchase_order/purchase_order.py +178,Status of {0} {1} is now {2},Situación de {0} {1} { 2 es ahora } +apps/erpnext/erpnext/buying/doctype/purchase_order/purchase_order.py +178,Status of {0} {1} is now {2},Situación de {0} {1} es ahora {2} apps/erpnext/erpnext/stock/report/stock_ledger/stock_ledger.py +34,Balance Qty,Cantidad en Balance DocType: Item Group,Parent Item Group,Grupo Principal de Artículos apps/erpnext/erpnext/projects/doctype/activity_cost/activity_cost.py +21,{0} for {1},{0} de {1} @@ -3329,7 +3329,7 @@ apps/erpnext/erpnext/selling/page/sales_browser/sales_browser.js +118,New {0} Na apps/erpnext/erpnext/controllers/recurring_document.py +128,Please find attached {0} #{1},Encuentre {0} # adjunto {1} DocType: Job Applicant,Applicant Name,Nombre del Solicitante DocType: Authorization Rule,Customer / Item Name,Cliente / Nombre de Artículo -DocType: Product Bundle,"Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**. +DocType: Product Bundle,"Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**. The package **Item** will have ""Is Stock Item"" as ""No"" and ""Is Sales Item"" as ""Yes"". @@ -3473,17 +3473,17 @@ DocType: Address Template,"

Default Template

{% if phone %}Phone: {{ phone }}<br>{% endif -%} {% if fax %}Fax: {{ fax }}<br>{% endif -%} {% if email_id %}Email: {{ email_id }}<br>{% endif -%} -","

Por defecto la plantilla -

Jinja Templating y todos los campos de la Dirección ( incluyendo campos personalizados en su caso) estará disponible -

  {{address_line1}} & lt; br & gt; 
- {% if address_line2%} {{address_line2}} & lt; br & gt; { endif% -%} 
- {{ciudad}} & lt; br & gt; 
- {% if%} Estado {{Estado}} & lt; br & gt; {% endif -%} {% if 
- código PIN%} PIN: {{código PIN}} & lt; br & gt; {% endif -%} 
- {{país}} & lt; br & gt; 
- {% if teléfono%} Teléfono: {{teléfono}} & lt; br & gt; { % endif -%} 
- {% if fax%} Fax: {{fax}} & lt; br & gt; {% endif -%} 
- {% if email_ID%} Email: {{email_ID}} & lt; br & gt ; {% endif -%} 
+
","

Por defecto la plantilla +

Jinja Templating y todos los campos de la Dirección ( incluyendo campos personalizados en su caso) estará disponible +

  {{address_line1}} & lt; br & gt;
+ {% if address_line2%} {{address_line2}} & lt; br & gt; { endif% -%}
+ {{ciudad}} & lt; br & gt;
+ {% if%} Estado {{Estado}} & lt; br & gt; {% endif -%} {% if
+ código PIN%} PIN: {{código PIN}} & lt; br & gt; {% endif -%}
+ {{país}} & lt; br & gt;
+ {% if teléfono%} Teléfono: {{teléfono}} & lt; br & gt; { % endif -%}
+ {% if fax%} Fax: {{fax}} & lt; br & gt; {% endif -%}
+ {% if email_ID%} Email: {{email_ID}} & lt; br & gt ; {% endif -%}
   "
 DocType: Salary Slip Deduction,Default Amount,Importe por Defecto
 apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +89,Warehouse not found in the system,Almacén no se encuentra en el sistema
@@ -3664,7 +3664,7 @@ DocType: Sales Invoice,Existing Customer,Cliente Existente
 DocType: Email Digest,Receivables,Cuentas por Cobrar
 DocType: Quality Inspection Reading,Reading 5,Lectura 5
 DocType: Purchase Order,"Enter email id separated by commas, order will be mailed automatically on particular date","Ingrese correo electrónico de identificación separadas por comas, la orden será enviada automáticamente en una fecha particular"
-apps/erpnext/erpnext/crm/doctype/lead/lead.py +37,Campaign Name is required,Es necesario ingresar el nombre  de la Campaña 
+apps/erpnext/erpnext/crm/doctype/lead/lead.py +37,Campaign Name is required,Es necesario ingresar el nombre  de la Campaña
 DocType: Maintenance Visit,Maintenance Date,Fecha de Mantenimiento
 DocType: Purchase Receipt Item,Rejected Serial No,Rechazado Serie No
 apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/operations.py +50,Deep drawing,Embutición profunda
@@ -3672,7 +3672,7 @@ apps/erpnext/erpnext/crm/doctype/newsletter_list/newsletter_list.js +40,New News
 apps/erpnext/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py +167,Start date should be less than end date for Item {0},La fecha de inicio debe ser menor que la fecha de finalización para el punto {0}
 apps/erpnext/erpnext/stock/doctype/item/item.js +13,Show Balance,Mostrar Equilibrio
 DocType: Item,"Example: ABCD.#####
-If series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.","Ejemplo:. ABCD ##### 
+If series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.","Ejemplo:. ABCD #####
  Si la serie se establece y Número de Serie no se menciona en las transacciones, entonces se creara un número de serie automático sobre la base de esta serie. Si siempre quiere mencionar explícitamente los números de serie para este artículo, déjelo en blanco."
 DocType: Upload Attendance,Upload Attendance,Subir Asistencia
 apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.js +107,BOM and Manufacturing Quantity are required,Lista de materiales y de fabricación se requieren Cantidad
@@ -3775,7 +3775,7 @@ apps/erpnext/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js +516,Mak
 DocType: Bank Reconciliation Detail,Voucher ID,Comprobante ID
 apps/erpnext/erpnext/setup/doctype/territory/territory.js +14,This is a root territory and cannot be edited.,Este es un territorio raíz y no se puede editar .
 DocType: Packing Slip,Gross Weight UOM,Peso Bruto de la Unidad de Medida
-DocType: Email Digest,Receivables / Payables,Cobrables/ Pagables 
+DocType: Email Digest,Receivables / Payables,Cobrables/ Pagables
 DocType: Journal Entry Account,Against Sales Invoice,Contra la Factura de Venta
 apps/erpnext/erpnext/setup/page/setup_wizard/fixtures/operations.py +62,Stamping,Estampado
 DocType: Landed Cost Item,Landed Cost Item,Landed Cost artículo
@@ -3972,7 +3972,7 @@ apps/erpnext/erpnext/config/manufacturing.py +120,Bill of Materials,Lista de mat
 apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py +79,Row {0}: Party Type and Party is required for Receivable / Payable account {1},Fila {0}: Partido Tipo y Partido se requiere para la cuenta por cobrar / pagar {1}
 DocType: Backup Manager,Send Notifications To,Enviar notificaciones a
 apps/erpnext/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html +26,Ref Date,Fecha Ref
-DocType: Employee,Reason for Leaving,Razones de Renuncia 
+DocType: Employee,Reason for Leaving,Razones de Renuncia
 DocType: Expense Claim Detail,Sanctioned Amount,importe sancionado
 DocType: GL Entry,Is Opening,está abriendo
 apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py +187,Row {0}: Debit entry can not be linked with a {1},Fila {0}: Débito no puede vincularse con {1}

From bfbf768daa9ce1a51d73a5218062e558d240050f Mon Sep 17 00:00:00 2001
From: Anand Doshi 
Date: Fri, 14 Aug 2015 12:05:50 +0530
Subject: [PATCH 11/26] [hotfix] [patch] cleanup journal entry

---
 erpnext/patches.txt                           | 2 +-
 erpnext/patches/v5_4/cleanup_journal_entry.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index acd5253e8d..0870404b07 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -189,6 +189,6 @@ erpnext.patches.v5_4.fix_invoice_outstanding
 execute:frappe.db.sql("update `tabStock Ledger Entry` set stock_queue = '[]' where voucher_type = 'Stock Reconciliation' and ifnull(qty_after_transaction, 0) = 0")
 erpnext.patches.v5_4.fix_missing_item_images
 erpnext.patches.v5_4.stock_entry_additional_costs
-erpnext.patches.v5_4.cleanup_journal_entry
+erpnext.patches.v5_4.cleanup_journal_entry #2015-08-14
 execute:frappe.db.sql("update `tabProduction Order` pro set description = (select description from tabItem where name=pro.production_item) where ifnull(description, '') = ''")
 erpnext.patches.v5_4.item_template
diff --git a/erpnext/patches/v5_4/cleanup_journal_entry.py b/erpnext/patches/v5_4/cleanup_journal_entry.py
index 442132afd1..1d3f505ad4 100644
--- a/erpnext/patches/v5_4/cleanup_journal_entry.py
+++ b/erpnext/patches/v5_4/cleanup_journal_entry.py
@@ -11,5 +11,5 @@ def execute():
 		("Expense Claim", "against_expense_claim"),
 	):
 		frappe.db.sql("""update `tabJournal Entry Account`
-			set reference_type=%s and reference_name={0} where ifnull({0}, '') != ''
+			set reference_type=%s, reference_name={0} where ifnull({0}, '') != ''
 		""".format(fieldname), doctype)

From 5dc7ff1355ea174c3c5e2fa2c9ff6ce208981f08 Mon Sep 17 00:00:00 2001
From: Anand Doshi 
Date: Fri, 14 Aug 2015 12:17:34 +0530
Subject: [PATCH 12/26] [hotfix] [patch] cleanup journal entry

---
 erpnext/patches/v5_4/cleanup_journal_entry.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/erpnext/patches/v5_4/cleanup_journal_entry.py b/erpnext/patches/v5_4/cleanup_journal_entry.py
index 1d3f505ad4..a0c332324d 100644
--- a/erpnext/patches/v5_4/cleanup_journal_entry.py
+++ b/erpnext/patches/v5_4/cleanup_journal_entry.py
@@ -1,4 +1,5 @@
 import frappe
+from MySQLdb import OperationalError
 
 def execute():
 	frappe.reload_doctype("Journal Entry Account")
@@ -10,6 +11,10 @@ def execute():
 		("Journal Entry", "against_jv"),
 		("Expense Claim", "against_expense_claim"),
 	):
-		frappe.db.sql("""update `tabJournal Entry Account`
-			set reference_type=%s, reference_name={0} where ifnull({0}, '') != ''
-		""".format(fieldname), doctype)
+		try:
+			frappe.db.sql("""update `tabJournal Entry Account`
+				set reference_type=%s, reference_name={0} where ifnull({0}, '') != ''
+			""".format(fieldname), doctype)
+		except OperationalError:
+			# column not found
+			pass

From 4f3eadc488662acb748f54beab8c05854dcb6048 Mon Sep 17 00:00:00 2001
From: Anand Doshi 
Date: Fri, 14 Aug 2015 12:51:37 +0600
Subject: [PATCH 13/26] bumped to version 5.6.2

---
 erpnext/__version__.py | 2 +-
 erpnext/hooks.py       | 2 +-
 setup.py               | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/erpnext/__version__.py b/erpnext/__version__.py
index d3874a8f05..741b326e33 100644
--- a/erpnext/__version__.py
+++ b/erpnext/__version__.py
@@ -1,2 +1,2 @@
 from __future__ import unicode_literals
-__version__ = '5.6.1'
+__version__ = '5.6.2'
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index e6797a3400..8dc1238b81 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -27,7 +27,7 @@ blogs.
 """
 app_icon = "icon-th"
 app_color = "#e74c3c"
-app_version = "5.6.1"
+app_version = "5.6.2"
 github_link = "https://github.com/frappe/erpnext"
 
 error_report_email = "support@erpnext.com"
diff --git a/setup.py b/setup.py
index 9945b713a0..7cb9c20bab 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
 from setuptools import setup, find_packages
 
-version = "5.6.1"
+version = "5.6.2"
 
 with open("requirements.txt", "r") as f:
 	install_requires = f.readlines()

From d4cb1045ed1046944fd1c616a4649384df0f03a3 Mon Sep 17 00:00:00 2001
From: Anand Doshi 
Date: Fri, 14 Aug 2015 12:55:06 +0530
Subject: [PATCH 14/26] [fix] Show 'Backflush Raw Materials Based On' in
 Manufacturing Settings

---
 .../manufacturing_settings.json               | 190 +++++++++---------
 1 file changed, 95 insertions(+), 95 deletions(-)

diff --git a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json
index 46d7bb8ca8..8be16b2153 100644
--- a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json
+++ b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json
@@ -1,123 +1,123 @@
 {
- "allow_copy": 0, 
- "allow_import": 0, 
- "allow_rename": 0, 
- "creation": "2014-11-27 14:12:07.542534", 
- "custom": 0, 
- "docstatus": 0, 
- "doctype": "DocType", 
- "document_type": "Master", 
+ "allow_copy": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "creation": "2014-11-27 14:12:07.542534",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Master",
  "fields": [
   {
-   "fieldname": "capacity_planning", 
-   "fieldtype": "Section Break", 
-   "label": "Capacity Planning", 
-   "permlevel": 0, 
+   "fieldname": "capacity_planning",
+   "fieldtype": "Section Break",
+   "label": "Capacity Planning",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "description": "Disables creation of time logs against Production Orders.\nOperations shall not be tracked against Production Order", 
-   "fieldname": "disable_capacity_planning", 
-   "fieldtype": "Check", 
-   "label": "Disable Capacity Planning and Time Tracking", 
-   "permlevel": 0, 
+   "description": "Disables creation of time logs against Production Orders.\nOperations shall not be tracked against Production Order",
+   "fieldname": "disable_capacity_planning",
+   "fieldtype": "Check",
+   "label": "Disable Capacity Planning and Time Tracking",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "description": "Plan time logs outside Workstation Working Hours.", 
-   "fieldname": "allow_overtime", 
-   "fieldtype": "Check", 
-   "label": "Allow Overtime", 
-   "permlevel": 0, 
+   "description": "Plan time logs outside Workstation Working Hours.",
+   "fieldname": "allow_overtime",
+   "fieldtype": "Check",
+   "label": "Allow Overtime",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "default": "", 
-   "fieldname": "allow_production_on_holidays", 
-   "fieldtype": "Check", 
-   "in_list_view": 1, 
-   "label": "Allow Production on Holidays", 
-   "options": "", 
-   "permlevel": 0, 
+   "default": "",
+   "fieldname": "allow_production_on_holidays",
+   "fieldtype": "Check",
+   "in_list_view": 1,
+   "label": "Allow Production on Holidays",
+   "options": "",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "default": "BOM", 
-   "fieldname": "backflush_raw_materials_based_on", 
-   "fieldtype": "Select", 
-   "label": "Backflush Raw Materials Based On", 
-   "options": "BOM\nMaterial Transferred for Manufacture", 
-   "permlevel": 0, 
+   "default": "BOM",
+   "fieldname": "backflush_raw_materials_based_on",
+   "fieldtype": "Select",
+   "label": "Backflush Raw Materials Based On",
+   "options": "BOM\nMaterial Transferred for Manufacture",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "fieldname": "column_break_3", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break_3",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "default": "30", 
-   "description": "Try planning operations for X days in advance.", 
-   "fieldname": "capacity_planning_for_days", 
-   "fieldtype": "Int", 
-   "label": "Capacity Planning For (Days)", 
-   "permlevel": 0, 
+   "default": "30",
+   "description": "Try planning operations for X days in advance.",
+   "fieldname": "capacity_planning_for_days",
+   "fieldtype": "Int",
+   "label": "Capacity Planning For (Days)",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "description": "Default 10 mins", 
-   "fieldname": "mins_between_operations", 
-   "fieldtype": "Int", 
-   "label": "Time Between Operations (in mins)", 
-   "permlevel": 0, 
+   "description": "Default 10 mins",
+   "fieldname": "mins_between_operations",
+   "fieldtype": "Int",
+   "label": "Time Between Operations (in mins)",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "fieldname": "over_production_allowance_percentage", 
-   "fieldtype": "Percent", 
-   "label": "Over Production Allowance Percentage", 
-   "permlevel": 0, 
+   "fieldname": "over_production_allowance_percentage",
+   "fieldtype": "Percent",
+   "label": "Over Production Allowance Percentage",
+   "permlevel": 0,
    "precision": ""
   }
- ], 
- "hide_heading": 0, 
- "hide_toolbar": 0, 
- "icon": "icon-wrench", 
- "in_create": 0, 
- "in_dialog": 0, 
- "is_submittable": 0, 
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "icon": "icon-wrench",
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
  "issingle": 1,
  "istable": 0,
- "modified": "2015-07-23 08:12:33.889753", 
- "modified_by": "Administrator", 
- "module": "Manufacturing", 
- "name": "Manufacturing Settings", 
- "name_case": "", 
- "owner": "Administrator", 
+ "modified": "2015-08-12 08:12:33.889753",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Manufacturing Settings",
+ "name_case": "",
+ "owner": "Administrator",
  "permissions": [
   {
-   "amend": 0, 
-   "apply_user_permissions": 0, 
-   "cancel": 0, 
-   "create": 1, 
-   "delete": 0, 
-   "email": 0, 
-   "export": 0, 
-   "import": 0, 
-   "permlevel": 0, 
-   "print": 0, 
-   "read": 1, 
-   "report": 0, 
-   "role": "Manufacturing Manager", 
-   "set_user_permissions": 0, 
-   "share": 1, 
-   "submit": 0, 
+   "amend": 0,
+   "apply_user_permissions": 0,
+   "cancel": 0,
+   "create": 1,
+   "delete": 0,
+   "email": 0,
+   "export": 0,
+   "import": 0,
+   "permlevel": 0,
+   "print": 0,
+   "read": 1,
+   "report": 0,
+   "role": "Manufacturing Manager",
+   "set_user_permissions": 0,
+   "share": 1,
+   "submit": 0,
    "write": 1
   }
- ], 
- "read_only": 0, 
- "read_only_onload": 0, 
- "sort_field": "modified", 
+ ],
+ "read_only": 0,
+ "read_only_onload": 0,
+ "sort_field": "modified",
  "sort_order": "DESC"
-}
\ No newline at end of file
+}

From 720ccabfe9152f758f75f00305f3eab3a2c51e1f Mon Sep 17 00:00:00 2001
From: Anand Doshi 
Date: Fri, 14 Aug 2015 17:34:43 +0530
Subject: [PATCH 15/26] [fix] Journal Entry Reference Name query

---
 erpnext/accounts/doctype/journal_entry/journal_entry.js | 4 ----
 erpnext/accounts/doctype/journal_entry/journal_entry.py | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js
index b05adbd279..ff1ace49d2 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.js
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js
@@ -48,10 +48,6 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
 			}
 		});
 
-		$.each([["against_voucher", "Purchase Invoice", "supplier"],
-			["against_invoice", "Sales Invoice", "customer"]], function(i, opts) {
-		});
-
 		me.frm.set_query("reference_name", "accounts", function(doc, cdt, cdn) {
 			var jvd = frappe.get_doc(cdt, cdn);
 
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py
index d891dd5b31..9f38696915 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.py
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py
@@ -605,7 +605,7 @@ def get_against_jv(doctype, txt, searchfield, start, page_len, filters):
 	return frappe.db.sql("""select jv.name, jv.posting_date, jv.user_remark
 		from `tabJournal Entry` jv, `tabJournal Entry Account` jv_detail
 		where jv_detail.parent = jv.name and jv_detail.account = %s and ifnull(jv_detail.party, '') = %s
-		and (ifnull(jv_detail.reference_type, '') = ''
+		and ifnull(jv_detail.reference_type, '') = ''
 		and jv.docstatus = 1 and jv.{0} like %s order by jv.name desc limit %s, %s""".format(searchfield),
 		(filters.get("account"), cstr(filters.get("party")), "%{0}%".format(txt), start, page_len))
 

From fd67ebf66dd80ea663c4687351a04f4c8eeeeae4 Mon Sep 17 00:00:00 2001
From: Anand Doshi 
Date: Fri, 14 Aug 2015 16:52:55 +0530
Subject: [PATCH 16/26] Show Communication in CRM

---
 erpnext/config/crm.py            | 5 +++++
 erpnext/startup/notifications.py | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/erpnext/config/crm.py b/erpnext/config/crm.py
index d7a6b2e2be..7b015c75f2 100644
--- a/erpnext/config/crm.py
+++ b/erpnext/config/crm.py
@@ -31,6 +31,11 @@ def get_data():
 					"name": "Newsletter",
 					"description": _("Newsletters to contacts, leads."),
 				},
+				{
+					"type": "doctype",
+					"name": "Communication",
+					"description": _("Record of all communications of type email, phone, chat, visit, etc."),
+				},
 			]
 		},
 		{
diff --git a/erpnext/startup/notifications.py b/erpnext/startup/notifications.py
index d06537066e..c7e63f133c 100644
--- a/erpnext/startup/notifications.py
+++ b/erpnext/startup/notifications.py
@@ -31,6 +31,6 @@ def get_notification_config():
 			"BOM": {"docstatus": 0},
 			"Timesheet": {"docstatus": 0},
 			"Time Log": {"status": "Draft"},
-			"Time Log Batch": {"status": "Draft"},
+			"Time Log Batch": {"status": "Draft"}
 		}
 	}

From 92d8a9b2d5144211bdf0110eaa7a2082f0407546 Mon Sep 17 00:00:00 2001
From: Anand Doshi 
Date: Fri, 14 Aug 2015 18:23:40 +0600
Subject: [PATCH 17/26] bumped to version 5.6.3

---
 erpnext/__version__.py | 2 +-
 erpnext/hooks.py       | 2 +-
 setup.py               | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/erpnext/__version__.py b/erpnext/__version__.py
index 741b326e33..f3915b4207 100644
--- a/erpnext/__version__.py
+++ b/erpnext/__version__.py
@@ -1,2 +1,2 @@
 from __future__ import unicode_literals
-__version__ = '5.6.2'
+__version__ = '5.6.3'
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 8dc1238b81..deecfb8e5f 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -27,7 +27,7 @@ blogs.
 """
 app_icon = "icon-th"
 app_color = "#e74c3c"
-app_version = "5.6.2"
+app_version = "5.6.3"
 github_link = "https://github.com/frappe/erpnext"
 
 error_report_email = "support@erpnext.com"
diff --git a/setup.py b/setup.py
index 7cb9c20bab..c10b407237 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
 from setuptools import setup, find_packages
 
-version = "5.6.2"
+version = "5.6.3"
 
 with open("requirements.txt", "r") as f:
 	install_requires = f.readlines()

From 1c98886c8579bd1c191b0c36fde8fe4747c985d6 Mon Sep 17 00:00:00 2001
From: Nabin Hait 
Date: Mon, 17 Aug 2015 10:50:23 +0530
Subject: [PATCH 18/26] [fix] Get stock and rate function restored

---
 erpnext/stock/doctype/stock_entry/stock_entry.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index f263f34d1d..7583306898 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -231,6 +231,10 @@ class StockEntry(StockController):
 				frappe.throw(_("""Row {0}: Qty not avalable in warehouse {1} on {2} {3}.
 					Available Qty: {4}, Transfer Qty: {5}""").format(d.idx, d.s_warehouse,
 					self.posting_date, self.posting_time, d.actual_qty, d.transfer_qty), NegativeStockError)
+					
+	def get_stock_and_rate(self):
+		self.set_actual_qty()
+		self.calculate_rate_and_amount()
 
 	def calculate_rate_and_amount(self, force=False):
 		self.set_basic_rate(force)

From f1b203246636dd26780fa4cdcd944b59ee1e200c Mon Sep 17 00:00:00 2001
From: Nabin Hait 
Date: Mon, 17 Aug 2015 11:42:48 +0530
Subject: [PATCH 19/26] Included Party and reference name in Journal Entry
 Account grid view

---
 .../journal_entry_account/journal_entry_account.json   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json
index d09171434d..77a0457056 100644
--- a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json
+++ b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json
@@ -39,7 +39,7 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "in_filter": 0, 
-   "in_list_view": 1, 
+   "in_list_view": 0, 
    "label": "Account Balance", 
    "no_copy": 1, 
    "oldfieldname": "balance", 
@@ -63,7 +63,7 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "in_filter": 1, 
-   "in_list_view": 1, 
+   "in_list_view": 0, 
    "label": "Cost Center", 
    "no_copy": 0, 
    "oldfieldname": "cost_center", 
@@ -125,7 +125,7 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "in_filter": 0, 
-   "in_list_view": 0, 
+   "in_list_view": 1, 
    "label": "Party", 
    "no_copy": 0, 
    "options": "party_type", 
@@ -287,7 +287,7 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "in_filter": 0, 
-   "in_list_view": 0, 
+   "in_list_view": 1, 
    "label": "Reference Name", 
    "no_copy": 0, 
    "options": "reference_type", 
@@ -371,7 +371,7 @@
  "is_submittable": 0, 
  "issingle": 0, 
  "istable": 1, 
- "modified": "2015-08-11 10:44:11.432623", 
+ "modified": "2015-08-17 02:11:33.991361", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Journal Entry Account", 

From 3278ea177d8726771831c0e7b6e3a70ebd4bd030 Mon Sep 17 00:00:00 2001
From: Nabin Hait 
Date: Mon, 17 Aug 2015 12:06:53 +0530
Subject: [PATCH 20/26] [fix] Additional Costs patch fixed for version 4 to 5
 migration

---
 erpnext/patches/v5_0/capacity_planning.py       |  9 ---------
 .../v5_4/stock_entry_additional_costs.py        | 17 +++++++++++++----
 2 files changed, 13 insertions(+), 13 deletions(-)
 delete mode 100644 erpnext/patches/v5_0/capacity_planning.py

diff --git a/erpnext/patches/v5_0/capacity_planning.py b/erpnext/patches/v5_0/capacity_planning.py
deleted file mode 100644
index f12f1f7241..0000000000
--- a/erpnext/patches/v5_0/capacity_planning.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-import frappe
-
-def execute():
-	frappe.reload_doc("stock", "doctype", "stock_entry")
-	if "total_fixed_cost" in frappe.db.get_table_columns("Stock Entry"):
-		frappe.db.sql("update `tabStock Entry` set additional_operating_cost = total_fixed_cost")
diff --git a/erpnext/patches/v5_4/stock_entry_additional_costs.py b/erpnext/patches/v5_4/stock_entry_additional_costs.py
index 96d6b3ddef..325d6cf4a4 100644
--- a/erpnext/patches/v5_4/stock_entry_additional_costs.py
+++ b/erpnext/patches/v5_4/stock_entry_additional_costs.py
@@ -16,15 +16,24 @@ def execute():
 		and (se.purpose not in ('Manufacture', 'Repack') or ifnull(additional_operating_cost, 0)=0)
 	""")
 
+	stock_entry_db_columns = frappe.db.get_table_columns("Stock Entry")
+	if "additional_operating_cost" in stock_entry_db_columns:
+		operating_cost_fieldname = "additional_operating_cost"
+	elif "total_fixed_cost" in stock_entry_db_columns:
+		operating_cost_fieldname = "total_fixed_cost"
+	else:
+		return
+		
+
 	stock_entries = frappe.db.sql_list("""select name from `tabStock Entry`
-		where purpose in ('Manufacture', 'Repack') and ifnull(additional_operating_cost, 0)!=0
-		and docstatus < 2""")
+		where purpose in ('Manufacture', 'Repack') and ifnull({0}, 0)!=0
+		and docstatus < 2""".format(operating_cost_fieldname))
 
 	for d in stock_entries:
 		stock_entry = frappe.get_doc("Stock Entry", d)
 		stock_entry.append("additional_costs", {
 			"description": "Additional Operating Cost",
-			"amount": stock_entry.additional_operating_cost
+			"amount": stock_entry.get(operating_cost_fieldname)
 		})
 
 		number_of_fg_items = len([t.t_warehouse for t in stock_entry.get("items") if t.t_warehouse])
@@ -33,7 +42,7 @@ def execute():
 			d.valuation_rate = d.incoming_rate
 
 			if d.bom_no or (d.t_warehouse and number_of_fg_items == 1):
-				d.additional_cost = stock_entry.additional_operating_cost
+				d.additional_cost = stock_entry.get(operating_cost_fieldname)
 
 			d.basic_rate = flt(d.valuation_rate) - flt(d.additional_cost)
 			d.basic_amount = flt(flt(d.basic_rate) *flt(d.transfer_qty), d.precision("basic_amount"))

From 91e1077e4c5722415a03debb9a33a8a3b6c72488 Mon Sep 17 00:00:00 2001
From: Nabin Hait 
Date: Mon, 17 Aug 2015 14:18:44 +0530
Subject: [PATCH 21/26] [fix] precision issue in stock entry

---
 erpnext/stock/doctype/stock_entry/stock_entry.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index 7583306898..59a68b7f19 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -277,7 +277,7 @@ class StockEntry(StockController):
 			for d in self.get("items"):
 				if d.bom_no or (d.t_warehouse and number_of_fg_items == 1):
 					d.basic_rate = flt(raw_material_cost / flt(d.transfer_qty), d.precision("basic_rate"))
-					d.basic_amount = flt(flt(d.basic_rate) * flt(d.transfer_qty), d.precision("basic_amount"))
+					d.basic_amount = flt(raw_material_cost, d.precision("basic_amount"))
 					
 	def distribute_additional_costs(self):
 		if self.purpose == "Material Issue":

From 26bc1a58af7b0642d4003e790dc3000078bf2706 Mon Sep 17 00:00:00 2001
From: Nabin Hait 
Date: Mon, 17 Aug 2015 11:27:00 +0530
Subject: [PATCH 22/26] [fix] Get Balance only if account or party mentioned

---
 erpnext/accounts/utils.py | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index f41d19dddd..51c79160c7 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -100,14 +100,15 @@ def get_balance_on(account=None, date=None, party_type=None, party=None):
 	if party_type and party:
 		cond.append("""gle.party_type = "%s" and gle.party = "%s" """ %
 			(party_type.replace('"', '\\"'), party.replace('"', '\\"')))
+			
+	if account or (party_type and party):
+		bal = frappe.db.sql("""
+			SELECT sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))
+			FROM `tabGL Entry` gle
+			WHERE %s""" % " and ".join(cond))[0][0]
 
-	bal = frappe.db.sql("""
-		SELECT sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))
-		FROM `tabGL Entry` gle
-		WHERE %s""" % " and ".join(cond))[0][0]
-
-	# if bal is None, return 0
-	return flt(bal)
+		# if bal is None, return 0
+		return flt(bal)
 
 @frappe.whitelist()
 def add_ac(args=None):

From 9495adc9d7cce3efc3a87ba4da1c7d9852736c04 Mon Sep 17 00:00:00 2001
From: Nabin Hait 
Date: Mon, 17 Aug 2015 14:31:29 +0530
Subject: [PATCH 23/26] Update patches.txt

---
 erpnext/patches.txt | 1 -
 1 file changed, 1 deletion(-)

diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 0870404b07..b15ed408fb 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -99,7 +99,6 @@ execute:frappe.db.sql("update `tabMaterial Request` set material_request_type =
 execute:frappe.reload_doc('stock', 'doctype', 'item')
 execute:frappe.db.sql("update `tabItem` i set apply_warehouse_wise_reorder_level=1, re_order_level=0, re_order_qty=0 where exists(select name from `tabItem Reorder` where parent=i.name)")
 erpnext.patches.v5_0.set_default_company_in_bom
-erpnext.patches.v5_0.capacity_planning
 execute:frappe.reload_doc('crm', 'doctype', 'lead')
 execute:frappe.reload_doc('crm', 'doctype', 'opportunity')
 erpnext.patches.v5_0.rename_taxes_and_charges_master

From ddcc766a5593763a5a69dabc17547e0b57d6fe66 Mon Sep 17 00:00:00 2001
From: Anand Doshi 
Date: Mon, 17 Aug 2015 15:06:48 +0600
Subject: [PATCH 24/26] bumped to version 5.6.4

---
 erpnext/__version__.py | 2 +-
 erpnext/hooks.py       | 2 +-
 setup.py               | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/erpnext/__version__.py b/erpnext/__version__.py
index f3915b4207..99604dc06c 100644
--- a/erpnext/__version__.py
+++ b/erpnext/__version__.py
@@ -1,2 +1,2 @@
 from __future__ import unicode_literals
-__version__ = '5.6.3'
+__version__ = '5.6.4'
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index deecfb8e5f..1609b87cab 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -27,7 +27,7 @@ blogs.
 """
 app_icon = "icon-th"
 app_color = "#e74c3c"
-app_version = "5.6.3"
+app_version = "5.6.4"
 github_link = "https://github.com/frappe/erpnext"
 
 error_report_email = "support@erpnext.com"
diff --git a/setup.py b/setup.py
index c10b407237..c624e0e444 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
 from setuptools import setup, find_packages
 
-version = "5.6.3"
+version = "5.6.4"
 
 with open("requirements.txt", "r") as f:
 	install_requires = f.readlines()

From 2e0d90a7b98b19495dd6a19d886cf0c096d5404c Mon Sep 17 00:00:00 2001
From: Anand Doshi 
Date: Mon, 17 Aug 2015 15:13:58 +0530
Subject: [PATCH 25/26] [fix] travis

---
 .travis.yml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index f6c4eeecd9..cb3dd5e4b2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,7 +15,6 @@ install:
   - wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
   - sudo bash setup_frappe.sh --skip-setup-bench --mysql-root-password travis
   - sudo pip install --upgrade pip
-  - sudo service redis-server start
   - rm $TRAVIS_BUILD_DIR/.git/shallow
   - cd ~/ && bench init frappe-bench --frappe-path https://github.com/frappe/frappe.git --frappe-branch develop
   - cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/
@@ -24,9 +23,13 @@ script:
   - cd ~/frappe-bench
   - bench get-app erpnext $TRAVIS_BUILD_DIR
   - bench use test_site
+  - bench setup redis-cache
+  - bench setup redis-async-broker
+  - bench setup procfile --with-celery-broker
   - bench reinstall
+  - bench build
   - bench build-website
-  - bench serve &
+  - bench start &
   - sleep 10
   - bench --verbose run-tests --driver Firefox
 

From 09ba897297a95ea68c9eed228518be0886d81685 Mon Sep 17 00:00:00 2001
From: Anand Doshi 
Date: Mon, 17 Aug 2015 19:21:29 +0530
Subject: [PATCH 26/26] [fix] [patch] Item Template Attributes - migration from
 v4 and v5

---
 erpnext/patches.txt                           |   2 +-
 erpnext/patches/v5_4/item_template.py         |  19 ---
 erpnext/patches/v5_7/__init__.py              |   1 +
 .../patches/v5_7/item_template_attributes.py  | 112 ++++++++++++++++++
 4 files changed, 114 insertions(+), 20 deletions(-)
 delete mode 100644 erpnext/patches/v5_4/item_template.py
 create mode 100644 erpnext/patches/v5_7/__init__.py
 create mode 100644 erpnext/patches/v5_7/item_template_attributes.py

diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index b15ed408fb..2955740d9b 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -190,4 +190,4 @@ erpnext.patches.v5_4.fix_missing_item_images
 erpnext.patches.v5_4.stock_entry_additional_costs
 erpnext.patches.v5_4.cleanup_journal_entry #2015-08-14
 execute:frappe.db.sql("update `tabProduction Order` pro set description = (select description from tabItem where name=pro.production_item) where ifnull(description, '') = ''")
-erpnext.patches.v5_4.item_template
+erpnext.patches.v5_7.item_template_attribtues
diff --git a/erpnext/patches/v5_4/item_template.py b/erpnext/patches/v5_4/item_template.py
deleted file mode 100644
index 455aae6cb3..0000000000
--- a/erpnext/patches/v5_4/item_template.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import frappe
-
-def execute():
-	item_attribute = {}
-	for d in  frappe.db.sql("""select DISTINCT va.attribute, i.variant_of from `tabVariant Attribute` va, `tabItem` i \
-		where va.parent = i.name""", as_dict=1):
-		item_attribute.setdefault(d.variant_of, []).append({"attribute": d.attribute})
-	
-	for item, attributes in item_attribute.items():
-		template = frappe.get_doc("Item", item)
-		template.set('attributes', attributes)
-		template.save()
-		
-	frappe.delete_doc("DocType", "Manage Variants")
-	frappe.delete_doc("DocType", "Manage Variants Item")
\ No newline at end of file
diff --git a/erpnext/patches/v5_7/__init__.py b/erpnext/patches/v5_7/__init__.py
new file mode 100644
index 0000000000..baffc48825
--- /dev/null
+++ b/erpnext/patches/v5_7/__init__.py
@@ -0,0 +1 @@
+from __future__ import unicode_literals
diff --git a/erpnext/patches/v5_7/item_template_attributes.py b/erpnext/patches/v5_7/item_template_attributes.py
new file mode 100644
index 0000000000..800d9382a9
--- /dev/null
+++ b/erpnext/patches/v5_7/item_template_attributes.py
@@ -0,0 +1,112 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+import MySQLdb
+
+def execute():
+	"""
+		Structure History:
+			1. Item and Item Attribute
+			2. Item, Variant Attribute, Manage Variants and Manage Variant Items
+			3. Item, Variant Attribute (latest)
+	"""
+	frappe.db.reload_doctype("Item")
+	frappe.db.reload_doctype("Variant Attribute")
+
+	variant_templates = frappe.get_all("Item", filters={"has_variants": 1}, limit_page_length=1)
+	if not variant_templates:
+		# database does not have items that have variants
+		# so no point in running the patch
+		return
+
+	variant_attributes = frappe.get_all("Variant Attribute", fields=["*"], limit_page_length=1)
+
+	if variant_attributes:
+		# manage variant patch is already applied
+		migrate_manage_variants()
+
+	else:
+		# old structure based on "Item Variant" table
+		try:
+			migrate_item_variants()
+
+		except MySQLdb.ProgrammingError:
+			print "`tabItem Variant` not found"
+
+def migrate_manage_variants():
+	item_attribute = {}
+	for d in  frappe.db.sql("""select DISTINCT va.attribute, i.variant_of from `tabVariant Attribute` va, `tabItem` i \
+		where va.parent = i.name""", as_dict=1):
+		item_attribute.setdefault(d.variant_of, []).append({"attribute": d.attribute})
+
+	for item, attributes in item_attribute.items():
+		template = frappe.get_doc("Item", item)
+		template.set('attributes', attributes)
+		template.save()
+
+	frappe.delete_doc("DocType", "Manage Variants")
+	frappe.delete_doc("DocType", "Manage Variants Item")
+
+# patch old style
+def migrate_item_variants():
+	for item in frappe.get_all("Item", filters={"has_variants": 1}):
+		all_variants = frappe.get_all("Item", filters={"variant_of": item.name}, fields=["name", "description"])
+		item_attributes = frappe.db.sql("""select distinct item_attribute, item_attribute_value
+			from `tabItem Attribute` where parent=%s""", item.name)
+
+		attribute_value_options = {}
+		for attribute, value in item_attributes:
+			attribute_value_options.setdefault(attribute, []).append(value)
+
+		save_attributes_in_template(item, attribute_value_options)
+
+		possible_combinations = get_possible_combinations(attribute_value_options)
+
+		for variant in all_variants:
+			for combination in possible_combinations:
+				match = True
+				for attribute, value in combination.items():
+					if "{0}: {1}".format(attribute, value) not in variant.description:
+						match = False
+						break
+
+				if match:
+					# found the right variant
+					save_attributes_in_variant(variant, combination)
+					break
+
+	frappe.delete_doc("DocType", "Item Attribute")
+
+def save_attributes_in_template(item, attribute_value_options):
+	# store attribute in Variant Attribute table for template
+	template = frappe.get_doc("Item", item)
+	template.set("attributes", [{"attribute": attribute} for attribute in attribute_value_options.keys()])
+	template.save()
+
+def get_possible_combinations(attribute_value_options):
+	possible_combinations = []
+
+	for attribute, values in attribute_value_options.items():
+		if not possible_combinations:
+			for v in values:
+				possible_combinations.append({attribute: v})
+
+		else:
+			for v in values:
+				for combination in possible_combinations:
+					combination[attribute] = v
+
+	return possible_combinations
+
+def save_attributes_in_variant(variant, combination):
+	# add data into attributes table
+	variant_item = frappe.get_doc("Item", variant.name)
+	variant_item.set("attributes", [])
+	for attribute, value in combination.items():
+		variant_item.append("attributes", {
+			"attribute": attribute,
+			"attribute_value": value
+		})
+	variant_item.save()