{{ title }}
+{% endblock %} + +{% block page_content %} + {% set today = frappe.utils.getdate(frappe.utils.nowdate()) %} ++ {{ _("End on") }}: {{ frappe.format_date(admission_end_date) }} +
+ + {%- if introduction -%} +
+
Eligibility and Other Details:
+| Program/Std. | +Minumum Age(DOB) | +Maximum Age(DOB) | +Application Fee | +
|---|---|---|---|
| {{ row.program }} | +{{ row.minimum_age }} | +{{ row.maximum_age }} | +{{ row.application_fee }} | +
+ + {% endif %} + +{% endblock %} diff --git a/erpnext/schools/doctype/student_admission/templates/student_admission_row.html b/erpnext/schools/doctype/student_admission/templates/student_admission_row.html new file mode 100644 index 00000000000..e0497730377 --- /dev/null +++ b/erpnext/schools/doctype/student_admission/templates/student_admission_row.html @@ -0,0 +1,36 @@ +
\ - ' + __("Stock Levels") + '
'); - erpnext.item.item_dashboard = new erpnext.stock.ItemDashboard({ - parent: section, - item_code: frm.doc.name + // Show Stock Levels only if is_stock_item + if (frm.doc.is_stock_item) { + frappe.require('assets/js/item-dashboard.min.js', function() { + var section = frm.dashboard.add_section('\ + ' + __("Stock Levels") + '
'); + erpnext.item.item_dashboard = new erpnext.stock.ItemDashboard({ + parent: section, + item_code: frm.doc.name + }); + erpnext.item.item_dashboard.refresh(); }); - erpnext.item.item_dashboard.refresh(); - }); + } }, edit_prices_button: function(frm) { diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index b1686319703..fd85a50d40e 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -1,3323 +1,3509 @@ { - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:item_code", - "beta": 0, - "creation": "2013-05-03 10:45:46", - "custom": 0, - "default_print_format": "", - "description": "A Product or a Service that is bought, sold or kept in stock.", - "docstatus": 0, - "doctype": "DocType", - "document_type": "Setup", - "editable_grid": 1, - "engine": "InnoDB", + "allow_copy": 0, + "allow_guest_to_view": 0, + "allow_import": 1, + "allow_rename": 1, + "autoname": "field:item_code", + "beta": 0, + "creation": "2013-05-03 10:45:46", + "custom": 0, + "default_print_format": "", + "description": "A Product or a Service that is bought, sold or kept in stock.", + "docstatus": 0, + "doctype": "DocType", + "document_type": "Setup", + "editable_grid": 1, + "engine": "InnoDB", "fields": [ { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "name_and_description_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-flag", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "name_and_description_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-flag", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "naming_series", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Series", - "length": 0, - "no_copy": 0, - "options": "ITEM-", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 1, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "naming_series", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Series", + "length": 0, + "no_copy": 0, + "options": "ITEM-", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 1, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "description": "", - "fieldname": "item_code", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Item Code", - "length": 0, - "no_copy": 0, - "oldfieldname": "item_code", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "description": "", + "fieldname": "item_code", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Item Code", + "length": 0, + "no_copy": 0, + "oldfieldname": "item_code", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 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, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 1, - "label": "Variant Of", - "length": 0, - "no_copy": 0, - "options": "Item", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 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, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 1, + "label": "Variant Of", + "length": 0, + "no_copy": 0, + "options": "Item", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "fieldname": "item_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Item Name", - "length": 0, - "no_copy": 0, - "oldfieldname": "item_name", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 1, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "fieldname": "item_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Item Name", + "length": 0, + "no_copy": 0, + "oldfieldname": "item_name", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "barcode", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Barcode", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "barcode", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Barcode", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fieldname": "item_group", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Item Group", - "length": 0, - "no_copy": 0, - "oldfieldname": "item_group", - "oldfieldtype": "Link", - "options": "Item Group", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fieldname": "item_group", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Item Group", + "length": 0, + "no_copy": 0, + "oldfieldname": "item_group", + "oldfieldtype": "Link", + "options": "Item Group", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fieldname": "stock_uom", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Default Unit of Measure", - "length": 0, - "no_copy": 0, - "oldfieldname": "stock_uom", - "oldfieldtype": "Link", - "options": "UOM", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "is_item_from_hub", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Is Item from Hub", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break0", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fieldname": "stock_uom", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Default Unit of Measure", + "length": 0, + "no_copy": 0, + "oldfieldname": "stock_uom", + "oldfieldtype": "Link", + "options": "UOM", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "disabled", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Disabled", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break0", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "1", - "description": "", - "fieldname": "is_stock_item", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Maintain Stock", - "length": 0, - "no_copy": 0, - "oldfieldname": "is_stock_item", - "oldfieldtype": "Select", - "options": "", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "disabled", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Disabled", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:(doc.__islocal&&doc.is_stock_item && !doc.has_serial_no && !doc.has_batch_no)", - "fieldname": "opening_stock", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Opening Stock", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "1", + "description": "", + "fieldname": "is_stock_item", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Maintain Stock", + "length": 0, + "no_copy": 0, + "oldfieldname": "is_stock_item", + "oldfieldtype": "Select", + "options": "", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:(doc.is_stock_item && !doc.has_serial_no && !doc.has_batch_no)", - "fieldname": "valuation_rate", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Valuation Rate", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:(doc.__islocal&&doc.is_stock_item && !doc.has_serial_no && !doc.has_batch_no)", + "fieldname": "opening_stock", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Opening Stock", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "fieldname": "standard_rate", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Standard Selling Rate", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:(doc.is_stock_item && !doc.has_serial_no && !doc.has_batch_no)", + "fieldname": "valuation_rate", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Valuation Rate", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "is_fixed_asset", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Is Fixed Asset", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "fieldname": "standard_rate", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Standard Selling Rate", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "is_fixed_asset", - "fieldname": "asset_category", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Asset Category", - "length": 0, - "no_copy": 0, - "options": "Asset Category", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "is_fixed_asset", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Is Fixed Asset", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:!doc.__islocal", - "description": "", - "fieldname": "tolerance", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Allow over delivery or receipt upto this percent", - "length": 0, - "no_copy": 0, - "oldfieldname": "tolerance", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "is_fixed_asset", + "fieldname": "asset_category", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Asset Category", + "length": 0, + "no_copy": 0, + "options": "Asset Category", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "image", - "fieldtype": "Attach Image", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Image", - "length": 0, - "no_copy": 0, - "options": "image", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:!doc.__islocal", + "description": "", + "fieldname": "tolerance", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Allow over delivery or receipt upto this percent", + "length": 0, + "no_copy": 0, + "oldfieldname": "tolerance", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "section_break_11", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Description", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "image", + "fieldtype": "Attach Image", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Image", + "length": 0, + "no_copy": 0, + "options": "image", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "brand", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Brand", - "length": 0, - "no_copy": 0, - "oldfieldname": "brand", - "oldfieldtype": "Link", - "options": "Brand", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "section_break_11", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Description", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "description", - "fieldtype": "Text Editor", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Description", - "length": 0, - "no_copy": 0, - "oldfieldname": "description", - "oldfieldtype": "Text", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "brand", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Brand", + "length": 0, + "no_copy": 0, + "oldfieldname": "brand", + "oldfieldtype": "Link", + "options": "Brand", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "is_stock_item", - "columns": 0, - "depends_on": "is_stock_item", - "fieldname": "inventory", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Inventory", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-truck", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "description", + "fieldtype": "Text Editor", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Description", + "length": 0, + "no_copy": 0, + "oldfieldname": "description", + "oldfieldtype": "Text", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "is_stock_item", - "description": "", - "fieldname": "default_warehouse", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Default Warehouse", - "length": 0, - "no_copy": 0, - "oldfieldname": "default_warehouse", - "oldfieldtype": "Link", - "options": "Warehouse", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "is_stock_item", + "columns": 0, + "depends_on": "is_stock_item", + "fieldname": "inventory", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Inventory", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-truck", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "2099-12-31", - "depends_on": "is_stock_item", - "fieldname": "end_of_life", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "End of Life", - "length": 0, - "no_copy": 0, - "oldfieldname": "end_of_life", - "oldfieldtype": "Date", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "is_stock_item", + "description": "", + "fieldname": "default_warehouse", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Default Warehouse", + "length": 0, + "no_copy": 0, + "oldfieldname": "default_warehouse", + "oldfieldtype": "Link", + "options": "Warehouse", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Purchase", - "fieldname": "default_material_request_type", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Default Material Request Type", - "length": 0, - "no_copy": 0, - "options": "Purchase\nMaterial Transfer\nMaterial Issue\nManufacture", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "2099-12-31", + "depends_on": "is_stock_item", + "fieldname": "end_of_life", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "End of Life", + "length": 0, + "no_copy": 0, + "oldfieldname": "end_of_life", + "oldfieldtype": "Date", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "is_stock_item", - "fieldname": "column_break1", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Purchase", + "fieldname": "default_material_request_type", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Default Material Request Type", + "length": 0, + "no_copy": 0, + "options": "Purchase\nMaterial Transfer\nMaterial Issue\nManufacture", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "is_stock_item", + "fieldname": "column_break1", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0, "width": "50%" - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "is_stock_item", - "fieldname": "valuation_method", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Valuation Method", - "length": 0, - "no_copy": 0, - "options": "\nFIFO\nMoving Average", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "is_stock_item", + "fieldname": "valuation_method", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Valuation Method", + "length": 0, + "no_copy": 0, + "options": "\nFIFO\nMoving Average", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.is_stock_item", - "fieldname": "warranty_period", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Warranty Period (in days)", - "length": 0, - "no_copy": 0, - "oldfieldname": "warranty_period", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.is_stock_item", + "fieldname": "warranty_period", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Warranty Period (in days)", + "length": 0, + "no_copy": 0, + "oldfieldname": "warranty_period", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "is_stock_item", - "description": "", - "fieldname": "net_weight", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Net Weight", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "is_stock_item", + "description": "", + "fieldname": "net_weight", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Net Weight", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.is_stock_item", - "fieldname": "weight_uom", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Weight UOM", - "length": 0, - "no_copy": 0, - "options": "UOM", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.is_stock_item", + "fieldname": "weight_uom", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Weight UOM", + "length": 0, + "no_copy": 0, + "options": "UOM", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "depends_on": "is_stock_item", - "description": "", - "fieldname": "reorder_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Auto re-order", - "length": 0, - "no_copy": 0, - "options": "fa fa-rss", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "depends_on": "is_stock_item", + "description": "", + "fieldname": "reorder_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Auto re-order", + "length": 0, + "no_copy": 0, + "options": "fa fa-rss", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "Will also apply for variants unless overrridden", - "fieldname": "reorder_levels", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Reorder level based on Warehouse", - "length": 0, - "no_copy": 0, - "options": "Item Reorder", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "Will also apply for variants unless overrridden", + "fieldname": "reorder_levels", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Reorder level based on Warehouse", + "length": 0, + "no_copy": 0, + "options": "Item Reorder", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "depends_on": "", - "fieldname": "unit_of_measure_conversion", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Units of Measure", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "depends_on": "", + "fieldname": "unit_of_measure_conversion", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Units of Measure", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "Will also apply for variants", - "fieldname": "uoms", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "UOMs", - "length": 0, - "no_copy": 1, - "oldfieldname": "uom_conversion_details", - "oldfieldtype": "Table", - "options": "UOM Conversion Detail", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "Will also apply for variants", + "fieldname": "uoms", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "UOMs", + "length": 0, + "no_copy": 0, + "oldfieldname": "uom_conversion_details", + "oldfieldtype": "Table", + "options": "UOM Conversion Detail", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "eval:doc.has_batch_no || doc.has_serial_no", - "columns": 0, - "depends_on": "is_stock_item", - "fieldname": "serial_nos_and_batches", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Serial Nos and Batches", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "eval:doc.has_batch_no || doc.has_serial_no", + "columns": 0, + "depends_on": "is_stock_item", + "fieldname": "serial_nos_and_batches", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Serial Nos and Batches", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "depends_on": "eval:doc.is_stock_item", - "fieldname": "has_batch_no", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Has Batch No", - "length": 0, - "no_copy": 1, - "oldfieldname": "has_batch_no", - "oldfieldtype": "Select", - "options": "", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "depends_on": "eval:doc.is_stock_item", + "fieldname": "has_batch_no", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Has Batch No", + "length": 0, + "no_copy": 1, + "oldfieldname": "has_batch_no", + "oldfieldtype": "Select", + "options": "", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "has_batch_no", - "description": "", - "fieldname": "create_new_batch", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Automatically Create New Batch", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "has_batch_no", + "description": "", + "fieldname": "create_new_batch", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Automatically Create New Batch", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_37", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_37", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "depends_on": "eval:doc.is_stock_item", - "description": "", - "fieldname": "has_serial_no", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Has Serial No", - "length": 0, - "no_copy": 1, - "oldfieldname": "has_serial_no", - "oldfieldtype": "Select", - "options": "", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "depends_on": "eval:doc.is_stock_item", + "description": "", + "fieldname": "has_serial_no", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Has Serial No", + "length": 0, + "no_copy": 1, + "oldfieldname": "has_serial_no", + "oldfieldtype": "Select", + "options": "", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 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, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Serial Number Series", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 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, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Serial Number Series", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "attributes", - "columns": 0, - "depends_on": "", - "fieldname": "variants_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Variants", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "attributes", + "columns": 0, + "depends_on": "", + "fieldname": "variants_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Variants", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 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, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Has Variants", - "length": 0, - "no_copy": 1, - "options": "", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 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, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Has Variants", + "length": 0, + "no_copy": 1, + "options": "", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Item Attribute", - "depends_on": "has_variants", - "fieldname": "variant_based_on", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Variant Based On", - "length": 0, - "no_copy": 0, - "options": "Item Attribute\nManufacturer", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Item Attribute", + "depends_on": "has_variants", + "fieldname": "variant_based_on", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Variant Based On", + "length": 0, + "no_copy": 0, + "options": "Item Attribute\nManufacturer", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.has_variants && doc.variant_based_on==='Item Attribute'", - "fieldname": "attributes", - "fieldtype": "Table", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Attributes", - "length": 0, - "no_copy": 1, - "options": "Item Variant Attribute", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.has_variants && doc.variant_based_on==='Item Attribute'", + "fieldname": "attributes", + "fieldtype": "Table", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Attributes", + "length": 0, + "no_copy": 1, + "options": "Item Variant Attribute", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "purchase_details", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Purchase Details", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-shopping-cart", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "purchase_details", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Purchase Details", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-shopping-cart", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "1", - "fieldname": "is_purchase_item", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Is Purchase Item", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "1", + "fieldname": "is_purchase_item", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Is Purchase Item", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0.00", - "depends_on": "is_stock_item", - "description": "", - "fieldname": "min_order_qty", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Minimum Order Qty", - "length": 0, - "no_copy": 0, - "oldfieldname": "min_order_qty", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "purchase_uom", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Default Purchase Unit of Measure", + "length": 0, + "no_copy": 0, + "options": "UOM", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "safety_stock", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Safety Stock", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "0.00", + "depends_on": "is_stock_item", + "description": "", + "fieldname": "min_order_qty", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Minimum Order Qty", + "length": 0, + "no_copy": 0, + "oldfieldname": "min_order_qty", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "Average time taken by the supplier to deliver", - "fieldname": "lead_time_days", - "fieldtype": "Int", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Lead Time in days", - "length": 0, - "no_copy": 0, - "oldfieldname": "lead_time_days", - "oldfieldtype": "Int", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "safety_stock", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Safety Stock", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "", - "fieldname": "buying_cost_center", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Default Buying Cost Center", - "length": 0, - "no_copy": 0, - "oldfieldname": "cost_center", - "oldfieldtype": "Link", - "options": "Cost Center", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "Average time taken by the supplier to deliver", + "fieldname": "lead_time_days", + "fieldtype": "Int", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Lead Time in days", + "length": 0, + "no_copy": 0, + "oldfieldname": "lead_time_days", + "oldfieldtype": "Int", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "", - "fieldname": "expense_account", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Default Expense Account", - "length": 0, - "no_copy": 0, - "oldfieldname": "purchase_account", - "oldfieldtype": "Link", - "options": "Account", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "", + "fieldname": "buying_cost_center", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Default Buying Cost Center", + "length": 0, + "no_copy": 0, + "oldfieldname": "cost_center", + "oldfieldtype": "Link", + "options": "Cost Center", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "last_purchase_rate", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Last Purchase Rate", - "length": 0, - "no_copy": 1, - "oldfieldname": "last_purchase_rate", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "", + "fieldname": "expense_account", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Default Expense Account", + "length": 0, + "no_copy": 0, + "oldfieldname": "purchase_account", + "oldfieldtype": "Link", + "options": "Account", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "depends_on": "", - "fieldname": "supplier_details", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Supplier Details", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "last_purchase_rate", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Last Purchase Rate", + "length": 0, + "no_copy": 1, + "oldfieldname": "last_purchase_rate", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "default_supplier", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Default Supplier", - "length": 0, - "no_copy": 0, - "options": "Supplier", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "depends_on": "", + "fieldname": "supplier_details", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Supplier Details", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "delivered_by_supplier", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Delivered by Supplier (Drop Ship)", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "default_supplier", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Default Supplier", + "length": 0, + "no_copy": 0, + "options": "Supplier", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "manufacturer", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Manufacturer", - "length": 0, - "no_copy": 0, - "options": "Manufacturer", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "delivered_by_supplier", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Delivered by Supplier (Drop Ship)", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "manufacturer_part_no", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Manufacturer Part Number", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "manufacturer", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Manufacturer", + "length": 0, + "no_copy": 0, + "options": "Manufacturer", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "column_break2", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Item Code for Suppliers", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "manufacturer_part_no", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Manufacturer Part Number", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "column_break2", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Item Code for Suppliers", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0, "width": "50%" - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "supplier_items", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Supplier Items", - "length": 0, - "no_copy": 0, - "options": "Item Supplier", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "supplier_items", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Supplier Items", + "length": 0, + "no_copy": 0, + "options": "Item Supplier", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "foreign_trade_details", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Foreign Trade Details", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "foreign_trade_details", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Foreign Trade Details", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "country_of_origin", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Country of Origin", - "length": 0, - "no_copy": 0, - "options": "Country", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "country_of_origin", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Country of Origin", + "length": 0, + "no_copy": 0, + "options": "Country", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_59", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_59", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "customs_tariff_number", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customs Tariff Number", - "length": 0, - "no_copy": 0, - "options": "Customs Tariff Number", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "customs_tariff_number", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customs Tariff Number", + "length": 0, + "no_copy": 0, + "options": "Customs Tariff Number", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "sales_details", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Sales Details", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-tag", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "sales_details", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Sales Details", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-tag", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "1", - "fieldname": "is_sales_item", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Is Sales Item", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "1", + "fieldname": "is_sales_item", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Is Sales Item", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0", - "description": "Publish Item to hub.erpnext.com", - "fieldname": "publish_in_hub", - "fieldtype": "Check", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Publish in Hub", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "sales_uom", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Default Sales Unit of Measure", + "length": 0, + "no_copy": 0, + "options": "UOM", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0", - "fieldname": "synced_with_hub", - "fieldtype": "Check", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Synced With Hub", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "income_account", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Default Income Account", + "length": 0, + "no_copy": 0, + "options": "Account", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "income_account", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Default Income Account", - "length": 0, - "no_copy": 0, - "options": "Account", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "selling_cost_center", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Default Selling Cost Center", + "length": 0, + "no_copy": 0, + "options": "Cost Center", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "selling_cost_center", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Default Selling Cost Center", - "length": 0, - "no_copy": 0, - "options": "Cost Center", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "column_break3", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customer Item Codes", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "column_break3", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer Item Codes", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0, "width": "50%" - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "", - "fieldname": "customer_items", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customer Items", - "length": 0, - "no_copy": 0, - "options": "Item Customer Detail", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "", + "fieldname": "customer_items", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer Items", + "length": 0, + "no_copy": 0, + "options": "Item Customer Detail", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "max_discount", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Max Discount (%)", - "length": 0, - "no_copy": 0, - "oldfieldname": "max_discount", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "max_discount", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Max Discount (%)", + "length": 0, + "no_copy": 0, + "oldfieldname": "max_discount", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "item_tax_section_break", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Item Tax", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-money", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "item_tax_section_break", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Item Tax", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-money", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Will also apply for variants", - "fieldname": "taxes", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Taxes", - "length": 0, - "no_copy": 0, - "oldfieldname": "item_tax", - "oldfieldtype": "Table", - "options": "Item Tax", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Will also apply for variants", + "fieldname": "taxes", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Taxes", + "length": 0, + "no_copy": 0, + "oldfieldname": "item_tax", + "oldfieldtype": "Table", + "options": "Item Tax", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "inspection_criteria", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Inspection Criteria", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-search", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "inspection_criteria", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Inspection Criteria", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-search", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "fieldname": "inspection_required_before_purchase", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Inspection Required before Purchase", - "length": 0, - "no_copy": 0, - "oldfieldname": "inspection_required", - "oldfieldtype": "Select", - "options": "", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "fieldname": "inspection_required_before_purchase", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Inspection Required before Purchase", + "length": 0, + "no_copy": 0, + "oldfieldname": "inspection_required", + "oldfieldtype": "Select", + "options": "", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "inspection_required_before_delivery", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Inspection Required before Delivery", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "inspection_required_before_delivery", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Inspection Required before Delivery", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:(doc.inspection_required_before_purchase || doc.inspection_required_before_delivery)", - "description": "Will also apply to variants", - "fieldname": "quality_parameters", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Quality Parameters", - "length": 0, - "no_copy": 0, - "oldfieldname": "item_specification_details", - "oldfieldtype": "Table", - "options": "Item Quality Inspection Parameter", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:(doc.inspection_required_before_purchase || doc.inspection_required_before_delivery)", + "description": "Will also apply to variants", + "fieldname": "quality_parameters", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Quality Parameters", + "length": 0, + "no_copy": 0, + "oldfieldname": "item_specification_details", + "oldfieldtype": "Table", + "options": "Item Quality Inspection Parameter", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "depends_on": "is_stock_item", - "fieldname": "manufacturing", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Manufacturing", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-cogs", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "depends_on": "is_stock_item", + "fieldname": "manufacturing", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Manufacturing", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-cogs", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "default_bom", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Default BOM", - "length": 0, - "no_copy": 1, - "oldfieldname": "default_bom", - "oldfieldtype": "Link", - "options": "BOM", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "default_bom", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Default BOM", + "length": 0, + "no_copy": 1, + "oldfieldname": "default_bom", + "oldfieldtype": "Link", + "options": "BOM", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "description": "If subcontracted to a vendor", - "fieldname": "is_sub_contracted_item", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Supply Raw Materials for Purchase", - "length": 0, - "no_copy": 0, - "oldfieldname": "is_sub_contracted_item", - "oldfieldtype": "Select", - "options": "", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "description": "If subcontracted to a vendor", + "fieldname": "is_sub_contracted_item", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Supply Raw Materials for Purchase", + "length": 0, + "no_copy": 0, + "oldfieldname": "is_sub_contracted_item", + "oldfieldtype": "Select", + "options": "", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_74", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_74", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "customer_code", - "fieldtype": "Data", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Customer Code", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "customer_code", + "fieldtype": "Data", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Customer Code", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "website_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Website", - "length": 0, - "no_copy": 0, - "options": "fa fa-globe", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "website_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Website", + "length": 0, + "no_copy": 0, + "options": "fa fa-globe", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:!doc.variant_of", - "fieldname": "show_in_website", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Show in Website", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:!doc.variant_of", + "fieldname": "show_in_website", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Show in Website", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "variant_of", - "fieldname": "show_variant_in_website", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Show in Website (Variant)", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "variant_of", + "fieldname": "show_variant_in_website", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Show in Website (Variant)", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "fieldname": "route", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Route", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "fieldname": "route", + "fieldtype": "Small Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Route", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "description": "Items with higher weightage will be shown higher", - "fieldname": "weightage", - "fieldtype": "Int", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Weightage", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 1, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "description": "Items with higher weightage will be shown higher", + "fieldname": "weightage", + "fieldtype": "Int", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Weightage", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "description": "Show a slideshow at the top of the page", - "fieldname": "slideshow", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Slideshow", - "length": 0, - "no_copy": 0, - "options": "Website Slideshow", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "description": "Show a slideshow at the top of the page", + "fieldname": "slideshow", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Slideshow", + "length": 0, + "no_copy": 0, + "options": "Website Slideshow", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "description": "Item Image (if not slideshow)", - "fieldname": "website_image", - "fieldtype": "Attach", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Image", - "length": 0, - "no_copy": 0, - "options": "", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "description": "Item Image (if not slideshow)", + "fieldname": "website_image", + "fieldtype": "Attach", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Image", + "length": 0, + "no_copy": 0, + "options": "", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "thumbnail", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Thumbnail", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "thumbnail", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Thumbnail", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "cb72", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "cb72", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_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, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Website Warehouse", - "length": 0, - "no_copy": 0, - "options": "Warehouse", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_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, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Website Warehouse", + "length": 0, + "no_copy": 0, + "options": "Warehouse", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "description": "List this Item in multiple groups on the website.", - "fieldname": "website_item_groups", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Website Item Groups", - "length": 0, - "no_copy": 0, - "options": "Website Item Group", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "description": "List this Item in multiple groups on the website.", + "fieldname": "website_item_groups", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Website Item Groups", + "length": 0, + "no_copy": 0, + "options": "Website Item Group", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "website_specifications", - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "fieldname": "sb72", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Website Specifications", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "website_specifications", + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "fieldname": "sb72", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Website Specifications", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "fieldname": "copy_from_item_group", - "fieldtype": "Button", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Copy From Item Group", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "fieldname": "copy_from_item_group", + "fieldtype": "Button", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Copy From Item Group", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "fieldname": "website_specifications", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Website Specifications", - "length": 0, - "no_copy": 0, - "options": "Item Website Specification", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "fieldname": "website_specifications", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Website Specifications", + "length": 0, + "no_copy": 0, + "options": "Item Website Specification", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "fieldname": "web_long_description", - "fieldtype": "Text Editor", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Website Description", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "fieldname": "web_long_description", + "fieldtype": "Text Editor", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Website Description", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "total_projected_qty", - "fieldtype": "Float", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Total Projected Qty", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "total_projected_qty", + "fieldtype": "Float", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Total Projected Qty", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:(!doc.is_item_from_hub)", + "fieldname": "hub_publishing_sb", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Hub Publishing Details", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "0", + "description": "Publish Item to hub.erpnext.com", + "fieldname": "publish_in_hub", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Publish in Hub", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "hub_category_to_publish", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Hub Category to Publish", + "length": 0, + "no_copy": 0, + "options": "Hub Category", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Publish \"In Stock\" or \"Not in Stock\" on Hub based on stock available in this warehouse.", + "fieldname": "hub_warehouse", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Hub Warehouse", + "length": 0, + "no_copy": 0, + "options": "Warehouse", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "0", + "fieldname": "synced_with_hub", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Synced With Hub", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "icon": "fa fa-tag", - "idx": 2, - "image_field": "image", - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 1, - "modified": "2017-07-06 18:28:36.645217", - "modified_by": "Administrator", - "module": "Stock", - "name": "Item", - "owner": "Administrator", + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "icon": "fa fa-tag", + "idx": 2, + "image_field": "image", + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 0, + "max_attachments": 1, + "modified": "2017-10-25 14:08:02.948326", + "modified_by": "Administrator", + "module": "Stock", + "name": "Item", + "owner": "Administrator", "permissions": [ { - "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, + "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, - "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, + "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": 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 User", - "set_user_permissions": 0, - "share": 0, - "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 User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, "write": 0 - }, + }, { - "amend": 0, - "apply_user_permissions": 0, - "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, + "amend": 0, + "apply_user_permissions": 0, + "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 - }, + }, { - "amend": 0, - "apply_user_permissions": 0, - "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, + "amend": 0, + "apply_user_permissions": 0, + "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 - }, + }, { - "amend": 0, - "apply_user_permissions": 0, - "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, + "amend": 0, + "apply_user_permissions": 0, + "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 - }, + }, { - "amend": 0, - "apply_user_permissions": 0, - "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, + "amend": 0, + "apply_user_permissions": 0, + "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 - }, + }, { - "amend": 0, - "apply_user_permissions": 0, - "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, + "amend": 0, + "apply_user_permissions": 0, + "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 } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "search_fields": "item_name,description,item_group,customer_code", - "show_name_in_global_search": 1, - "sort_field": "idx desc, modified desc", - "sort_order": "DESC", - "title_field": "item_name", - "track_changes": 1, + ], + "quick_entry": 1, + "read_only": 0, + "read_only_onload": 0, + "search_fields": "item_name,description,item_group,customer_code", + "show_name_in_global_search": 1, + "sort_field": "idx desc, modified desc", + "sort_order": "DESC", + "title_field": "item_name", + "track_changes": 1, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index a810665997b..4b4f15bf417 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -17,6 +17,7 @@ from erpnext.controllers.item_variant import (get_variant, copy_attributes_to_va make_variant_item_code, validate_item_variant_attributes, ItemVariantExistsError) class DuplicateReorderRows(frappe.ValidationError): pass +class StockExistsForTemplate(frappe.ValidationError): pass class Item(WebsiteGenerator): website = frappe._dict( @@ -28,11 +29,15 @@ class Item(WebsiteGenerator): def onload(self): super(Item, self).onload() + self.set_onload('sle_exists', self.check_if_sle_exists()) if self.is_fixed_asset: asset = frappe.db.get_all("Asset", filters={"item_code": self.name, "docstatus": 1}, limit=1) self.set_onload("asset_exists", True if asset else False) + if frappe.db.get_value('Stock Ledger Entry', {'item_code': self.name}): + self.set_onload('stock_exists', True) + def autoname(self): if frappe.db.get_default("item_naming_by")=="Naming Series": if self.variant_of: @@ -52,7 +57,8 @@ class Item(WebsiteGenerator): if not self.description: self.description = self.item_name - self.publish_in_hub = 1 + if self.is_sales_item and not self.is_item_from_hub: + self.publish_in_hub = 1 def after_insert(self): '''set opening stock and item price''' @@ -63,6 +69,10 @@ class Item(WebsiteGenerator): self.set_opening_stock() def validate(self): + self.before_update = None + if frappe.db.exists('Item', self.name): + self.before_update = frappe.get_doc('Item', self.name) + super(Item, self).validate() if not self.item_name: @@ -85,6 +95,7 @@ class Item(WebsiteGenerator): self.synced_with_hub = 0 self.validate_has_variants() + self.validate_stock_exists_for_template_item() self.validate_attributes() self.validate_variant_attributes() self.validate_website_image() @@ -631,6 +642,12 @@ class Item(WebsiteGenerator): if frappe.db.exists("Item", {"variant_of": self.name}): frappe.throw(_("Item has variants.")) + def validate_stock_exists_for_template_item(self): + if self.has_variants and \ + frappe.db.get_value('Stock Ledger Entry', {'item_code': self.name}): + frappe.throw(_("As stock exists against an item {0}, you can not enable has variants property") + .format(self.name), StockExistsForTemplate) + def validate_uom(self): if not self.get("__islocal"): check_stock_uom_with_bin(self.name, self.stock_uom) @@ -815,4 +832,3 @@ def check_stock_uom_with_bin(item, stock_uom): if not matched: frappe.throw(_("Default Unit of Measure for Item {0} cannot be changed directly because you have already made some transaction(s) with another UOM. You will need to create a new Item to use a different Default UOM.").format(item)) - diff --git a/erpnext/stock/doctype/item/item_list.js b/erpnext/stock/doctype/item/item_list.js index cc46177f531..db53ae96516 100644 --- a/erpnext/stock/doctype/item/item_list.js +++ b/erpnext/stock/doctype/item/item_list.js @@ -4,12 +4,12 @@ frappe.listview_settings['Item'] = { filters: [["disabled", "=", "0"]], get_indicator: function(doc) { - if(doc.total_projected_qty < 0) { - return [__("Shortage"), "red", "total_projected_qty,<,0"]; - } else if (doc.disabled) { + if (doc.disabled) { return [__("Disabled"), "grey", "disabled,=,Yes"]; } else if (doc.end_of_life && doc.end_of_life < frappe.datetime.get_today()) { return [__("Expired"), "grey", "end_of_life,<,Today"]; + } else if(doc.total_projected_qty < 0) { + return [__("Shortage"), "red", "total_projected_qty,<,0"]; } else if (doc.has_variants) { return [__("Template"), "orange", "has_variants,=,Yes"]; } else if (doc.variant_of) { diff --git a/erpnext/stock/doctype/item/test_item.js b/erpnext/stock/doctype/item/test_item.js new file mode 100644 index 00000000000..af44278a59a --- /dev/null +++ b/erpnext/stock/doctype/item/test_item.js @@ -0,0 +1,23 @@ +/* eslint-disable */ +// rename this file from _test_[name] to test_[name] to activate +// and remove above this line + +QUnit.test("test: Item", function (assert) { + let done = assert.async(); + + // number of asserts + assert.expect(1); + + frappe.run_serially([ + // insert a new Item + () => frappe.tests.make('Item', [ + // values to be set + {key: 'value'} + ]), + () => { + assert.equal(cur_frm.doc.key, 'value'); + }, + () => done() + ]); + +}); diff --git a/erpnext/stock/doctype/item/test_item.py b/erpnext/stock/doctype/item/test_item.py index 34e3af6102f..86934143607 100644 --- a/erpnext/stock/doctype/item/test_item.py +++ b/erpnext/stock/doctype/item/test_item.py @@ -8,6 +8,7 @@ import frappe from frappe.test_runner import make_test_records from erpnext.controllers.item_variant import (create_variant, ItemVariantExistsError, InvalidItemAttributeValueError, get_variant) +from erpnext.stock.doctype.item.item import StockExistsForTemplate from frappe.model.rename_doc import rename_doc from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry @@ -120,6 +121,8 @@ class TestItem(unittest.TestCase): self.assertRaises(ItemVariantExistsError, variant.save) def test_copy_fields_from_template_to_variants(self): + frappe.delete_doc_if_exists("Item", "_Test Variant Item-XL", force=1) + fields = [{'field_name': 'item_group'}, {'field_name': 'is_stock_item'}] allow_fields = [d.get('field_name') for d in fields] set_item_variant_settings(fields) @@ -188,7 +191,8 @@ class TestItem(unittest.TestCase): "increment": 0.5 } ], - "default_warehouse": "_Test Warehouse - _TC" + "default_warehouse": "_Test Warehouse - _TC", + "has_variants": 1 }) variant = create_variant("_Test Numeric Template Item", @@ -261,6 +265,15 @@ class TestItem(unittest.TestCase): self.assertEquals(variant.manufacturer, 'MSG1') self.assertEquals(variant.manufacturer_part_no, '007') + def test_stock_exists_against_template_item(self): + stock_item = frappe.get_all('Stock Ledger Entry', fields = ["item_code"], limit=1) + if stock_item: + item_code = stock_item[0].item_code + + item_doc = frappe.get_doc('Item', item_code) + item_doc.has_variants = 1 + self.assertRaises(StockExistsForTemplate, item_doc.save) + def set_item_variant_settings(fields): doc = frappe.get_doc('Item Variant Settings') doc.set('fields', fields) diff --git a/erpnext/stock/doctype/item_variant_settings/item_variant_settings.js b/erpnext/stock/doctype/item_variant_settings/item_variant_settings.js index df78572dcb4..24f7e31a0cc 100644 --- a/erpnext/stock/doctype/item_variant_settings/item_variant_settings.js +++ b/erpnext/stock/doctype/item_variant_settings/item_variant_settings.js @@ -5,7 +5,7 @@ frappe.ui.form.on('Item Variant Settings', { setup: function(frm) { const allow_fields = []; const exclude_fields = ["naming_series", "item_code", "item_name", "show_in_website", - "show_variant_in_website", "opening_stock", "variant_of", "valuation_rate", "variant_based_on"]; + "show_variant_in_website", "opening_stock", "variant_of", "valuation_rate"]; frappe.model.with_doctype('Item', () => { frappe.get_meta('Item').fields.forEach(d => { diff --git a/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py b/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py index 0c6acd4290b..678de1a9ba7 100644 --- a/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py +++ b/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py @@ -12,7 +12,7 @@ class ItemVariantSettings(Document): fields = frappe.get_meta('Item').fields exclude_fields = ["naming_series", "item_code", "item_name", "show_in_website", "show_variant_in_website", "standard_rate", "opening_stock", "image", "description", - "variant_of", "valuation_rate", "description", "variant_based_on", + "variant_of", "valuation_rate", "description", "website_image", "thumbnail", "website_specifiations", "web_long_description"] for d in fields: diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js index 7043fb7ba8e..9eb2313bb27 100644 --- a/erpnext/stock/doctype/material_request/material_request.js +++ b/erpnext/stock/doctype/material_request/material_request.js @@ -17,6 +17,9 @@ frappe.ui.form.on('Material Request', { // add item, if previous view was item erpnext.utils.add_item(frm); + //set schedule_date + set_schedule_date(frm); + // formatter for material request item frm.set_indicator_formatter('item_code', function(doc) { return (doc.qty<=doc.ordered_qty) ? "green" : "orange" }), @@ -38,12 +41,18 @@ frappe.ui.form.on("Material Request Item", { }, item_code: function(frm, doctype, name) { - frm.script_manager.copy_from_first_row('items', frm.selected_doc, - 'schedule_date'); + set_schedule_date(frm); }, schedule_date: function(frm, cdt, cdn) { - erpnext.utils.copy_value_in_all_row(frm.doc, cdt, cdn, "items", "schedule_date"); + var row = locals[cdt][cdn]; + if (row.schedule_date) { + if(!frm.doc.schedule_date) { + erpnext.utils.copy_value_in_all_row(frm.doc, cdt, cdn, "items", "schedule_date"); + } else { + set_schedule_date(frm); + } + } } }); @@ -227,6 +236,28 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten } } }); + }, + + validate: function() { + set_schedule_date(this.frm); + }, + + items_add: function(doc, cdt, cdn) { + var row = frappe.get_doc(cdt, cdn); + if(doc.schedule_date) { + row.schedule_date = doc.schedule_date; + refresh_field("schedule_date", cdn, "items"); + } else { + this.frm.script_manager.copy_from_first_row("items", row, ["schedule_date"]); + } + }, + + items_on_form_rendered: function() { + set_schedule_date(this.frm); + }, + + schedule_date: function() { + set_schedule_date(this.frm); } }); @@ -246,3 +277,9 @@ cur_frm.cscript['Unstop Material Request'] = function(){ cur_frm.refresh(); }); }; + +function set_schedule_date(frm) { + if(frm.doc.schedule_date){ + erpnext.utils.copy_value_in_all_row(frm.doc, frm.doc.doctype, frm.doc.name, "items", "schedule_date"); + } +} \ No newline at end of file diff --git a/erpnext/stock/doctype/material_request/material_request.json b/erpnext/stock/doctype/material_request/material_request.json index 87cde0d3e2f..ba373453beb 100644 --- a/erpnext/stock/doctype/material_request/material_request.json +++ b/erpnext/stock/doctype/material_request/material_request.json @@ -42,6 +42,38 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "naming_series", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Series", + "length": 0, + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "options": "MREQ-", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 1, + "unique": 0 + }, { "allow_bulk_edit": 0, "allow_on_submit": 1, @@ -133,69 +165,33 @@ }, { "allow_bulk_edit": 0, - "allow_on_submit": 0, + "allow_on_submit": 1, "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "naming_series", - "fieldtype": "Select", + "fieldname": "schedule_date", + "fieldtype": "Date", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Series", - "length": 0, - "no_copy": 1, - "oldfieldname": "naming_series", - "oldfieldtype": "Select", - "options": "MREQ-", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 1, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "amended_from", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Amended From", + "label": "Required Date", "length": 0, - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Data", - "options": "Material Request", + "no_copy": 0, "permlevel": 0, - "print_hide": 1, + "precision": "", + "print_hide": 0, "print_hide_if_no_value": 0, - "print_width": "150px", - "read_only": 1, + "read_only": 0, "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, "set_only_once": 0, - "unique": 0, - "width": "150px" + "unique": 0 }, { "allow_bulk_edit": 0, @@ -232,6 +228,40 @@ "unique": 0, "width": "150px" }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Amended From", + "length": 0, + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Data", + "options": "Material Request", + "permlevel": 0, + "print_hide": 1, + "print_hide_if_no_value": 0, + "print_width": "150px", + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0, + "width": "150px" + }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -686,7 +716,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-07-26 19:43:31.823549", + "modified": "2017-10-05 18:24:17.148782", "modified_by": "Administrator", "module": "Stock", "name": "Material Request", diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py index 65263a0694c..59075c588b7 100644 --- a/erpnext/stock/doctype/material_request/material_request.py +++ b/erpnext/stock/doctype/material_request/material_request.py @@ -7,7 +7,7 @@ from __future__ import unicode_literals import frappe -from frappe.utils import cstr, flt, getdate, new_line_sep +from frappe.utils import cstr, flt, getdate, new_line_sep, nowdate, add_days from frappe import msgprint, _ from frappe.model.mapper import get_mapped_doc from erpnext.stock.stock_balance import update_bin_qty, get_indented_qty @@ -53,11 +53,6 @@ class MaterialRequest(BuyingController): if actual_so_qty and (flt(so_items[so_no][item]) + already_indented > actual_so_qty): frappe.throw(_("Material Request of maximum {0} can be made for Item {1} against Sales Order {2}").format(actual_so_qty - already_indented, item, so_no)) - def validate_schedule_date(self): - for d in self.get('items'): - if d.schedule_date and getdate(d.schedule_date) < getdate(self.transaction_date): - frappe.throw(_("Expected Date cannot be before Material Request Date")) - # Validate # --------------------- def validate(self): @@ -70,9 +65,9 @@ class MaterialRequest(BuyingController): self.status = "Draft" from erpnext.controllers.status_updater import validate_status - validate_status(self.status, ["Draft", "Submitted", "Stopped", "Cancelled", "Pending", - "Partially Ordered", "Ordered", "Issued", "Transferred"] - ) + validate_status(self.status, + ["Draft", "Submitted", "Stopped", "Cancelled", "Pending", + "Partially Ordered", "Ordered", "Issued", "Transferred"]) validate_for_items(self) @@ -287,7 +282,7 @@ def make_purchase_order_based_on_supplier(source_name, target_doc=None): def postprocess(source, target_doc): target_doc.supplier = source_name - + target_doc.schedule_date = add_days(nowdate(), 1) target_doc.set("items", [d for d in target_doc.get("items") if d.get("item_code") in supplier_items and d.get("qty") > 0]) @@ -320,12 +315,12 @@ def get_material_requests_based_on_supplier(supplier): material_requests = frappe.db.sql_list("""select distinct mr.name from `tabMaterial Request` mr, `tabMaterial Request Item` mr_item where mr.name = mr_item.parent - and mr_item.item_code in (%s) - and mr.material_request_type = 'Purchase' - and mr.per_ordered < 99.99 - and mr.docstatus = 1 - and mr.status != 'Stopped' - order by mr_item.item_code ASC""" % ', '.join(['%s']*len(supplier_items)), + and mr_item.item_code in (%s) + and mr.material_request_type = 'Purchase' + and mr.per_ordered < 99.99 + and mr.docstatus = 1 + and mr.status != 'Stopped' + order by mr_item.item_code ASC""" % ', '.join(['%s']*len(supplier_items)), tuple(supplier_items)) else: material_requests = [] diff --git a/erpnext/stock/doctype/material_request/test_material_request.py b/erpnext/stock/doctype/material_request/test_material_request.py index 1531f4096ea..a24957e2b07 100644 --- a/erpnext/stock/doctype/material_request/test_material_request.py +++ b/erpnext/stock/doctype/material_request/test_material_request.py @@ -206,6 +206,7 @@ class TestMaterialRequest(unittest.TestCase): po_doc = make_purchase_order(mr.name) po_doc.supplier = "_Test Supplier" po_doc.transaction_date = "2013-07-07" + po_doc.schedule_date = "2013-07-09" po_doc.get("items")[0].qty = 27.0 po_doc.get("items")[1].qty = 1.5 po_doc.get("items")[0].schedule_date = "2013-07-09" @@ -557,5 +558,5 @@ class TestMaterialRequest(unittest.TestCase): item_code= %s and warehouse= %s """, (mr.items[0].item_code, mr.items[0].warehouse))[0][0] self.assertEquals(requested_qty, new_requested_qty) -test_dependencies = ["Currency Exchange"] +test_dependencies = ["Currency Exchange", "BOM"] test_records = frappe.get_test_records('Material Request') diff --git a/erpnext/stock/doctype/material_request/test_records.json b/erpnext/stock/doctype/material_request/test_records.json index 09d1912ed74..1c714969eb3 100644 --- a/erpnext/stock/doctype/material_request/test_records.json +++ b/erpnext/stock/doctype/material_request/test_records.json @@ -29,7 +29,8 @@ ], "material_request_type": "Purchase", "naming_series": "_T-Material Request-", - "transaction_date": "2013-02-18" + "transaction_date": "2013-02-18", + "schedule_date": "2013-02-19" }, { "company": "_Test Company", @@ -43,13 +44,14 @@ "item_name": "_Test FG Item", "parentfield": "items", "qty": 5, - "schedule_date": "2013-02-18", + "schedule_date": "2013-02-19", "uom": "_Test UOM 1", "warehouse": "_Test Warehouse - _TC" } ], "material_request_type": "Manufacture", "naming_series": "_T-Material Request-", - "transaction_date": "2013-02-18" + "transaction_date": "2013-02-18", + "schedule_date": "2013-02-19" } ] \ No newline at end of file diff --git a/erpnext/stock/doctype/material_request/tests/test_material_request.js b/erpnext/stock/doctype/material_request/tests/test_material_request.js index 22d1088cfe7..bf26cd117f8 100644 --- a/erpnext/stock/doctype/material_request/tests/test_material_request.js +++ b/erpnext/stock/doctype/material_request/tests/test_material_request.js @@ -1,7 +1,7 @@ QUnit.module('Stock'); QUnit.test("test material request", function(assert) { - assert.expect(1); + assert.expect(5); let done = assert.async(); frappe.run_serially([ () => { @@ -11,14 +11,25 @@ QUnit.test("test material request", function(assert) { {'schedule_date': frappe.datetime.add_days(frappe.datetime.nowdate(), 5)}, {'qty': 5}, {'item_code': 'Test Product 1'}, + ], + [ + {'schedule_date': frappe.datetime.add_days(frappe.datetime.nowdate(), 6)}, + {'qty': 2}, + {'item_code': 'Test Product 2'}, ] ]}, ]); }, () => cur_frm.save(), () => { + assert.ok(cur_frm.doc.schedule_date == frappe.datetime.add_days(frappe.datetime.now_date(), 5), "Schedule Date correct"); + // get_item_details assert.ok(cur_frm.doc.items[0].item_name=='Test Product 1', "Item name correct"); + assert.ok(cur_frm.doc.items[0].schedule_date == frappe.datetime.add_days(frappe.datetime.now_date(), 5), "Schedule Date correct"); + + assert.ok(cur_frm.doc.items[1].item_name=='Test Product 2', "Item name correct"); + assert.ok(cur_frm.doc.items[1].schedule_date == frappe.datetime.add_days(frappe.datetime.now_date(), 6), "Schedule Date correct"); }, () => frappe.tests.click_button('Submit'), () => frappe.tests.click_button('Yes'), diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 2d089c4419e..e49f9937a56 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -19,8 +19,8 @@ form_grid_templates = { } class PurchaseReceipt(BuyingController): - def __init__(self, arg1, arg2=None): - super(PurchaseReceipt, self).__init__(arg1, arg2) + def __init__(self, *args, **kwargs): + super(PurchaseReceipt, self).__init__(*args, **kwargs) self.status_updater = [{ 'source_dt': 'Purchase Receipt Item', 'target_dt': 'Purchase Order Item', diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index c39efa06f71..80c93ef434d 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -20,8 +20,8 @@ class SerialNoNotExistsError(ValidationError): pass class SerialNoDuplicateError(ValidationError): pass class SerialNo(StockController): - def __init__(self, arg1, arg2=None): - super(SerialNo, self).__init__(arg1, arg2) + def __init__(self, *args, **kwargs): + super(SerialNo, self).__init__(*args, **kwargs) self.via_stock_ledger = False def validate(self): diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index 4bcbcc4b6f4..0aecb78ddd6 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -11,7 +11,7 @@ from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt \ from erpnext.stock.doctype.stock_ledger_entry.stock_ledger_entry import StockFreezeError from erpnext.stock.stock_ledger import get_previous_sle from erpnext.stock.doctype.stock_reconciliation.test_stock_reconciliation import create_stock_reconciliation -from erpnext.stock.doctype.item.test_item import set_item_variant_settings +from erpnext.stock.doctype.item.test_item import set_item_variant_settings, make_item_variant from frappe.tests.test_permissions import set_user_permission_doctypes from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry from erpnext.accounts.doctype.account.test_account import get_inventory_account @@ -46,6 +46,7 @@ class TestStockEntry(unittest.TestCase): make_stock_entry(item_code=item_code, target=warehouse, qty=1, basic_rate=10) sle = get_sle(item_code = item_code, warehouse = warehouse)[0] + self.assertEqual([[1, 10]], frappe.safe_eval(sle.stock_queue)) # negative qty @@ -74,7 +75,6 @@ class TestStockEntry(unittest.TestCase): 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") self._test_auto_material_request("_Test Item", material_request_type="Transfer") @@ -82,6 +82,7 @@ class TestStockEntry(unittest.TestCase): def test_auto_material_request_for_variant(self): fields = [{'field_name': 'reorder_levels'}] set_item_variant_settings(fields) + make_item_variant() template = frappe.get_doc("Item", "_Test Variant Item") if not template.reorder_levels: diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 360ebca11ea..0f91e43223a 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -14,8 +14,8 @@ class OpeningEntryAccountError(frappe.ValidationError): pass class EmptyStockReconciliationItemsError(frappe.ValidationError): pass class StockReconciliation(StockController): - def __init__(self, arg1, arg2=None): - super(StockReconciliation, self).__init__(arg1, arg2) + def __init__(self, *args, **kwargs): + super(StockReconciliation, self).__init__(*args, **kwargs) self.head_row = ["Item Code", "Warehouse", "Quantity", "Valuation Rate"] def validate(self): diff --git a/erpnext/stock/doctype/warehouse/test_records.json b/erpnext/stock/doctype/warehouse/test_records.json index af3bd231fc0..014cf3e5015 100644 --- a/erpnext/stock/doctype/warehouse/test_records.json +++ b/erpnext/stock/doctype/warehouse/test_records.json @@ -13,13 +13,6 @@ "warehouse_name": "_Test Scrap Warehouse", "is_group": 0 }, - { - "company": "_Test Company", - "create_account_under": "Stock Assets - _TC", - "doctype": "Warehouse", - "warehouse_name": "_Test Warehouse", - "is_group": 0 - }, { "company": "_Test Company", "create_account_under": "Fixed Assets - _TC", diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 72a83c6c1b2..539e8a56676 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -164,6 +164,15 @@ def get_basic_details(args, item): warehouse = user_default_warehouse or item.default_warehouse or args.warehouse + #Set the UOM to the Default Sales UOM or Default Purchase UOM if configured in the Item Master + if not args.uom: + if args.get('doctype') in ['Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice']: + args.uom = item.sales_uom if item.sales_uom else item.stock_uom + elif args.get('doctype') in ['Purchase Order', 'Purchase Receipt', 'Purchase Invoice']: + args.uom = item.purchase_uom if item.purchase_uom else item.stock_uom + else: + args.uom = item.stock_uom + out = frappe._dict({ "item_code": item.name, "item_name": item.item_name, @@ -178,7 +187,7 @@ def get_basic_details(args, item): "batch_no": None, "item_tax_rate": json.dumps(dict(([d.tax_type, d.tax_rate] for d in item.get("taxes")))), - "uom": item.stock_uom, + "uom": args.uom, "min_order_qty": flt(item.min_order_qty) if args.doctype == "Material Request" else "", "qty": args.qty or 1.0, "stock_qty": args.qty or 1.0, diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 7c6b34bd909..180ccbb3e2b 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -461,6 +461,6 @@ def get_valuation_rate(item_code, warehouse, voucher_type, voucher_no, if not allow_zero_rate and not valuation_rate \ and cint(erpnext.is_perpetual_inventory_enabled(company)): frappe.local.message_log = [] - frappe.throw(_("Valuation rate not found for the Item {0}, which is required to do accounting entries for {1} {2}. If the item is transacting as a sample item in the {1}, please mention that in the {1} Item table. Otherwise, please create an incoming stock transaction for the item or mention valuation rate in the Item record, and then try submiting/cancelling this entry").format(item_code, voucher_type, voucher_no)) + frappe.throw(_("Valuation rate not found for the Item {0}, which is required to do accounting entries for {1} {2}. If the item is transacting as a zero valuation rate item in the {1}, please mention that in the {1} Item table. Otherwise, please create an incoming stock transaction for the item or mention valuation rate in the Item record, and then try submiting/cancelling this entry").format(item_code, voucher_type, voucher_no)) return valuation_rate diff --git a/erpnext/support/doctype/issue/issue.js b/erpnext/support/doctype/issue/issue.js index 306736f3dc8..77c59f4edcc 100644 --- a/erpnext/support/doctype/issue/issue.js +++ b/erpnext/support/doctype/issue/issue.js @@ -4,7 +4,7 @@ frappe.ui.form.on("Issue", { }, "refresh": function(frm) { - if(frm.doc.status==="Open") { + if(frm.doc.status!=="Closed") { frm.add_custom_button(__("Close"), function() { frm.set_value("status", "Closed"); frm.save(); diff --git a/erpnext/support/report/minutes_to_first_response_for_issues/minutes_to_first_response_for_issues.js b/erpnext/support/report/minutes_to_first_response_for_issues/minutes_to_first_response_for_issues.js index e84b13ced5a..4cf07fa2987 100644 --- a/erpnext/support/report/minutes_to_first_response_for_issues/minutes_to_first_response_for_issues.js +++ b/erpnext/support/report/minutes_to_first_response_for_issues/minutes_to_first_response_for_issues.js @@ -18,23 +18,13 @@ frappe.query_reports["Minutes to First Response for Issues"] = { get_chart_data: function(columns, result) { return { data: { - x: 'Date', - columns: [ - ['Date'].concat($.map(result, function(d) { return d[0]; })), - ['Mins to first response'].concat($.map(result, function(d) { return d[1]; })) - ] - // rows: [['Date', 'Mins to first response']].concat(result) + labels: result.map(d => d[0]), + datasets: [{ + title: 'Mins to first response', + values: result.map(d => d[1]) + }] }, - axis: { - x: { - type: 'timeseries', - tick: { - format: frappe.ui.py_date_format - } - } - }, - chart_type: 'line', - + type: 'line', } } } diff --git a/erpnext/support/report/support_hour_distribution/support_hour_distribution.py b/erpnext/support/report/support_hour_distribution/support_hour_distribution.py index e96b7b21044..905ea6a5d92 100644 --- a/erpnext/support/report/support_hour_distribution/support_hour_distribution.py +++ b/erpnext/support/report/support_hour_distribution/support_hour_distribution.py @@ -24,7 +24,7 @@ def execute(filters=None): columns = get_columns() data, timeslot_wise_count = get_data(filters) - chart = get_chartdata(timeslot_wise_count) + chart = get_chart_data(timeslot_wise_count) return columns, data, None, chart def get_data(filters): @@ -75,23 +75,21 @@ def get_columns(): return columns -def get_chartdata(timeslot_wise_count): - x_interval = ['x'] - total_count = ['Total'] +def get_chart_data(timeslot_wise_count): + total_count = [] timeslots = ['12AM - 3AM', '3AM - 6AM', '6AM - 9AM', '9AM - 12PM', '12PM - 3PM', '3PM - 6PM', '6PM - 9PM', '9PM - 12AM'] - x_interval.extend(timeslots) - columns = [x_interval] + datasets = [] for data in timeslots: total_count.append(timeslot_wise_count.get(data, 0)) - columns.append(total_count) + datasets.append({'values': total_count}) chart = { "data": { - 'x': 'x', - 'columns': columns + 'labels': timeslots, + 'datasets': datasets } } - chart["chart_type"] = "line" + chart["type"] = "line" return chart diff --git a/erpnext/templates/emails/recurring_document_failed.html b/erpnext/templates/emails/recurring_document_failed.html index ea48034f418..f9e8c2dafcf 100644 --- a/erpnext/templates/emails/recurring_document_failed.html +++ b/erpnext/templates/emails/recurring_document_failed.html @@ -1,11 +1,11 @@{{_("Recurring")}} {{ type }} {{ _("Failed")}}
-An error occured while creating recurring {{ type }} {{ name }} for {{ party }}.
-This could be because of some invalid Email Addresses in the {{ type }}.
-To stop sending repetitive error notifications from the system, we have checked "Disabled" field in the subscription {{ subscription}} for the {{ type }} {{ name }}.
-Please correct the {{ type }} and unchcked "Disabled" in the {{ subscription }} for making recurring again.
+{{_("An error occured while creating recurring")}} {{ type }} {{ name }} {{_("for")}} {{ party }}.
+{{_("This could be because of some invalid Email Addresses in the")}} {{ type }}.
+{{_("To stop sending repetitive error notifications from the system, we have checked Disabled field in the subscription")}} {{ subscription}} {{_("for the")}} {{ type }} {{ name }}.
+{{_("Please correct the")}} {{ type }} {{_('and unchcked Disabled in the')}} {{ subscription }} {{_("for making recurring again.")}}
-
It is necessary to take this action today itself for the above mentioned recurring {{ type }} -to be generated. If delayed, you will have to manually change the "Repeat on Day of Month" field -of this {{ type }} for generating the recurring {{ type }} in the subscription {{ subscription }}.
-[This email is autogenerated]
+{{_("It is necessary to take this action today itself for the above mentioned recurring")}} {{ type }} +{{_('to be generated. If delayed, you will have to manually change the "Repeat on Day of Month" field +of this')}} {{ type }} {{_("for generating the recurring")}} {{ type }} {{_("in the subscription")}} {{ subscription }}.
+[{{_("This email is autogenerated")}}]
diff --git a/erpnext/templates/includes/product_page.js b/erpnext/templates/includes/product_page.js index b2d5ad952b4..93dadaa589e 100644 --- a/erpnext/templates/includes/product_page.js +++ b/erpnext/templates/includes/product_page.js @@ -7,7 +7,7 @@ frappe.ready(function() { frappe.call({ type: "POST", - method: "erpnext.shopping_cart.product.get_product_info", + method: "erpnext.shopping_cart.product_info.get_product_info_for_website", args: { item_code: get_item_code() }, diff --git a/erpnext/templates/utils.py b/erpnext/templates/utils.py index 6ebe41185fd..7ee39602f55 100644 --- a/erpnext/templates/utils.py +++ b/erpnext/templates/utils.py @@ -28,11 +28,12 @@ def send_message(subject="Website Query", message="", sender="", status="Open"): )).insert(ignore_permissions=True) opportunity = frappe.get_doc(dict( - doctype='Opportunity', + doctype ='Opportunity', enquiry_from = 'Customer' if customer else 'Lead', status = 'Open', title = subject, - to_discuss=message + contact_email = sender, + to_discuss = message )) if customer: diff --git a/erpnext/tests/ui/make_fixtures.js b/erpnext/tests/ui/make_fixtures.js index 0bd74915c29..949e92b1ca4 100644 --- a/erpnext/tests/ui/make_fixtures.js +++ b/erpnext/tests/ui/make_fixtures.js @@ -231,7 +231,9 @@ QUnit.test('Make fixtures', assert => { let done = assert.async(); let tasks = []; Object.keys(frappe.test_data).forEach(function(doctype) { - tasks.push(function() { return frappe.tests.setup_doctype(doctype); }); + tasks.push(function() { + return frappe.tests.setup_doctype(doctype, frappe.test_data[doctype]); + }); }); frappe.run_serially(tasks).then(() => done()); }); diff --git a/erpnext/tests/ui/tests.txt b/erpnext/tests/ui/tests.txt index 909216b92eb..e7de60439ae 100644 --- a/erpnext/tests/ui/tests.txt +++ b/erpnext/tests/ui/tests.txt @@ -72,7 +72,6 @@ erpnext/hr/doctype/appraisal/test_appraisal.js erpnext/hr/doctype/expense_claim_type/test_expense_claim_type.js erpnext/hr/doctype/expense_claim/test_expense_claim.js erpnext/hr/doctype/training_event/tests/test_training_event.js -erpnext/hr/doctype/training_event/tests/test_training_event_attendance.js erpnext/hr/doctype/training_result_employee/test_training_result.js erpnext/hr/doctype/training_feedback/test_training_feedback.js erpnext/hr/doctype/loan_type/test_loan_type.js @@ -86,6 +85,7 @@ erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice.js erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_payment.js erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_payment_request.js erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.js +erpnext/accounts/doctype/payment_entry/tests/test_payment_against_purchase_invoice.js erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation_for_item_wise_discount.js erpnext/buying/doctype/purchase_order/tests/test_purchase_order.js erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_multi_uom.js @@ -128,3 +128,8 @@ erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_issue_with erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_repack.js erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_serialize_item.js erpnext/accounts/doctype/payment_entry/tests/test_payment_against_invoice.js +erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_last_purchase_rate.js +erpnext/restaurant/doctype/restaurant/test_restaurant.js +erpnext/restaurant/doctype/restaurant_table/test_restaurant_table.js +erpnext/restaurant/doctype/restaurant_menu/test_restaurant_menu.js +erpnext/restaurant/doctype/restaurant_order_entry/restaurant_order_entry.js diff --git a/erpnext/shopping_cart/product.py b/erpnext/utilities/product.py similarity index 50% rename from erpnext/shopping_cart/product.py rename to erpnext/utilities/product.py index 0d6eccd62b4..1ad8b6e5ee5 100644 --- a/erpnext/shopping_cart/product.py +++ b/erpnext/utilities/product.py @@ -5,51 +5,15 @@ from __future__ import unicode_literals import frappe from frappe.utils import cint, fmt_money, flt -from erpnext.shopping_cart.cart import _get_cart_quotation -from erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings \ - import is_cart_enabled, get_shopping_cart_settings, show_quantity_in_website from erpnext.accounts.doctype.pricing_rule.pricing_rule import get_pricing_rule_for_item -@frappe.whitelist(allow_guest=True) -def get_product_info(item_code): - """get product price / stock info""" - if not is_cart_enabled(): - return {} - - qty = 0 - cart_quotation = _get_cart_quotation() - template_item_code = frappe.db.get_value("Item", item_code, "variant_of") - stock_status = get_qty_in_stock(item_code, template_item_code) - in_stock = stock_status.in_stock - stock_qty = stock_status.stock_qty - price = get_price(item_code, template_item_code, cart_quotation.selling_price_list) - - if price: - price["formatted_price"] = fmt_money(price["price_list_rate"], currency=price["currency"]) - - price["currency"] = not cint(frappe.db.get_default("hide_currency_symbol")) \ - and (frappe.db.get_value("Currency", price.currency, "symbol") or price.currency) \ - or "" - - if frappe.session.user != "Guest": - item = cart_quotation.get({"item_code": item_code}) - if item: - qty = item[0].qty - - return { - "price": price, - "stock_qty": stock_qty, - "in_stock": in_stock, - "uom": frappe.db.get_value("Item", item_code, "stock_uom"), - "qty": qty, - "show_stock_qty": show_quantity_in_website() - } - -def get_qty_in_stock(item_code, template_item_code): +def get_qty_in_stock(item_code, item_warehouse_field): in_stock, stock_qty = 0, '' - warehouse = frappe.db.get_value("Item", item_code, "website_warehouse") + template_item_code = frappe.db.get_value("Item", item_code, "variant_of") + + warehouse = frappe.db.get_value("Item", item_code, item_warehouse_field) if not warehouse and template_item_code and template_item_code != item_code: - warehouse = frappe.db.get_value("Item", template_item_code, "website_warehouse") + warehouse = frappe.db.get_value("Item", template_item_code, item_warehouse_field) if warehouse: stock_qty = frappe.db.sql("""select actual_qty from tabBin where @@ -59,10 +23,10 @@ def get_qty_in_stock(item_code, template_item_code): return frappe._dict({"in_stock": in_stock, "stock_qty": stock_qty}) -def get_price(item_code, template_item_code, price_list, qty=1): - if price_list: - cart_settings = get_shopping_cart_settings() +def get_price(item_code, price_list, customer_group, company, qty=1): + template_item_code = frappe.db.get_value("Item", item_code, "variant_of") + if price_list: price = frappe.get_all("Item Price", fields=["price_list_rate", "currency"], filters={"price_list": price_list, "item_code": item_code}) @@ -76,8 +40,8 @@ def get_price(item_code, template_item_code, price_list, qty=1): "qty": qty, "transaction_type": "selling", "price_list": price_list, - "customer_group": cart_settings.default_customer_group, - "company": cart_settings.company, + "customer_group": customer_group, + "company": company, "conversion_rate": 1, "for_shopping_cart": True })) @@ -89,4 +53,21 @@ def get_price(item_code, template_item_code, price_list, qty=1): if pricing_rule.pricing_rule_for == "Price": price[0].price_list_rate = pricing_rule.price_list_rate - return price[0] + price_obj = price[0] + if price_obj: + price_obj["formatted_price"] = fmt_money(price_obj["price_list_rate"], currency=price_obj["currency"]) + + price_obj["currency_symbol"] = not cint(frappe.db.get_default("hide_currency_symbol")) \ + and (frappe.db.get_value("Currency", price_obj.currency, "symbol") or price_obj.currency) \ + or "" + + if not price_obj["price_list_rate"]: + price_obj["price_list_rate"] = 0 + + if not price_obj["currency"]: + price_obj["currency"] = "" + + if not price_obj["formatted_price"]: + price_obj["formatted_price"] = "" + + return price_obj diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py index 0e3a4f95251..65310aa9e30 100644 --- a/erpnext/utilities/transaction_base.py +++ b/erpnext/utilities/transaction_base.py @@ -25,7 +25,7 @@ class TransactionBase(StatusUpdater): if not getattr(self, 'set_posting_time', None): now = now_datetime() self.posting_date = now.strftime('%Y-%m-%d') - self.posting_time = now.strftime('%H:%M:%S') + self.posting_time = now.strftime('%H:%M:%S.%f') def add_calendar_event(self, opts, force=False): if cstr(self.contact_by) != cstr(self._prev.contact_by) or \
-Go to the 'More Info section' and enter the amount in the field Credit Limit.
+Go to the 'CREDIT LIMIT' section and enter the amount in the field Credit Limit.
+
+If you leave CREDIT LIMIT as 0.00, it has no effect.
In case a need arises to allow more credit to the customer as a good-will, the
Credit Controller has access to submit order even if credit limit is crossed.
@@ -26,6 +28,25 @@ has expired, go to accounting settings and make changes.
In the field Credit Controller, select the role who would be authorized to
accept orders or raise credit limits of customers.
+
+To set credit limit at Customer Group Level go to Selling -> Customers -> Customer Group
+
+Go to the 'CREDIT LIMIT' field and enter the amount.
+If you leave CREDIT LIMIT as 0.00, it has no effect.
+
+
+To set credit limit at Company level go to Account -> Company
+
+Go to the 'ACCOUNT SETTINGS' section and enter the amount in the CREDIT LIMIT field.
+If you leave CREDIT LIMIT as 0.00, it has no effect.
+
+For 'CREDIT LIMIT' check functionality, Priority (High to Low) is as below
+1) Customer
+2) Customer Group
+3) Company
+
+
+
#### Figure 2: Credit Controller
diff --git a/erpnext/docs/user/manual/en/customize-erpnext/articles/field-types.md b/erpnext/docs/user/manual/en/customize-erpnext/articles/field-types.md
index 24cb4ab7277..c73ebc76af3 100644
--- a/erpnext/docs/user/manual/en/customize-erpnext/articles/field-types.md
+++ b/erpnext/docs/user/manual/en/customize-erpnext/articles/field-types.md
@@ -56,6 +56,17 @@ Integer field holds numeric value, without decimal place.
Link field is connected to another master from where it fetches data. For example, in the Quotation master, Customer is a Link field.
+- Geolocation
+
+Use Geolocation field to store GeoJSON featurecollection. Stores polygons, lines and points. Internally it uses following custom properties for identifying a circle.
+
+```
+{
+ "point_type": "circle",
+ "radius": 10.00
+}
+```
+
- Password
Password field will have decode value in it.
@@ -84,4 +95,4 @@ Table will be (sort of) Link field which renders another docytpe within the curr
Text Editor is text field. It has text-formatting options. In ERPNext, this field is generally used for defining Terms and Conditions.
-
\ No newline at end of file
+
diff --git a/erpnext/docs/user/manual/en/hospitality/index.md b/erpnext/docs/user/manual/en/hospitality/index.md
new file mode 100644
index 00000000000..efd7377fc41
--- /dev/null
+++ b/erpnext/docs/user/manual/en/hospitality/index.md
@@ -0,0 +1,9 @@
+# Hospitality
+
+ERPNext Hospitality module is designed to handle workflows for Hotels and Restaurants. This is still in early development stage.
+
+### Manage Restaurants
+
+The Restaurant module in ERPNext will help you manage a chain of restaurants. You can create Restaurants, Menus, Tables, Reservations and a manage Order Entry and Billing.
+
+{index}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/hospitality/index.txt b/erpnext/docs/user/manual/en/hospitality/index.txt
new file mode 100644
index 00000000000..cbe6da00773
--- /dev/null
+++ b/erpnext/docs/user/manual/en/hospitality/index.txt
@@ -0,0 +1,4 @@
+restaurant
+restaurant-menu
+reservations
+order-entry
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/hospitality/order-entry.md b/erpnext/docs/user/manual/en/hospitality/order-entry.md
new file mode 100644
index 00000000000..929cfd8ef75
--- /dev/null
+++ b/erpnext/docs/user/manual/en/hospitality/order-entry.md
@@ -0,0 +1,26 @@
+# Restaurant Order Entry
+
+The Restaurant Order Entry is the screen where the waiters will punch in orders related to a particular table.
+
+This screen makes it easy for the waiters in your restaurant to punch in orders from various tables.
+
+When the guest places an order, the waiter will select the table number and add the items in the Order Entry. This can be changed until it is time for the bill. Unless you bill a table, you can change the items and they will automatically appear when you select the table ID.
+
+To place an order you can select an item and click the enter key so that the item will be updated in the items table.
+
+
+
+You can also choose items with the POS style item selector.
+
+### Billing
+
+When it is time for billing, you just choose the bill and you can select the customer and mode of payment. On saving, a Sales Invoice is generated and the order section becomes empty.
+
+
+
+### Sales Invoice
+
+To print the invoice, you can click on the Invoice Link and print the invoice
+
+
+
diff --git a/erpnext/docs/user/manual/en/hospitality/reservations.md b/erpnext/docs/user/manual/en/hospitality/reservations.md
new file mode 100644
index 00000000000..0d4a8abde5d
--- /dev/null
+++ b/erpnext/docs/user/manual/en/hospitality/reservations.md
@@ -0,0 +1,13 @@
+# Restaurant Reservations
+
+Once you have setup the restaurant and tables, you can start taking in reservations for your restaurant.
+
+To take a reservation, just make a new Restaurant Reservation from the Restaurant Page and set the time, number of people and name of the guest.
+
+
+
+### Kanban
+
+As your guests walk in, You can also manage the reservations by making a simple Kanban board for the same.
+
+
diff --git a/erpnext/docs/user/manual/en/hospitality/restaurant-menu.md b/erpnext/docs/user/manual/en/hospitality/restaurant-menu.md
new file mode 100644
index 00000000000..dfbf4ce9717
--- /dev/null
+++ b/erpnext/docs/user/manual/en/hospitality/restaurant-menu.md
@@ -0,0 +1,7 @@
+# Restaurant Menu
+
+For every restaurant you must set an active Restaurant Menu from which orders can be placed. You can also set the rates for each of the item for the day.
+
+When you save the Restaurant Menu, a Price List is created for that Menu and all pricing is linked to that price list. This way you can easily control the items on offer and pricing from the menu.
+
+
diff --git a/erpnext/docs/user/manual/en/hospitality/restaurant.md b/erpnext/docs/user/manual/en/hospitality/restaurant.md
new file mode 100644
index 00000000000..7b72318835e
--- /dev/null
+++ b/erpnext/docs/user/manual/en/hospitality/restaurant.md
@@ -0,0 +1,19 @@
+# Restaurant
+
+The Restaurant record represents one restaurant in your organization. To create a new Restaurant, just set the name, Company and Default Customer.
+
+You can set a unique numbering prefix for each of your restaurants. All invoices for that restuarant will follow that numbering prefix.
+
+If you have a default Sales Taxes and Charges Template, you can add it so that the same charge + tax will be applicable for all invoices in the restaurant.
+
+
+
+After your restaurant is created, you can add Tables and Menus for that restaurant
+
+### Adding Tables
+
+You can add a Restaurant Table by creating a new Restaurant Table from the dashboard.
+
+
+
+
diff --git a/erpnext/docs/user/manual/en/human-resources/training.md b/erpnext/docs/user/manual/en/human-resources/training.md
index 2aa06791f05..4d39bf1a69c 100644
--- a/erpnext/docs/user/manual/en/human-resources/training.md
+++ b/erpnext/docs/user/manual/en/human-resources/training.md
@@ -1,8 +1,13 @@
# Training
+### Training Program
+
+Create Training Program and schedule Training Events under it. It has a dashboard linked to Training Event to view which event is under the Training Program.
+
+
### Training Event
-Schedule seminars, workshops, conferences etc using Training Event. You can also invite your employees to attend the event using this feature.
+Schedule seminars, workshops, conferences etc using Training Event linked to a Training Program. You can also invite your employees to attend the event using this feature.
@@ -14,11 +19,11 @@ By default the status of the employee will be 'Open'.
-When you submit the Training Event, a notifcation will be sent to the employee notifying that the Training has been scheduled. This is sent via Email Alert "Training Scheduled". You can modifiy this Email Alert to customize the message.
+When you submit the Training Event, a notification will be sent to the employee notifying that the Training has been scheduled. This is sent via Email Alert "Training Scheduled". You can modify this Email Alert to customize the message.
### Training Result
-After compleation of the training Employee-wise training results can be stored based on the Feedback received from the Trainer.
+After completion of the training Employee-wise training results can be stored based on the Feedback received from the Trainer.
diff --git a/erpnext/docs/user/manual/en/introduction/concepts-and-terms.md b/erpnext/docs/user/manual/en/introduction/concepts-and-terms.md
index 3a512865428..c53bef92a50 100644
--- a/erpnext/docs/user/manual/en/introduction/concepts-and-terms.md
+++ b/erpnext/docs/user/manual/en/introduction/concepts-and-terms.md
@@ -97,8 +97,8 @@ fiscal year.
A Cost Center is like an Account, but the only difference is that its
structure represents your business more closely than Accounts.
-For example, in your Chart of Accounts, you can separate your expenses by its type
-(i.e., travel, marketing, etc.). In your Chart of Cost Centers, you can separate
+For example, in your Chart of Accounts, you can separate your expenses by its type
+(i.e., travel, marketing, etc.). In your Chart of Cost Centers, you can separate
them by product line or business group (e.g., online sales, retail sales, etc.).
> Accounts > Chart of Cost Centers
@@ -316,7 +316,7 @@ A record of the monthly salary given to an Employee.
#### Salary Structure
-A template identifying all the components of an Employees' salary (earnings),
+A template identifying all the components of an Employees' salary (earnings),
tax and other social security deductions.
> Human Resource > Salary and Payroll > Salary Structure
diff --git a/erpnext/docs/user/manual/en/introduction/getting-started-with-erpnext.md b/erpnext/docs/user/manual/en/introduction/getting-started-with-erpnext.md
index 4aae00ed058..634bb43221f 100644
--- a/erpnext/docs/user/manual/en/introduction/getting-started-with-erpnext.md
+++ b/erpnext/docs/user/manual/en/introduction/getting-started-with-erpnext.md
@@ -1,7 +1,3 @@
-# Getting Started With Erpnext
-
-
-
# Getting Started with ERPNext
There are many ways to get started with ERPNext.
diff --git a/erpnext/docs/user/manual/en/introduction/the-champion.md b/erpnext/docs/user/manual/en/introduction/the-champion.md
index 57086cb9fb1..fca349e5f3f 100644
--- a/erpnext/docs/user/manual/en/introduction/the-champion.md
+++ b/erpnext/docs/user/manual/en/introduction/the-champion.md
@@ -1,9 +1,5 @@
# The Champion
-
-
-
We have seen dozens of ERP implementations over the past few years and we
diff --git a/erpnext/docs/user/manual/en/schools/admission/student_admission.md b/erpnext/docs/user/manual/en/schools/admission/student_admission.md
index eeaa977912b..7a63fa7a75c 100644
--- a/erpnext/docs/user/manual/en/schools/admission/student_admission.md
+++ b/erpnext/docs/user/manual/en/schools/admission/student_admission.md
@@ -1,13 +1,14 @@
# Student Admission
-The admission process begins with filling the admission form. The Student Admission record enables to intitate your admission process for a given **Academic year**. ERPNext admission module allow you to create an admission record which can be then published on the ERPNext generate website.
+The admission process begins with filling the admission form. The Student Admission record enables to initiate your admission process for a given **Academic year**. ERPNext admission module allows you to create an admission record which can be then published on the ERPNext generate website.
To create a Student Admission record go to :
**Schools** >> **Admissions** >> **Student Admission** >>
-
+
+Once an admission record is created, the age eligibility criteria can be determined for the every program. Similarly, you can also determine the application fee and naming series for every student applicant. If you keep the naming series blank then the default naming series will be applied for every student applicant.
-Once a admission record is created it can be published on the website and the student can apply from the web portal itself.
\ No newline at end of file
+The information provided in the Student Admission records will be used for the validation and creation of the Student Admission records (only if student admission link is filled there)
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/subscription/index.md b/erpnext/docs/user/manual/en/subscription/index.md
deleted file mode 100644
index 24d75eda95d..00000000000
--- a/erpnext/docs/user/manual/en/subscription/index.md
+++ /dev/null
@@ -1,22 +0,0 @@
-If you have a contract with the Customer where your organization gives bill to the Customer on a monthly, quarterly, half-yearly or annual basis, you can use subscription feature to make auto invoicing.
-
-
-
-#### Scenario
-
-Subscription for your hosted ERPNext account requires yearly renewal. We use Sales Invoice for generating proforma invoices. To automate proforma invoicing for renewal, we set original Sales Invoice on the subscription form. Recurring proforma invoice is created automatically just before customer's account is about to expire, and requires renewal. This recurring Proforma Invoice is also emailed automatically to the customer.
-
-To set the subscription for the sales invoice
-Goto Subscription > select base doctype "Sales Invoice" > select base docname "Invoice No" > Save
-
-
-
-**From Date and To Date**: This defines contract period with the customer.
-
-**Repeat on Day**: If frequency is set as Monthly, then it will be day of the month on which recurring invoice will be generated.
-
-**Notify By Email**: If you want to notify the user about auto recurring invoice.
-
-**Print Format**: Select a print format to define document view which should be emailed to customer.
-
-**Disabled**: It will stop to make auto recurring documents against the subscription
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/es/index.txt b/erpnext/docs/user/manual/es/index.txt
index feb68a2fe0b..00cf97b420c 100644
--- a/erpnext/docs/user/manual/es/index.txt
+++ b/erpnext/docs/user/manual/es/index.txt
@@ -1,3 +1,4 @@
introduction
accounts
+projects
schools
diff --git a/erpnext/docs/user/manual/en/subscription/index.txt b/erpnext/docs/user/manual/es/projects/__init__.py
similarity index 100%
rename from erpnext/docs/user/manual/en/subscription/index.txt
rename to erpnext/docs/user/manual/es/projects/__init__.py
diff --git a/erpnext/docs/user/manual/es/projects/activity-cost.md b/erpnext/docs/user/manual/es/projects/activity-cost.md
new file mode 100644
index 00000000000..71eb15e4326
--- /dev/null
+++ b/erpnext/docs/user/manual/es/projects/activity-cost.md
@@ -0,0 +1,6 @@
+# Costo de Actividad
+
+El costo de la actividad registra la tasa de facturación por hora y la tasa de costos de un empleado en comparación con un tipo de actividad.
+El sistema hace uso de esta tasa mientras hace registros de tiempo. Se usa para Costeo de proyectos.
+
+
diff --git a/erpnext/docs/user/manual/es/projects/activity-type.md b/erpnext/docs/user/manual/es/projects/activity-type.md
new file mode 100644
index 00000000000..20a03e2932d
--- /dev/null
+++ b/erpnext/docs/user/manual/es/projects/activity-type.md
@@ -0,0 +1,15 @@
+# Tipo de Actividad
+
+Los tipos de actividad son la lista de los diferentes tipos de actividades sobre las que se hacen registro de tiempo.
+
+
+
+Por defecto, los siguientes tipos de actividades son creados.
+
+* Planning
+* Research
+* Proposal Writing
+* Execution
+* Communication
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/es/projects/articles/__init__.py b/erpnext/docs/user/manual/es/projects/articles/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/erpnext/docs/user/manual/es/projects/articles/index.md b/erpnext/docs/user/manual/es/projects/articles/index.md
new file mode 100644
index 00000000000..2d959ecb6e2
--- /dev/null
+++ b/erpnext/docs/user/manual/es/projects/articles/index.md
@@ -0,0 +1,3 @@
+# Artículos
+
+{index}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/es/projects/articles/index.txt b/erpnext/docs/user/manual/es/projects/articles/index.txt
new file mode 100644
index 00000000000..56c193c2776
--- /dev/null
+++ b/erpnext/docs/user/manual/es/projects/articles/index.txt
@@ -0,0 +1 @@
+project-costing
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/es/projects/articles/project-costing.md b/erpnext/docs/user/manual/es/projects/articles/project-costing.md
new file mode 100644
index 00000000000..a8820c7e297
--- /dev/null
+++ b/erpnext/docs/user/manual/es/projects/articles/project-costing.md
@@ -0,0 +1,40 @@
+# Costeo de proyectos
+
+Cada proyecto tiene multiples tareas asociadas a el. Para hacer el seguimiento del costo actual de un proyecto, primeramente en términos de servicios, el usuario
+tiene que crear un registro de tiempo basado en el tiempo que invirtió en una tarea del proyecto. Siguiendo los pasos de como puedes hacer el seguimiento del costo actual de un servicio usando el proyecto.
+
+#### Tipo de actividad
+
+Tipo de actividad es un maestro de los servicios ofrecidos por su personal. Puedes agregar un nuevo Tipo de Actividad desde:
+
+`Project > Activity Type > New`
+
+#### Costo de actividad
+
+Costo de actividad es un maestro donde puedes hacer el seguimiento de los montos de facturación y costo de cada empleado, y por cada tipo de Tipo de Actividad.
+
+
+
+#### Registro de Tiempo
+
+Basados en el tiempo actual invertido en una Tarea del Proyecto, El empleado va a crear un registro de tiempo.
+
+
+
+Al momento de seleccionar el Tipo de Actividad en el Registro de tiempo, el monto de Facturación y Costo del empleado va a ser traído de su respectivo registro en el master de Costo de Actividad.
+
+
+
+Multiplicando esos montos con el total de número de horas en el registro de tiempo, nos da el monto de costos y Facturación para el registro de tiempo específico.
+
+#### Costeo en Proyectos y Tareas
+
+Basados en el total de registros de tiempos creados por una tarea en específico, su costo va a ser actualizado en el registro maestro de la tarea, o sea, en el detalle de la tarea.
+
+
+
+De la misma manera, el detalle del Proyecto va a actualizar su costo basado en el total de registros de tiempo a ese proyecto, y las tareas asociadas a ese proyecto.
+
+
+
+
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/es/projects/index.md b/erpnext/docs/user/manual/es/projects/index.md
new file mode 100644
index 00000000000..0882752a404
--- /dev/null
+++ b/erpnext/docs/user/manual/es/projects/index.md
@@ -0,0 +1,15 @@
+# Proyectos
+
+ERPNext le ayuda en la administración de su proyecto a traves de la creacion de tareas y
+poder asignarlas a diferentes personas.
+
+Las compras y las ventas también se pueden rastrear en relación con los proyectos y
+esto puede ayudar a la empresa a controlar su presupuesto, entrega y rentabilidad para un proyecto.
+
+Los proyectos pueden ser usados para manejar los proyectos internos, trabajos de manufacturación y
+planificación de servicios. Para los trabajos de servicios, los Time Sheets (hojas de tiempo) pueden ser creadas
+para facturar a los clientes, en caso que el proceso de facturación se haga basado en tiempo y dinero de tareas.
+
+### Temas
+
+{index}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/es/projects/index.txt b/erpnext/docs/user/manual/es/projects/index.txt
new file mode 100644
index 00000000000..716ec1fe3aa
--- /dev/null
+++ b/erpnext/docs/user/manual/es/projects/index.txt
@@ -0,0 +1,7 @@
+tasks
+project
+time-log-batch
+activity-type
+activity-cost
+articles
+timesheet
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/es/projects/project.md b/erpnext/docs/user/manual/es/projects/project.md
new file mode 100644
index 00000000000..942433b47b0
--- /dev/null
+++ b/erpnext/docs/user/manual/es/projects/project.md
@@ -0,0 +1,110 @@
+# Proyecto
+
+El manejo de proyectos en ERPNext se hace a traves de tareas. Puedes crear un proyecto y asignar varias tareas al mismo.
+
+
+
+También puedes hacer el seguimiento del % completado del proyecto usando diferentes métodos.
+
+ 1. Tareas Completadas
+ 2. Progreso de tareas
+ 3. Peso de tarea
+
+
+
+Algunos ejemplos de como el % completado es cálculado basado en tareas.
+
+
+
+
+
+### Manejando tareas
+
+Los proyecto pueden ser divididos en multiples tareas.
+Las tareas pueden ser creadas a traves del documento de Proyecto o pueden ser creadas via [Tarea](/docs/user/manual/en/projects/tasks.html)
+
+
+
+* Para ver las tareas creadas a un proyecto click en 'Tasks'
+
+
+
+
+
+* También puedes ver las tareas desde la misma vista del proyecto.
+
+
+
+* Para agregar peso a las tareas puedes seguir los pasos siguientes
+
+
+
+
+
+### Manejando tiempo
+
+ERPNext usa [Time Log](/docs/user/manual/en/projects/time-log.html) para hacer el seguimiento del progreso de un Proyecto.
+Puedes crear registros de tiempo sobre cada Tarea.
+El tiempo actual de inicio y finalización junto con el costo deben ser actualizados basados en los Registros de Tiempo.
+
+* Para ver los Registros de Tiempo realizados a un proyecto, dar click en 'Time Logs'
+
+
+
+
+
+* Puedes agregar un registro de tiempo directamente y luego asociarlo con el proyecto.
+
+
+
+### Gestión de gastos
+
+Puede reservar la [Reclamación de gastos](/docs/user/manual/en/human-resources/expense-claim.html) contra una tarea de proyecto.
+El sistema actualizará el monto total de las reclamaciones de gastos en la sección de costos del proyecto.
+
+* Para ver las reclamaciones de gastos realizadas en un proyecto, haga clic en 'Reclamaciones de gastos'
+
+
+
+* También puede crear un Reclamo de gastos directamente y vincularlo al Proyecto.
+
+
+
+* El monto total de los Reclamos de gastos reservados contra un proyecto se muestra en 'Reclamo de gastos totales' en la Sección de Costos del proyecto
+
+
+
+### Centro de Costo
+
+Puedes crear un [Cost Center](/docs/user/manual/en/accounts/setup/cost-center.html) sobre un proyecto o usar un centro de costo existente para hacer el seguimiento de todos los gastos realizados al proyecto.
+
+
+
+###Costeo del proyecto
+
+La sección Costeo del proyecto le ayuda a rastrear el tiempo y los gastos incurridos en relación con el proyecto.
+
+
+
+* La sección de cálculo de costos se actualiza según los registros de tiempo realizados.
+
+* El margen bruto es la diferencia entre el monto total de costos y el monto total de facturación
+
+###Facturación
+
+Puedes crear/enlazar una [Sales Order](/docs/user/manual/en/selling/sales-order.html) a un proyecto. Una vez asociada puedes usar el módulo de ventas para facturar a un cliente sobre el proyecto.
+
+
+
+###Gantt Chart
+
+Un Gantt Chart muestra la planificación del proyecto.
+ERPNext te provee con una vista para visualizar las tareas de forma calendarizada usando un Gantt Chart (Hoja de Gantt).
+
+* Para visualizar el gantt chart de un proyecto, ve hasta el proyecto y dar click en 'Gantt Chart'
+
+
+
+
+
+{next}
diff --git a/erpnext/docs/user/manual/es/projects/tasks.md b/erpnext/docs/user/manual/es/projects/tasks.md
new file mode 100644
index 00000000000..b07b305b7ac
--- /dev/null
+++ b/erpnext/docs/user/manual/es/projects/tasks.md
@@ -0,0 +1,61 @@
+# Tareas
+
+Proyecto es dividido en Tareas.
+En ERPNext, puedes crear las tareas de forma independiente.
+
+
+
+### Estado de una Tarea
+
+Una tarea puede tener uno de los siguientes estados - Abierto, Trabajando, Pendiente de Revisión, Cerrado, o Cancelado.
+
+
+
+* Por defecto, cada nueva tarea creada se le establece el estado 'Abierto'.
+
+* Si un registro de tiempo es realizado sobre una tarea, su estado es asignado a 'Working'.
+
+### Tarea Dependiente
+
+Puedes especificar una lista de tareas dependientes en la sección 'Depende de'
+
+
+
+* No puedes cerrar una tarea padre hasta que todas las tareas dependientes esten cerradas.
+
+* Si una tarea dependiente se encuentra en retraso y se sobrepone con la fecha esperada de inicio de la tarea padre, el sistema va a re calandarizar la tarea padre.
+
+### Manejando el tiempo
+
+ERPNext usa [Time Log](/docs/user/manual/en/projects/time-log.html) para seguir el progreso de una tarea.
+Puedes crear varios registros de tiempo para cada tarea.
+El tiempo de inicio y fin actual junto con el costo es actualizado en base al Registro de Tiempo.
+
+* Para ver el Registro de tiempo realizado a una tarea, dar click en 'Time Logs'
+
+
+
+
+
+* Puedes también crear un Registro de Tiempo directamente y luego asociarlo a una Tarea.
+
+
+
+### Gestión de gastos
+
+Puede reservar la [Reclamación de gastos](/docs/user/manual/en/human-resources/expense-claim.html) contra una tarea de proyecto.
+El sistema actualizará el monto total de las reclamaciones de gastos en la sección de costos del proyecto.
+
+* Para ver las reclamaciones de gastos realizadas en un proyecto, haga clic en 'Reclamaciones de gastos'
+
+
+
+* También puede crear un Reclamo de gastos directamente y vincularlo al Proyecto.
+
+
+
+* El monto total de los Reclamos de gastos reservados contra un proyecto se muestra en 'Reclamo de gastos totales' en la Sección de Costos del proyecto
+
+
+
+{next}
diff --git a/erpnext/docs/user/manual/es/projects/time-log-batch.md b/erpnext/docs/user/manual/es/projects/time-log-batch.md
new file mode 100644
index 00000000000..72c77b4ff82
--- /dev/null
+++ b/erpnext/docs/user/manual/es/projects/time-log-batch.md
@@ -0,0 +1,25 @@
+# Lote de registro de tiempo
+
+Puede facturar Registros de tiempo viéndolos juntos. Esto le da la flexibilidad de administrar la facturación de su cliente de la manera que desee. Para crear una nueva hoja de tiempo, ve a
+
+> Projects > Time Sheet > New Time Sheet
+
+O
+
+Simplemente abra su lista de registro de tiempo y marque los elementos que desea agregar al registro de tiempo. A continuación, haga clic en el botón "Crear hoja de tiempo" y se seleccionarán estos registros de tiempo.
+
+
+
+###Creando Factura de Venta
+
+* Despues de crear la Hoja de Tiempo/Horario, el botón "Crear Factura" debe aparecer.
+
+
+
+* Haga clic en ese botón para hacer una factura de venta usando la hoja de tiempo.
+
+
+
+* Cuando "Presente" la Factura de Ventas, el número de Factura de Ventas se actualizará en los Registros de Tiempo y la Hoja de Horario y su estado cambiará a "Facturado".
+
+{next}
\ No newline at end of file
diff --git a/erpnext/domains/__init__.py b/erpnext/domains/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/erpnext/domains/distribution.py b/erpnext/domains/distribution.py
new file mode 100644
index 00000000000..020ab3b83b1
--- /dev/null
+++ b/erpnext/domains/distribution.py
@@ -0,0 +1,18 @@
+data = {
+ 'desktop_icons': [
+ 'Item',
+ 'Customer',
+ 'Supplier',
+ 'Lead',
+ 'Sales Order',
+ 'Purchase Order',
+ 'Task',
+ 'Sales Invoice',
+ 'CRM',
+ 'ToDo'
+ ],
+ 'set_value': [
+ ['Stock Settings', None, 'show_barcode_field', 1]
+ ],
+ 'default_portal_role': 'Customer'
+}
diff --git a/erpnext/domains/education.py b/erpnext/domains/education.py
new file mode 100644
index 00000000000..7a86c764c81
--- /dev/null
+++ b/erpnext/domains/education.py
@@ -0,0 +1,37 @@
+data = {
+ 'desktop_icons': [
+ 'Student',
+ 'Program',
+ 'Course',
+ 'Student Group',
+ 'Instructor',
+ 'Fees',
+ 'Task',
+ 'ToDo',
+ 'Schools'
+ ],
+ 'default_portal_role': 'Student',
+ 'restricted_roles': [
+ 'Student',
+ 'Instructor',
+ 'Academics User'
+ ],
+ 'modules': [
+ 'Schools'
+ ],
+ 'fixtures': [
+ dict(doctype='Academic Year', academic_year_name='2013-14'),
+ dict(doctype='Academic Year', academic_year_name='2014-15'),
+ dict(doctype='Academic Year', academic_year_name='2015-16'),
+ dict(doctype='Academic Year', academic_year_name='2016-17'),
+ dict(doctype='Academic Year', academic_year_name='2017-18'),
+ dict(doctype='Academic Year', academic_year_name='2018-19'),
+ dict(doctype='Academic Year', academic_year_name='2019-20'),
+ dict(doctype='Academic Term', academic_year='2016-17', term_name='Semester 1'),
+ dict(doctype='Academic Term', academic_year='2016-17', term_name='Semester 2'),
+ dict(doctype='Academic Term', academic_year='2016-17', term_name='Semester 3'),
+ dict(doctype='Academic Term', academic_year='2017-18', term_name='Semester 1'),
+ dict(doctype='Academic Term', academic_year='2017-18', term_name='Semester 2'),
+ dict(doctype='Academic Term', academic_year='2017-18', term_name='Semester 3')
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/domains/healthcare.py b/erpnext/domains/healthcare.py
new file mode 100644
index 00000000000..3c54b01d424
--- /dev/null
+++ b/erpnext/domains/healthcare.py
@@ -0,0 +1,29 @@
+data = {
+ 'desktop_icons': [
+ 'Patient',
+ 'Patient Appointment',
+ 'Consultation',
+ 'Lab Test',
+ 'Healthcare',
+ 'Accounts',
+ 'Buying',
+ 'Stock',
+ 'HR',
+ 'ToDo'
+ ],
+ 'default_portal_role': 'Patient',
+ 'restricted_roles': [
+ 'Healthcare Administrator',
+ 'LabTest Approver',
+ 'Laboratory User',
+ 'Nursing User',
+ 'Physician',
+ 'Patient'
+ ],
+ 'custom_fields': {
+ 'Sales Invoice': dict(fieldname='appointment', label='Patient Appointment',
+ fieldtype='Link', options='Patient Appointment',
+ insert_after='customer')
+ },
+ 'on_setup': 'erpnext.healthcare.setup.setup_healthcare'
+}
\ No newline at end of file
diff --git a/erpnext/domains/hospitality.py b/erpnext/domains/hospitality.py
new file mode 100644
index 00000000000..bc55d9c47a6
--- /dev/null
+++ b/erpnext/domains/hospitality.py
@@ -0,0 +1,32 @@
+data = {
+ 'desktop_icons': [
+ 'Restaurant',
+ 'Accounts',
+ 'Buying',
+ 'Stock',
+ 'HR',
+ 'Project',
+ 'ToDo'
+ ],
+ 'restricted_roles': [
+ 'Restaurant Manager'
+ ],
+ 'custom_fields': {
+ 'Sales Invoice': [
+ {
+ 'fieldname': 'restaurant', 'fieldtype': 'Link', 'options': 'Restaurant',
+ 'insert_after': 'customer_name', 'label': 'Restaurant',
+ },
+ {
+ 'fieldname': 'restaurant_table', 'fieldtype': 'Link', 'options': 'Restaurant Table',
+ 'insert_after': 'restaurant', 'label': 'Restaurant Table',
+ }
+ ],
+ 'Price List': [
+ {
+ 'fieldname':'restaurant_menu', 'fieldtype':'Link', 'options':'Restaurant Menu', 'label':'Restaurant Menu',
+ 'insert_after':'currency'
+ }
+ ]
+ }
+}
diff --git a/erpnext/domains/manufacturing.py b/erpnext/domains/manufacturing.py
new file mode 100644
index 00000000000..b8bb7e05783
--- /dev/null
+++ b/erpnext/domains/manufacturing.py
@@ -0,0 +1,25 @@
+data = {
+ 'desktop_icons': [
+ 'Item',
+ 'BOM',
+ 'Customer',
+ 'Supplier',
+ 'Sales Order',
+ 'Purchase Order',
+ 'Production Order',
+ 'Task',
+ 'Accounts',
+ 'HR',
+ 'ToDo'
+ ],
+ 'properties': [
+ {'doctype': 'Item', 'fieldname': 'manufacturing', 'property': 'collapsible_depends_on', 'value': 'is_stock_item'},
+ ],
+ 'set_value': [
+ ['Stock Settings', None, 'show_barcode_field', 1]
+ ],
+ 'restricted_roles': [
+ 'Manufacturing User'
+ ],
+ 'default_portal_role': 'Customer'
+}
\ No newline at end of file
diff --git a/erpnext/domains/retail.py b/erpnext/domains/retail.py
new file mode 100644
index 00000000000..1bfd65faf82
--- /dev/null
+++ b/erpnext/domains/retail.py
@@ -0,0 +1,20 @@
+data = {
+ 'desktop_icons': [
+ 'POS',
+ 'Item',
+ 'Customer',
+ 'Sales Invoice',
+ 'Purchase Order',
+ 'Accounts',
+ 'Task',
+ 'ToDo'
+ ],
+ 'properties': [
+ {'doctype': 'Item', 'fieldname': 'manufacturing', 'property': 'hidden', 'value': 1},
+ {'doctype': 'Customer', 'fieldname': 'credit_limit_section', 'property': 'hidden', 'value': 1},
+ ],
+ 'set_value': [
+ ['Stock Settings', None, 'show_barcode_field', 1]
+ ],
+ 'default_portal_role': 'Customer'
+}
diff --git a/erpnext/domains/services.py b/erpnext/domains/services.py
new file mode 100644
index 00000000000..1fb0e19edd2
--- /dev/null
+++ b/erpnext/domains/services.py
@@ -0,0 +1,19 @@
+data = {
+ 'desktop_icons': [
+ 'Project',
+ 'Timesheet',
+ 'Customer',
+ 'Sales Order',
+ 'Sales Invoice',
+ 'CRM',
+ 'Task',
+ 'Expense Claim',
+ 'Employee',
+ 'HR',
+ 'ToDo'
+ ],
+ 'set_value': [
+ ['Stock Settings', None, 'show_barcode_field', 0]
+ ],
+ 'default_portal_role': 'Customer'
+}
\ No newline at end of file
diff --git a/erpnext/healthcare/doctype/appointment_type/appointment_type.json b/erpnext/healthcare/doctype/appointment_type/appointment_type.json
index 4b34892ffd3..9d331fa74be 100644
--- a/erpnext/healthcare/doctype/appointment_type/appointment_type.json
+++ b/erpnext/healthcare/doctype/appointment_type/appointment_type.json
@@ -22,7 +22,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -62,11 +62,11 @@
"no_copy": 0,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -83,7 +83,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 13:46:57.142289",
+ "modified": "2017-10-05 11:07:26.369657",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Appointment Type",
diff --git a/erpnext/healthcare/doctype/codification_table/codification_table.json b/erpnext/healthcare/doctype/codification_table/codification_table.json
index c4117782ffd..7818a42ac5e 100644
--- a/erpnext/healthcare/doctype/codification_table/codification_table.json
+++ b/erpnext/healthcare/doctype/codification_table/codification_table.json
@@ -21,7 +21,7 @@
"fieldname": "medical_code",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -53,7 +53,7 @@
"fieldtype": "Read Only",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -84,7 +84,7 @@
"fieldtype": "Read Only",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -116,7 +116,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-08-31 14:06:50.281545",
+ "modified": "2017-10-04 17:07:22.880451",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Codification Table",
diff --git a/erpnext/healthcare/doctype/complaint/complaint.json b/erpnext/healthcare/doctype/complaint/complaint.json
index 0899a399715..f600838b654 100644
--- a/erpnext/healthcare/doctype/complaint/complaint.json
+++ b/erpnext/healthcare/doctype/complaint/complaint.json
@@ -23,7 +23,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -54,7 +54,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 13:44:31.848346",
+ "modified": "2017-10-05 11:18:42.017864",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Complaint",
diff --git a/erpnext/healthcare/doctype/consultation/consultation.json b/erpnext/healthcare/doctype/consultation/consultation.json
index 70482cba555..400703af614 100644
--- a/erpnext/healthcare/doctype/consultation/consultation.json
+++ b/erpnext/healthcare/doctype/consultation/consultation.json
@@ -63,11 +63,11 @@
"options": "C-",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -83,7 +83,7 @@
"fieldname": "appointment",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -114,7 +114,7 @@
"fieldname": "type",
"fieldtype": "Link",
"hidden": 1,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -122,15 +122,15 @@
"in_standard_filter": 0,
"label": "Type",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Appointment Type",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -145,12 +145,12 @@
"fieldname": "patient",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Patient",
"length": 0,
"no_copy": 0,
@@ -188,11 +188,11 @@
"options": "",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -219,11 +219,11 @@
"options": "\nMale\nFemale",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -243,7 +243,7 @@
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Doctor",
"length": 0,
"no_copy": 0,
@@ -329,12 +329,12 @@
"fieldname": "visit_department",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Department",
"length": 0,
"no_copy": 0,
@@ -347,7 +347,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 0,
"unique": 0
},
@@ -430,7 +430,7 @@
"in_standard_filter": 0,
"label": "Invoice",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Sales Invoice",
"permlevel": 0,
"precision": "",
@@ -493,11 +493,11 @@
"no_copy": 0,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -542,7 +542,7 @@
"fieldname": "symptoms_select",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -550,15 +550,15 @@
"in_standard_filter": 0,
"label": "Complaints",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Complaint",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -574,14 +574,14 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -612,14 +612,14 @@
"in_standard_filter": 0,
"label": "In print",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -665,7 +665,7 @@
"fieldname": "diagnosis_select",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -673,15 +673,15 @@
"in_standard_filter": 0,
"label": "Diagnosis",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Diagnosis",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -698,14 +698,14 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -737,14 +737,14 @@
"in_standard_filter": 0,
"label": "In print",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -943,14 +943,14 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Review Details",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -1004,7 +1004,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 14:24:59.935498",
+ "modified": "2017-10-05 12:13:52.596750",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Consultation",
diff --git a/erpnext/healthcare/doctype/consultation/consultation.py b/erpnext/healthcare/doctype/consultation/consultation.py
index b8155b9b490..e16c22176c7 100755
--- a/erpnext/healthcare/doctype/consultation/consultation.py
+++ b/erpnext/healthcare/doctype/consultation/consultation.py
@@ -78,7 +78,7 @@ def create_invoice(company, patient, physician, consultation_id):
create_invoice_items(physician, sales_invoice, company)
sales_invoice.save(ignore_permissions=True)
- frappe.db.sql(_("""update tabConsultation set invoice='{0}' where name='{1}'""").format(sales_invoice.name, consultation_id))
+ frappe.db.sql("""update tabConsultation set invoice=%s where name=%s""", (sales_invoice.name, consultation_id))
appointment = frappe.db.get_value("Consultation", consultation_id, "appointment")
if appointment:
frappe.db.set_value("Patient Appointment", appointment, "sales_invoice", sales_invoice.name)
diff --git a/erpnext/healthcare/doctype/diagnosis/diagnosis.json b/erpnext/healthcare/doctype/diagnosis/diagnosis.json
index b14ce9491c6..936c2c50a99 100644
--- a/erpnext/healthcare/doctype/diagnosis/diagnosis.json
+++ b/erpnext/healthcare/doctype/diagnosis/diagnosis.json
@@ -23,7 +23,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -54,7 +54,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 13:40:09.731904",
+ "modified": "2017-10-05 11:25:46.107435",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Diagnosis",
diff --git a/erpnext/healthcare/doctype/dosage_form/dosage_form.json b/erpnext/healthcare/doctype/dosage_form/dosage_form.json
index 1de0e937d9f..350aaedcba9 100644
--- a/erpnext/healthcare/doctype/dosage_form/dosage_form.json
+++ b/erpnext/healthcare/doctype/dosage_form/dosage_form.json
@@ -23,7 +23,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -54,7 +54,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 13:40:19.973532",
+ "modified": "2017-10-05 11:24:57.888091",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Dosage Form",
diff --git a/erpnext/healthcare/doctype/drug_prescription/drug_prescription.json b/erpnext/healthcare/doctype/drug_prescription/drug_prescription.json
index c96df228c2c..5647d3c88e9 100644
--- a/erpnext/healthcare/doctype/drug_prescription/drug_prescription.json
+++ b/erpnext/healthcare/doctype/drug_prescription/drug_prescription.json
@@ -21,7 +21,7 @@
"fieldname": "drug_code",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -83,7 +83,7 @@
"fieldname": "dosage",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -114,7 +114,7 @@
"fieldname": "period",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -145,7 +145,7 @@
"fieldname": "dosage_form",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -206,7 +206,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -341,11 +341,11 @@
"no_copy": 0,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -362,7 +362,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-08-31 13:59:48.222282",
+ "modified": "2017-10-04 17:09:54.998517",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Drug Prescription",
diff --git a/erpnext/healthcare/doctype/fee_validity/fee_validity.json b/erpnext/healthcare/doctype/fee_validity/fee_validity.json
index 4bbd20b9bae..595539cd852 100644
--- a/erpnext/healthcare/doctype/fee_validity/fee_validity.json
+++ b/erpnext/healthcare/doctype/fee_validity/fee_validity.json
@@ -39,7 +39,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 0,
"unique": 0
},
@@ -70,7 +70,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 0,
"unique": 0
},
@@ -206,7 +206,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 13:36:52.108407",
+ "modified": "2017-10-05 11:26:35.292841",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Fee Validity",
diff --git a/erpnext/healthcare/doctype/fee_validity/test_fee_validity.py b/erpnext/healthcare/doctype/fee_validity/test_fee_validity.py
index 23458729832..53f82e034cd 100644
--- a/erpnext/healthcare/doctype/fee_validity/test_fee_validity.py
+++ b/erpnext/healthcare/doctype/fee_validity/test_fee_validity.py
@@ -19,13 +19,13 @@ class TestFeeValidity(unittest.TestCase):
patient = frappe.new_doc("Patient")
patient.patient_name = "Test Patient"
patient.sex = "Male"
- patient.save(ignore_permissions = True)
+ patient.save(ignore_permissions=True)
patient = patient.name
if not physician:
physician = frappe.new_doc("Physician")
- physician.first_name= "Amit Jain"
- physician.save(ignore_permissions = True)
+ physician.first_name = "Amit Jain"
+ physician.save(ignore_permissions=True)
physician = physician.name
frappe.db.set_value("Healthcare Settings", None, "max_visit", 2)
@@ -50,5 +50,5 @@ def create_appointment(patient, physician, appointment_date):
appointment.patient = patient
appointment.physician = physician
appointment.appointment_date = appointment_date
- appointment.save(ignore_permissions = True)
+ appointment.save(ignore_permissions=True)
return appointment
diff --git a/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.json b/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.json
index 8681641fde5..7d9f2c78513 100644
--- a/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.json
+++ b/erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.json
@@ -359,7 +359,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -421,7 +421,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -544,7 +544,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -942,7 +942,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -1002,7 +1002,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -1033,7 +1033,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 13:25:48.193218",
+ "modified": "2017-10-05 11:36:44.087182",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Healthcare Settings",
diff --git a/erpnext/healthcare/doctype/healthcare_settings/test_healthcare_settings.py b/erpnext/healthcare/doctype/healthcare_settings/test_healthcare_settings.py
new file mode 100644
index 00000000000..1b620d5f5da
--- /dev/null
+++ b/erpnext/healthcare/doctype/healthcare_settings/test_healthcare_settings.py
@@ -0,0 +1,8 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+import unittest
+
+class TestHealthcareSettings(unittest.TestCase):
+ pass
diff --git a/erpnext/healthcare/doctype/lab_prescription/lab_prescription.json b/erpnext/healthcare/doctype/lab_prescription/lab_prescription.json
index 2d1a8d6b255..cd9943b76da 100644
--- a/erpnext/healthcare/doctype/lab_prescription/lab_prescription.json
+++ b/erpnext/healthcare/doctype/lab_prescription/lab_prescription.json
@@ -20,7 +20,7 @@
"fieldname": "test_code",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -143,7 +143,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -180,14 +180,14 @@
"in_standard_filter": 0,
"label": "Test Created",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -204,7 +204,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-08-31 13:47:22.789095",
+ "modified": "2017-10-04 17:42:32.976165",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Lab Prescription",
diff --git a/erpnext/healthcare/doctype/lab_test/lab_test.json b/erpnext/healthcare/doctype/lab_test/lab_test.json
index 93e40ccb716..8677c82d077 100644
--- a/erpnext/healthcare/doctype/lab_test/lab_test.json
+++ b/erpnext/healthcare/doctype/lab_test/lab_test.json
@@ -38,7 +38,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
@@ -61,7 +61,7 @@
"in_standard_filter": 0,
"label": "Invoice",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Sales Invoice",
"permlevel": 0,
"precision": "",
@@ -84,12 +84,12 @@
"fieldname": "patient",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Patient",
"length": 0,
"no_copy": 0,
@@ -131,7 +131,7 @@
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -161,7 +161,7 @@
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -192,7 +192,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 1,
"search_index": 0,
"set_only_once": 1,
@@ -207,7 +207,7 @@
"fieldname": "physician",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -225,7 +225,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 0,
"unique": 0
},
@@ -253,7 +253,7 @@
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -283,9 +283,9 @@
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 0,
"unique": 0
},
@@ -314,7 +314,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -358,7 +358,7 @@
"fieldname": "department",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -376,7 +376,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 0,
"unique": 0
},
@@ -405,9 +405,9 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 0,
"unique": 0
},
@@ -435,7 +435,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -465,7 +465,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -480,7 +480,7 @@
"fieldname": "sample",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -496,7 +496,7 @@
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -551,7 +551,7 @@
"in_standard_filter": 0,
"label": "Lab Technician",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Employee",
"permlevel": 0,
"precision": "",
@@ -559,7 +559,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -582,7 +582,7 @@
"in_standard_filter": 0,
"label": "Technician Name",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "employee.employee_name",
"permlevel": 0,
"precision": "",
@@ -590,7 +590,7 @@
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -613,7 +613,7 @@
"in_standard_filter": 0,
"label": "Designation",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "employee.designation",
"permlevel": 0,
"precision": "",
@@ -621,7 +621,7 @@
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -644,7 +644,7 @@
"in_standard_filter": 0,
"label": "User",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "User",
"permlevel": 0,
"precision": "",
@@ -652,7 +652,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -682,7 +682,7 @@
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -731,7 +731,7 @@
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Test Name",
"length": 0,
"no_copy": 1,
@@ -741,9 +741,9 @@
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 0,
"unique": 0
},
@@ -785,7 +785,7 @@
"fieldname": "template",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -801,7 +801,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 1,
"search_index": 0,
"set_only_once": 1,
@@ -832,7 +832,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -950,7 +950,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -1009,7 +1009,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -1054,7 +1054,7 @@
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -1114,7 +1114,7 @@
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -1158,7 +1158,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -1189,7 +1189,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -1219,7 +1219,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -1249,7 +1249,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -1279,7 +1279,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -1309,7 +1309,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -1339,7 +1339,7 @@
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -1362,7 +1362,7 @@
"in_standard_filter": 0,
"label": "Prescription",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Lab Prescription",
"permlevel": 0,
"precision": "",
@@ -1370,7 +1370,7 @@
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -1388,7 +1388,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 13:52:14.180774",
+ "modified": "2017-10-05 12:14:57.078823",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Lab Test",
diff --git a/erpnext/healthcare/doctype/lab_test/lab_test.py b/erpnext/healthcare/doctype/lab_test/lab_test.py
index 0daf9cba73d..6fd9535ecc3 100644
--- a/erpnext/healthcare/doctype/lab_test/lab_test.py
+++ b/erpnext/healthcare/doctype/lab_test/lab_test.py
@@ -291,5 +291,5 @@ def create_invoice(company, patient, lab_tests, prescriptions):
@frappe.whitelist()
def get_lab_test_prescribed(patient):
- return frappe.db.sql(_("""select cp.name, cp.test_code, cp.parent, cp.invoice, ct.physician, ct.consultation_date from tabConsultation ct,
- `tabLab Prescription` cp where ct.patient='{0}' and cp.parent=ct.name and cp.test_created=0""").format(patient))
+ return frappe.db.sql("""select cp.name, cp.test_code, cp.parent, cp.invoice, ct.physician, ct.consultation_date from tabConsultation ct,
+ `tabLab Prescription` cp where ct.patient=%s and cp.parent=ct.name and cp.test_created=0""", (patient))
diff --git a/erpnext/healthcare/doctype/lab_test_groups/lab_test_groups.json b/erpnext/healthcare/doctype/lab_test_groups/lab_test_groups.json
index d5607f05616..86be5443590 100644
--- a/erpnext/healthcare/doctype/lab_test_groups/lab_test_groups.json
+++ b/erpnext/healthcare/doctype/lab_test_groups/lab_test_groups.json
@@ -34,11 +34,11 @@
"options": "Add Test\nAdd new line",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -54,7 +54,7 @@
"fieldname": "test_template",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -97,11 +97,11 @@
"options": "test_template.test_rate",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -117,7 +117,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -149,7 +149,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -179,7 +179,7 @@
"fieldname": "group_test_uom",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -212,7 +212,7 @@
"fieldtype": "Long Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -272,7 +272,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-08-31 14:07:35.188661",
+ "modified": "2017-10-04 16:55:45.081003",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Lab Test Groups",
diff --git a/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json b/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json
index 9e692d5418f..091e2f9a1ad 100644
--- a/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json
+++ b/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json
@@ -26,7 +26,7 @@
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Test Name",
"length": 0,
"no_copy": 1,
@@ -69,7 +69,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 0,
"unique": 0
},
@@ -113,12 +113,12 @@
"fieldname": "test_group",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Item Group",
"length": 0,
"no_copy": 0,
@@ -131,7 +131,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 0,
"unique": 0
},
@@ -144,12 +144,12 @@
"fieldname": "department",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Department",
"length": 0,
"no_copy": 0,
@@ -211,7 +211,7 @@
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Result Format",
"length": 0,
"no_copy": 0,
@@ -257,7 +257,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 0,
"unique": 0
},
@@ -334,7 +334,7 @@
"fieldname": "test_uom",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -366,7 +366,7 @@
"fieldtype": "Long Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -670,7 +670,7 @@
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -729,7 +729,7 @@
"fieldname": "sample",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -823,7 +823,7 @@
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -861,14 +861,14 @@
"in_standard_filter": 0,
"label": "Change In Item",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -895,11 +895,11 @@
"no_copy": 0,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -916,7 +916,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 13:45:27.655822",
+ "modified": "2017-10-05 12:12:11.918652",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Lab Test Template",
diff --git a/erpnext/healthcare/doctype/lab_test_uom/lab_test_uom.json b/erpnext/healthcare/doctype/lab_test_uom/lab_test_uom.json
index daa533dfa6f..fab88e2268d 100644
--- a/erpnext/healthcare/doctype/lab_test_uom/lab_test_uom.json
+++ b/erpnext/healthcare/doctype/lab_test_uom/lab_test_uom.json
@@ -22,7 +22,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -52,7 +52,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -83,7 +83,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 13:41:40.186676",
+ "modified": "2017-10-05 11:24:15.687464",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Lab Test UOM",
diff --git a/erpnext/healthcare/doctype/medical_code/medical_code.json b/erpnext/healthcare/doctype/medical_code/medical_code.json
index 71a2278b071..a2e72475179 100644
--- a/erpnext/healthcare/doctype/medical_code/medical_code.json
+++ b/erpnext/healthcare/doctype/medical_code/medical_code.json
@@ -21,7 +21,7 @@
"fieldname": "medical_code_standard",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -53,7 +53,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -83,7 +83,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -114,7 +114,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 14:01:18.817484",
+ "modified": "2017-10-04 17:08:11.053418",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Medical Code",
diff --git a/erpnext/healthcare/doctype/normal_test_items/normal_test_items.json b/erpnext/healthcare/doctype/normal_test_items/normal_test_items.json
index 9e754a74dc0..f53f001569f 100644
--- a/erpnext/healthcare/doctype/normal_test_items/normal_test_items.json
+++ b/erpnext/healthcare/doctype/normal_test_items/normal_test_items.json
@@ -21,7 +21,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -51,7 +51,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -82,7 +82,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -142,7 +142,7 @@
"fieldtype": "Long Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -182,11 +182,11 @@
"no_copy": 0,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -217,7 +217,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -248,7 +248,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -265,7 +265,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-08-31 13:59:33.202695",
+ "modified": "2017-10-04 17:13:06.376928",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Normal Test Items",
diff --git a/erpnext/healthcare/doctype/normal_test_template/normal_test_template.json b/erpnext/healthcare/doctype/normal_test_template/normal_test_template.json
index ef5abd5652b..265c1163b75 100644
--- a/erpnext/healthcare/doctype/normal_test_template/normal_test_template.json
+++ b/erpnext/healthcare/doctype/normal_test_template/normal_test_template.json
@@ -21,7 +21,7 @@
"fieldtype": "Heading",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -51,7 +51,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -80,7 +80,7 @@
"fieldname": "test_uom",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -112,7 +112,7 @@
"fieldtype": "Long Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -172,7 +172,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-08-31 14:07:11.277187",
+ "modified": "2017-10-04 16:58:43.990804",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Normal Test Template",
diff --git a/erpnext/healthcare/doctype/patient/patient.json b/erpnext/healthcare/doctype/patient/patient.json
index f5ce458f7d8..6f9f2fc5e92 100644
--- a/erpnext/healthcare/doctype/patient/patient.json
+++ b/erpnext/healthcare/doctype/patient/patient.json
@@ -67,11 +67,11 @@
"options": "PID-",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -91,7 +91,7 @@
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Full Name",
"length": 0,
"no_copy": 1,
@@ -217,14 +217,14 @@
"in_standard_filter": 0,
"label": "Age",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -248,7 +248,7 @@
"in_standard_filter": 0,
"label": "Status",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Active\nDormant\nOpen",
"permlevel": 0,
"precision": "",
@@ -256,7 +256,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -279,14 +279,14 @@
"in_standard_filter": 0,
"label": "Image",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -331,7 +331,7 @@
"fieldname": "customer",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -374,11 +374,11 @@
"options": "Company",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -429,7 +429,7 @@
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Mobile",
"length": 0,
"no_copy": 0,
@@ -459,7 +459,7 @@
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Email",
"length": 0,
"no_copy": 0,
@@ -524,14 +524,14 @@
"in_standard_filter": 0,
"label": "Disabled",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
- "read_only": 1,
+ "read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -638,14 +638,14 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Allergies",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -668,7 +668,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -727,7 +727,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -757,7 +757,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -817,11 +817,11 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Occupation",
"length": 0,
"no_copy": 0,
@@ -937,7 +937,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -967,7 +967,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -997,7 +997,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -1026,7 +1026,7 @@
"fieldname": "alcohol_current_use",
"fieldtype": "Data",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -1086,7 +1086,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -1116,7 +1116,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -1180,7 +1180,7 @@
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -1240,7 +1240,7 @@
"fieldtype": "Link",
"hidden": 1,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -1251,7 +1251,7 @@
"options": "Currency",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
@@ -1274,7 +1274,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 50,
- "modified": "2017-08-31 13:50:25.474398",
+ "modified": "2017-10-04 17:41:03.219934",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Patient",
diff --git a/erpnext/healthcare/doctype/patient/patient.py b/erpnext/healthcare/doctype/patient/patient.py
index 98526cc027e..f4d9a43ea3a 100644
--- a/erpnext/healthcare/doctype/patient/patient.py
+++ b/erpnext/healthcare/doctype/patient/patient.py
@@ -111,10 +111,10 @@ def make_invoice(patient, company):
@frappe.whitelist()
def get_patient_detail(patient, company=None):
- patient_dict = frappe.db.sql(_("""select * from tabPatient where name='{0}'""").format(patient), as_dict=1)
+ patient_dict = frappe.db.sql("""select * from tabPatient where name=%s""", (patient), as_dict=1)
if not patient_dict:
frappe.throw("Patient not found")
- vital_sign = frappe.db.sql(_("""select * from `tabVital Signs` where patient='{0}' order by signs_date desc limit 1""").format(patient), as_dict=1)
+ vital_sign = frappe.db.sql("""select * from `tabVital Signs` where patient=%s order by signs_date desc limit 1""", (patient), as_dict=1)
details = patient_dict[0]
if vital_sign:
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
index 86b18842cb6..1942b66f7b0 100644
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
@@ -30,6 +30,14 @@ frappe.ui.form.on('Patient Appointment', {
frm.add_custom_button(__('Cancel'), function() {
btn_update_status(frm, "Cancelled");
});
+
+ frm.add_custom_button(__("Consultation"),function(){
+ btn_create_consultation(frm);
+ },"Create");
+
+ frm.add_custom_button(__('Vital Signs'), function() {
+ btn_create_vital_signs(frm);
+ },"Create");
}
if(frm.doc.status == "Pending"){
frm.add_custom_button(__('Set Open'), function() {
@@ -40,14 +48,6 @@ frappe.ui.form.on('Patient Appointment', {
});
}
- frm.add_custom_button(__("Consultation"),function(){
- btn_create_consultation(frm);
- },"Create");
-
- frm.add_custom_button(__('Vital Signs'), function() {
- btn_create_vital_signs(frm);
- },"Create");
-
if(!frm.doc.__islocal){
if(frm.doc.sales_invoice && frappe.user.has_role("Accounts User")){
frm.add_custom_button(__('Invoice'), function() {
@@ -183,16 +183,20 @@ var btn_create_vital_signs = function (frm) {
var btn_update_status = function(frm, status){
var doc = frm.doc;
- frappe.call({
- method:
- "erpnext.healthcare.doctype.patient_appointment.patient_appointment.update_status",
- args: {appointmentId: doc.name, status:status},
- callback: function(data){
- if(!data.exc){
- cur_frm.reload_doc();
- }
+ frappe.confirm(__('Are you sure you want to cancel this appointment?'),
+ function() {
+ frappe.call({
+ method:
+ "erpnext.healthcare.doctype.patient_appointment.patient_appointment.update_status",
+ args: {appointment_id: doc.name, status:status},
+ callback: function(data){
+ if(!data.exc){
+ frm.reload_doc();
+ }
+ }
+ });
}
- });
+ );
};
var btn_invoice_consultation = function(frm){
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.json b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.json
index 9520e7766bd..1663c5b64f3 100644
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.json
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.json
@@ -22,12 +22,12 @@
"fieldname": "patient",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Patient",
"length": 0,
"no_copy": 0,
@@ -53,12 +53,12 @@
"fieldname": "physician",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Physician",
"length": 0,
"no_copy": 0,
@@ -89,7 +89,7 @@
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Date",
"length": 0,
"no_copy": 0,
@@ -101,7 +101,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 1,
"unique": 0
},
@@ -206,7 +206,7 @@
"fieldname": "appointment_type",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -234,6 +234,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "depends_on": "eval:!doc.__islocal",
"fieldname": "section_break_1",
"fieldtype": "Section Break",
"hidden": 0,
@@ -338,11 +339,11 @@
"no_copy": 0,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 1,
"set_only_once": 0,
@@ -386,12 +387,12 @@
"fieldname": "department",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Department",
"length": 0,
"no_copy": 0,
@@ -404,7 +405,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 1,
"unique": 0
},
@@ -435,7 +436,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 0,
"unique": 0
},
@@ -546,15 +547,15 @@
"in_standard_filter": 0,
"label": "Gender",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "patient.sex",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -608,15 +609,15 @@
"in_standard_filter": 0,
"label": "Company",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Company",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -662,7 +663,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -691,7 +692,7 @@
"fieldname": "referring_physician",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -734,11 +735,11 @@
"no_copy": 0,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -755,7 +756,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 13:27:39.208298",
+ "modified": "2017-10-25 23:33:36.060803",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Patient Appointment",
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
index eab2f2d004f..4379986ddcb 100755
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
@@ -6,66 +6,100 @@ from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
import json
-from frappe.utils import getdate
+from frappe.utils import getdate, cint
from frappe import _
import datetime
from frappe.core.doctype.sms_settings.sms_settings import send_sms
from erpnext.healthcare.doctype.healthcare_settings.healthcare_settings import get_receivable_account,get_income_account
+
class PatientAppointment(Document):
def on_update(self):
today = datetime.date.today()
appointment_date = getdate(self.appointment_date)
- #If appointment created for today set as open
- if(today == appointment_date):
- frappe.db.set_value("Patient Appointment",self.name,"status","Open")
+
+ # If appointment created for today set as open
+ if today == appointment_date:
+ frappe.db.set_value("Patient Appointment", self.name, "status", "Open")
self.reload()
def after_insert(self):
- #Check fee validity exists
+ # Check fee validity exists
appointment = self
validity_exist = validity_exists(appointment.physician, appointment.patient)
- if validity_exist :
- fee_validity = frappe.get_doc("Fee Validity",validity_exist[0][0])
- #Check if the validity is valid
+ if validity_exist:
+ fee_validity = frappe.get_doc("Fee Validity", validity_exist[0][0])
+
+ # Check if the validity is valid
appointment_date = getdate(appointment.appointment_date)
- if((fee_validity.valid_till >= appointment_date) and (fee_validity.visited < fee_validity.max_visit)):
+ if (fee_validity.valid_till >= appointment_date) and (fee_validity.visited < fee_validity.max_visit):
visited = fee_validity.visited + 1
- frappe.db.set_value("Fee Validity",fee_validity.name,"visited",visited)
- if(fee_validity.ref_invoice):
- frappe.db.set_value("Patient Appointment",appointment.name,"sales_invoice",fee_validity.ref_invoice)
+ frappe.db.set_value("Fee Validity", fee_validity.name, "visited", visited)
+ if fee_validity.ref_invoice:
+ frappe.db.set_value("Patient Appointment", appointment.name, "sales_invoice", fee_validity.ref_invoice)
frappe.msgprint(_("{0} has fee validity till {1}").format(appointment.patient, fee_validity.valid_till))
confirm_sms(self)
-def appointment_cancel(appointmentId):
- appointment = frappe.get_doc("Patient Appointment",appointmentId)
- #If invoice --> fee_validity update with -1 visit
- if (appointment.sales_invoice):
- validity = frappe.db.exists({"doctype": "Fee Validity","ref_invoice": appointment.sales_invoice})
- if(validity):
- fee_validity = frappe.get_doc("Fee Validity",validity[0][0])
- visited = fee_validity.visited - 1
- frappe.db.set_value("Fee Validity",fee_validity.name,"visited",visited)
- if visited <= 0:
- frappe.msgprint(_("Appointment cancelled, Please review and cancel the invoice {0}".format(appointment.sales_invoice)))
- else:
- frappe.msgprint(_("Appointment cancelled"))
+ def save(self, *args, **kwargs):
+ # duration is the only changeable field in the document
+ if not self.is_new():
+ self.db_set('duration', cint(self.duration))
+ else:
+ super(PatientAppointment, self).save(*args, **kwargs)
+
+
+def appointment_cancel(appointment_id):
+ appointment = frappe.get_doc("Patient Appointment", appointment_id)
+
+ # If invoice --> fee_validity update with -1 visit
+ if appointment.sales_invoice:
+ validity = frappe.db.exists({"doctype": "Fee Validity", "ref_invoice": appointment.sales_invoice})
+ if validity:
+ fee_validity = frappe.get_doc("Fee Validity", validity[0][0])
+ visited = fee_validity.visited - 1
+ frappe.db.set_value("Fee Validity", fee_validity.name, "visited", visited)
+ if visited <= 0:
+ frappe.msgprint(
+ _("Appointment cancelled, Please review and cancel the invoice {0}".format(appointment.sales_invoice))
+ )
+ else:
+ frappe.msgprint(_("Appointment cancelled"))
+
@frappe.whitelist()
def get_availability_data(date, physician):
- # get availability data of 'physician' on 'date'
+ """
+ Get availability data of 'physician' on 'date'
+ :param date: Date to check in schedule
+ :param physician: Name of the physician
+ :return: dict containing a list of available slots, list of appointments and time of appointments
+ """
+
date = getdate(date)
weekday = date.strftime("%A")
available_slots = []
+ physician_schedule_name = None
+ physician_schedule = None
+ time_per_appointment = None
+
# get physicians schedule
physician_schedule_name = frappe.db.get_value("Physician", physician, "physician_schedule")
- physician_schedule = frappe.get_doc("Physician Schedule", physician_schedule_name)
- time_per_appointment = frappe.db.get_value("Physician", physician, "time_per_appointment")
+ if physician_schedule_name:
+ physician_schedule = frappe.get_doc("Physician Schedule", physician_schedule_name)
+ time_per_appointment = frappe.db.get_value("Physician", physician, "time_per_appointment")
+ else:
+ frappe.throw(_("Dr {0} does not have a Physician Schedule. Add it in Physician master".format(physician)))
- for t in physician_schedule.time_slots:
- if weekday == t.day:
- available_slots.append(t)
+ if physician_schedule:
+ for t in physician_schedule.time_slots:
+ if weekday == t.day:
+ available_slots.append(t)
+
+ # `time_per_appointment` should never be None since validation in `Patient` is supposed to prevent
+ # that. However, it isn't impossible so we'll prepare for that.
+ if not time_per_appointment:
+ frappe.throw(_('"Time Per Appointment" hasn"t been set for Dr {0}. Add it in Physician master.').format(physician))
# if physician not available return
if not available_slots:
@@ -89,27 +123,36 @@ def get_availability_data(date, physician):
"time_per_appointment": time_per_appointment
}
+
@frappe.whitelist()
-def update_status(appointmentId, status):
- frappe.db.set_value("Patient Appointment",appointmentId,"status",status)
- if(status=="Cancelled"):
- appointment_cancel(appointmentId)
+def update_status(appointment_id, status):
+ frappe.db.set_value("Patient Appointment", appointment_id, "status", status)
+ if status == "Cancelled":
+ appointment_cancel(appointment_id)
+
@frappe.whitelist()
def set_open_appointments():
today = getdate()
- frappe.db.sql("""update `tabPatient Appointment` set status='Open' where status = 'Scheduled' and appointment_date = %s""",(today))
+ frappe.db.sql(
+ "update `tabPatient Appointment` set status='Open' where status = 'Scheduled'"
+ " and appointment_date = %s", today)
+
@frappe.whitelist()
def set_pending_appointments():
today = getdate()
- frappe.db.sql("""update `tabPatient Appointment` set status='Pending' where status in ('Scheduled','Open') and appointment_date < %s""",(today))
+ frappe.db.sql(
+ "update `tabPatient Appointment` set status='Pending' where status in "
+ "('Scheduled','Open') and appointment_date < %s", today)
+
def confirm_sms(doc):
- if (frappe.db.get_value("Healthcare Settings", None, "app_con")=='1'):
+ if frappe.db.get_value("Healthcare Settings", None, "app_con") == '1':
message = frappe.db.get_value("Healthcare Settings", None, "app_con_msg")
send_message(doc, message)
+
@frappe.whitelist()
def create_invoice(company, physician, patient, appointment_id, appointment_date):
if not appointment_id:
@@ -125,7 +168,7 @@ def create_invoice(company, physician, patient, appointment_id, appointment_date
create_invoice_items(appointment_id, physician, company, sales_invoice)
sales_invoice.save(ignore_permissions=True)
- frappe.db.sql(_("""update `tabPatient Appointment` set sales_invoice='{0}' where name='{1}'""").format(sales_invoice.name, appointment_id))
+ frappe.db.sql("""update `tabPatient Appointment` set sales_invoice=%s where name=%s""", (sales_invoice.name, appointment_id))
frappe.db.set_value("Fee Validity", fee_validity.name, "ref_invoice", sales_invoice.name)
consultation = frappe.db.exists({
"doctype": "Consultation",
@@ -134,21 +177,24 @@ def create_invoice(company, physician, patient, appointment_id, appointment_date
frappe.db.set_value("Consultation", consultation[0][0], "invoice", sales_invoice.name)
return sales_invoice.name
+
def get_fee_validity(physician, patient, date):
validity_exist = validity_exists(physician, patient)
- if validity_exist :
- fee_validity = frappe.get_doc("Fee Validity",validity_exist[0][0])
+ if validity_exist:
+ fee_validity = frappe.get_doc("Fee Validity", validity_exist[0][0])
fee_validity = update_fee_validity(fee_validity, date)
else:
fee_validity = create_fee_validity(physician, patient, date)
return fee_validity
+
def validity_exists(physician, patient):
return frappe.db.exists({
"doctype": "Fee Validity",
"physician": physician,
"patient": patient})
+
def update_fee_validity(fee_validity, date):
max_visit = frappe.db.get_value("Healthcare Settings", None, "max_visit")
valid_days = frappe.db.get_value("Healthcare Settings", None, "valid_days")
@@ -164,6 +210,7 @@ def update_fee_validity(fee_validity, date):
fee_validity.save(ignore_permissions=True)
return fee_validity
+
def create_fee_validity(physician, patient, date):
fee_validity = frappe.new_doc("Fee Validity")
fee_validity.physician = physician
@@ -171,6 +218,7 @@ def create_fee_validity(physician, patient, date):
fee_validity = update_fee_validity(fee_validity, date)
return fee_validity
+
def create_invoice_items(appointment_id, physician, company, invoice):
item_line = invoice.append("items")
item_line.item_name = "Consulting Charges"
@@ -178,16 +226,17 @@ def create_invoice_items(appointment_id, physician, company, invoice):
item_line.qty = 1
item_line.uom = "Nos"
item_line.conversion_factor = 1
- item_line.income_account = get_income_account(physician,company)
+ item_line.income_account = get_income_account(physician, company)
op_consulting_charge = frappe.db.get_value("Physician", physician, "op_consulting_charge")
if op_consulting_charge:
item_line.rate = op_consulting_charge
item_line.amount = op_consulting_charge
return invoice
+
@frappe.whitelist()
def create_consultation(appointment):
- appointment = frappe.get_doc("Patient Appointment",appointment)
+ appointment = frappe.get_doc("Patient Appointment", appointment)
consultation = frappe.new_doc("Consultation")
consultation.appointment = appointment.name
consultation.patient = appointment.patient
@@ -199,29 +248,37 @@ def create_consultation(appointment):
consultation.invoice = appointment.sales_invoice
return consultation.as_dict()
+
def remind_appointment():
- if (frappe.db.get_value("Healthcare Settings", None, "app_rem")=='1'):
+ if frappe.db.get_value("Healthcare Settings", None, "app_rem") == '1':
rem_before = datetime.datetime.strptime(frappe.get_value("Healthcare Settings", None, "rem_before"), "%H:%M:%S")
- rem_dt = datetime.datetime.now() + datetime.timedelta(hours = rem_before.hour, minutes=rem_before.minute, seconds= rem_before.second)
+ rem_dt = datetime.datetime.now() + datetime.timedelta(
+ hours=rem_before.hour, minutes=rem_before.minute, seconds=rem_before.second)
- appointment_list = frappe.db.sql("select name from `tabPatient Appointment` where start_dt between %s and %s and reminded = 0 ", (datetime.datetime.now(), rem_dt))
+ appointment_list = frappe.db.sql(
+ "select name from `tabPatient Appointment` where start_dt between %s and %s and reminded = 0 ",
+ (datetime.datetime.now(), rem_dt)
+ )
- for i in range (0,len(appointment_list)):
+ for i in range(0, len(appointment_list)):
doc = frappe.get_doc("Patient Appointment", appointment_list[i][0])
message = frappe.db.get_value("Healthcare Settings", None, "app_rem_msg")
send_message(doc, message)
- frappe.db.set_value("Patient Appointment",doc.name,"reminded",1)
+ frappe.db.set_value("Patient Appointment", doc.name, "reminded",1)
+
def send_message(doc, message):
- patient = frappe.get_doc("Patient",doc.patient)
- if(patient.mobile):
+ patient = frappe.get_doc("Patient", doc.patient)
+ if patient.mobile:
context = {"doc": doc, "alert": doc, "comments": None}
if doc.get("_comments"):
context["comments"] = json.loads(doc.get("_comments"))
- #jinja to string convertion happens here
+
+ # jinja to string convertion happens here
message = frappe.render_template(message, context)
number = [patient.mobile]
- send_sms(number,message)
+ send_sms(number, message)
+
@frappe.whitelist()
def get_events(start, end, filters=None):
diff --git a/erpnext/healthcare/doctype/patient_medical_record/patient_medical_record.json b/erpnext/healthcare/doctype/patient_medical_record/patient_medical_record.json
index 06149230e67..9cbcf7b9b75 100644
--- a/erpnext/healthcare/doctype/patient_medical_record/patient_medical_record.json
+++ b/erpnext/healthcare/doctype/patient_medical_record/patient_medical_record.json
@@ -33,11 +33,11 @@
"options": "PMR-",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -52,7 +52,7 @@
"fieldname": "patient",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -171,7 +171,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -212,7 +212,7 @@
"options": "Open\nClose",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
@@ -332,15 +332,15 @@
"in_standard_filter": 0,
"label": "Reference Owner",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "reference_name.owner",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -356,7 +356,7 @@
"fieldname": "user",
"fieldtype": "Link",
"hidden": 1,
- "ignore_user_permissions": 1,
+ "ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -368,11 +368,11 @@
"options": "User",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -389,7 +389,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-09-04 14:29:48.679751",
+ "modified": "2017-10-04 16:09:55.597866",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Patient Medical Record",
diff --git a/erpnext/healthcare/doctype/patient_relation/patient_relation.json b/erpnext/healthcare/doctype/patient_relation/patient_relation.json
index e97e1b24c03..209a3746a6e 100644
--- a/erpnext/healthcare/doctype/patient_relation/patient_relation.json
+++ b/erpnext/healthcare/doctype/patient_relation/patient_relation.json
@@ -39,7 +39,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 0,
"unique": 0
},
@@ -52,7 +52,7 @@
"fieldname": "patient",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -84,7 +84,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -115,7 +115,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-08-31 14:13:37.497114",
+ "modified": "2017-10-04 16:12:45.485333",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Patient Relation",
diff --git a/erpnext/healthcare/doctype/physician/physician.json b/erpnext/healthcare/doctype/physician/physician.json
index 565653b89c0..3edad0b827d 100644
--- a/erpnext/healthcare/doctype/physician/physician.json
+++ b/erpnext/healthcare/doctype/physician/physician.json
@@ -26,7 +26,7 @@
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "First Name",
"length": 0,
"no_copy": 0,
@@ -119,14 +119,14 @@
"in_standard_filter": 0,
"label": "Image",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -203,12 +203,12 @@
"fieldname": "designation",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Designation",
"length": 0,
"no_copy": 0,
@@ -234,12 +234,12 @@
"fieldname": "department",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Department",
"length": 0,
"no_copy": 0,
@@ -444,7 +444,7 @@
"fieldname": "physician_schedule",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -501,6 +501,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "description": "In minutes",
"fieldname": "time_per_appointment",
"fieldtype": "Data",
"hidden": 0,
@@ -633,14 +634,14 @@
"in_standard_filter": 0,
"label": "Address HTML",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -692,14 +693,14 @@
"in_standard_filter": 0,
"label": "Contact HTML",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -783,15 +784,15 @@
"in_standard_filter": 0,
"label": "Default Currency",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Currency",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -809,7 +810,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 13:51:28.975120",
+ "modified": "2017-10-05 16:08:24.624644",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Physician",
diff --git a/erpnext/healthcare/doctype/physician/physician.py b/erpnext/healthcare/doctype/physician/physician.py
index 8680d5d1273..4d035d39f66 100644
--- a/erpnext/healthcare/doctype/physician/physician.py
+++ b/erpnext/healthcare/doctype/physician/physician.py
@@ -20,22 +20,32 @@ class Physician(Document):
[cstr(self.get(f)).strip() for f in ["first_name","middle_name","last_name"]]))
def validate(self):
+ self.validate_schedule_and_time()
validate_party_accounts(self)
+
if self.user_id:
self.validate_for_enabled_user_id()
self.validate_duplicate_user_id()
existing_user_id = frappe.db.get_value("Physician", self.name, "user_id")
- if(self.user_id != existing_user_id):
+ if self.user_id != existing_user_id:
frappe.permissions.remove_user_permission(
"Physician", self.name, existing_user_id)
-
else:
existing_user_id = frappe.db.get_value("Physician", self.name, "user_id")
if existing_user_id:
frappe.permissions.remove_user_permission(
"Physician", self.name, existing_user_id)
+ def validate_schedule_and_time(self):
+ if (self.physician_schedule or self.time_per_appointment) and \
+ not (self.physician_schedule and self.time_per_appointment):
+ frappe.msgprint(
+ _('Both "Physician Schedule" and Time Per Appointment" must be set for Dr {0}').format(
+ self.first_name),
+ title='Error', raise_exception=1, indicator='red'
+ )
+
def on_update(self):
if self.user_id:
frappe.permissions.add_user_permission("Physician", self.name, self.user_id)
diff --git a/erpnext/healthcare/doctype/physician/test_physician.py b/erpnext/healthcare/doctype/physician/test_physician.py
index b6ea92cc720..4bd497a4e99 100644
--- a/erpnext/healthcare/doctype/physician/test_physician.py
+++ b/erpnext/healthcare/doctype/physician/test_physician.py
@@ -3,8 +3,35 @@
# See license.txt
from __future__ import unicode_literals
import unittest
+import frappe
+
+test_dependencies = ['Physician Schedule']
-# test_records = frappe.get_test_records('Physician')
class TestPhysician(unittest.TestCase):
- pass
+ def tearDown(self):
+ frappe.delete_doc_if_exists('Physician', '_Testdoctor2', force=1)
+
+ def test_schedule_and_time(self):
+ physician = frappe.new_doc('Physician')
+ physician.first_name = '_Testdoctor2'
+ physician.physician_schedule = '_Testdoctor2 Schedule'
+
+ self.assertRaises(frappe.ValidationError, physician.insert)
+
+ physician.physician_schedule = ''
+ physician.time_per_appointment = 15
+
+ self.assertRaises(frappe.ValidationError, physician.insert)
+
+ physician.physician_schedule = '_Testdoctor2 Schedule'
+ physician.time_per_appointment = 15
+
+ physician.insert()
+
+ def test_new_physician_without_schedule(self):
+ physician = frappe.new_doc('Physician')
+ physician.first_name = '_Testdoctor2'
+
+ physician.insert()
+ self.assertEqual(frappe.get_value('Physician', '_Testdoctor2', 'first_name'), '_Testdoctor2')
diff --git a/erpnext/healthcare/doctype/physician_schedule/physician_schedule.json b/erpnext/healthcare/doctype/physician_schedule/physician_schedule.json
index bd8e539c539..b1b31290217 100644
--- a/erpnext/healthcare/doctype/physician_schedule/physician_schedule.json
+++ b/erpnext/healthcare/doctype/physician_schedule/physician_schedule.json
@@ -23,7 +23,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -94,11 +94,11 @@
"no_copy": 0,
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -115,7 +115,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 13:42:26.713507",
+ "modified": "2017-10-05 11:21:54.488194",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Physician Schedule",
diff --git a/erpnext/healthcare/doctype/physician_schedule/physician_schedule.py b/erpnext/healthcare/doctype/physician_schedule/physician_schedule.py
index 5cbdd126a91..167e9cd4b82 100644
--- a/erpnext/healthcare/doctype/physician_schedule/physician_schedule.py
+++ b/erpnext/healthcare/doctype/physician_schedule/physician_schedule.py
@@ -5,5 +5,7 @@
from __future__ import unicode_literals
from frappe.model.document import Document
+
class PhysicianSchedule(Document):
- pass
+ def autoname(self):
+ self.name = self.schedule_name
diff --git a/erpnext/healthcare/doctype/physician_schedule/test_records.json b/erpnext/healthcare/doctype/physician_schedule/test_records.json
new file mode 100644
index 00000000000..1e6230dd98d
--- /dev/null
+++ b/erpnext/healthcare/doctype/physician_schedule/test_records.json
@@ -0,0 +1,8 @@
+[
+ {
+ "schedule_name": "_Testdoctor1 Schedule"
+ },
+ {
+ "schedule_name": "_Testdoctor2 Schedule"
+ }
+]
\ No newline at end of file
diff --git a/erpnext/healthcare/doctype/prescription_dosage/prescription_dosage.json b/erpnext/healthcare/doctype/prescription_dosage/prescription_dosage.json
index 9c095061931..9fb0dbc13ca 100644
--- a/erpnext/healthcare/doctype/prescription_dosage/prescription_dosage.json
+++ b/erpnext/healthcare/doctype/prescription_dosage/prescription_dosage.json
@@ -22,7 +22,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -83,7 +83,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 13:42:40.305284",
+ "modified": "2017-10-05 11:20:47.558464",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Prescription Dosage",
diff --git a/erpnext/healthcare/doctype/sample_collection/sample_collection.json b/erpnext/healthcare/doctype/sample_collection/sample_collection.json
index ee2f83f01c7..39788fbd548 100644
--- a/erpnext/healthcare/doctype/sample_collection/sample_collection.json
+++ b/erpnext/healthcare/doctype/sample_collection/sample_collection.json
@@ -85,12 +85,12 @@
"fieldname": "patient",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Patient",
"length": 0,
"no_copy": 0,
@@ -103,7 +103,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
- "search_index": 0,
+ "search_index": 1,
"set_only_once": 0,
"unique": 0
},
@@ -219,11 +219,11 @@
"options": "Company",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -267,12 +267,12 @@
"fieldname": "sample",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Sample",
"length": 0,
"no_copy": 0,
@@ -389,7 +389,7 @@
"fieldname": "collected_by",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -466,7 +466,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -541,7 +541,7 @@
"fieldtype": "Long Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -572,7 +572,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 13:30:29.303026",
+ "modified": "2017-10-05 11:58:46.016097",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Sample Collection",
diff --git a/erpnext/healthcare/doctype/sensitivity/sensitivity.json b/erpnext/healthcare/doctype/sensitivity/sensitivity.json
index 620f37a59aa..eddfda90566 100644
--- a/erpnext/healthcare/doctype/sensitivity/sensitivity.json
+++ b/erpnext/healthcare/doctype/sensitivity/sensitivity.json
@@ -22,7 +22,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -53,7 +53,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-31 13:44:07.147326",
+ "modified": "2017-10-05 11:19:12.110308",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Sensitivity",
diff --git a/erpnext/healthcare/doctype/sensitivity_test_items/sensitivity_test_items.json b/erpnext/healthcare/doctype/sensitivity_test_items/sensitivity_test_items.json
index e656b512792..86f5e26f0a3 100644
--- a/erpnext/healthcare/doctype/sensitivity_test_items/sensitivity_test_items.json
+++ b/erpnext/healthcare/doctype/sensitivity_test_items/sensitivity_test_items.json
@@ -20,7 +20,7 @@
"fieldname": "antibiotic",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -51,7 +51,7 @@
"fieldname": "antibiotic_sensitivity",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
@@ -84,7 +84,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-08-31 13:46:40.609983",
+ "modified": "2017-10-05 11:08:06.327972",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Sensitivity Test Items",
diff --git a/erpnext/healthcare/doctype/special_test_items/special_test_items.json b/erpnext/healthcare/doctype/special_test_items/special_test_items.json
index 89545e9acd1..4c97e41138c 100644
--- a/erpnext/healthcare/doctype/special_test_items/special_test_items.json
+++ b/erpnext/healthcare/doctype/special_test_items/special_test_items.json
@@ -22,7 +22,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -53,7 +53,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -99,7 +99,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -130,7 +130,7 @@
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -147,7 +147,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-08-31 14:12:12.623714",
+ "modified": "2017-10-04 16:15:12.642699",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Special Test Items",
diff --git a/erpnext/healthcare/doctype/special_test_template/special_test_template.json b/erpnext/healthcare/doctype/special_test_template/special_test_template.json
index 83f3cb6fd93..372af0a9594 100644
--- a/erpnext/healthcare/doctype/special_test_template/special_test_template.json
+++ b/erpnext/healthcare/doctype/special_test_template/special_test_template.json
@@ -21,7 +21,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -53,7 +53,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-08-31 14:08:18.833796",
+ "modified": "2017-10-04 16:20:09.565316",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Special Test Template",
diff --git a/erpnext/healthcare/doctype/vital_signs/vital_signs.json b/erpnext/healthcare/doctype/vital_signs/vital_signs.json
index e44af280082..bab80f554e1 100644
--- a/erpnext/healthcare/doctype/vital_signs/vital_signs.json
+++ b/erpnext/healthcare/doctype/vital_signs/vital_signs.json
@@ -21,12 +21,12 @@
"fieldname": "patient",
"fieldtype": "Link",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Patient",
"length": 0,
"no_copy": 0,
@@ -54,21 +54,21 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
+ "in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Appointment",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Patient Appointment",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -85,21 +85,21 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
+ "in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Consultation",
"length": 0,
- "no_copy": 0,
+ "no_copy": 1,
"options": "Consultation",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
- "report_hide": 0,
+ "report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
@@ -266,7 +266,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -297,7 +297,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -328,7 +328,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -387,7 +387,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -418,7 +418,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
@@ -479,7 +479,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -659,7 +659,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
+ "ignore_xss_filter": 1,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
@@ -751,7 +751,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-09-04 14:31:57.851546",
+ "modified": "2017-10-04 16:08:36.340607",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Vital Signs",
diff --git a/erpnext/setup/setup_wizard/healthcare.py b/erpnext/healthcare/setup.py
similarity index 74%
rename from erpnext/setup/setup_wizard/healthcare.py
rename to erpnext/healthcare/setup.py
index ebc644e87b7..69a92b348ba 100644
--- a/erpnext/setup/setup_wizard/healthcare.py
+++ b/erpnext/healthcare/setup.py
@@ -1,10 +1,12 @@
from __future__ import unicode_literals
import frappe
-from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
from frappe import _
def setup_healthcare():
+ if frappe.db.exists('Medical Department', 'Cardiology'):
+ # already setup
+ return
create_medical_departments()
create_antibiotics()
create_test_uom()
@@ -14,63 +16,55 @@ def setup_healthcare():
create_lab_test_items()
create_lab_test_template()
create_sensitivity()
- make_custom_fields()
-
-def make_custom_fields():
- custom_fields = {
- 'Sales Invoice': [
- dict(fieldname='appointment', label='Patient Appointment',
- fieldtype='Link', options='Patient Appointment',
- insert_after='customer')
- ]
- }
-
- create_custom_fields(custom_fields)
-
def create_medical_departments():
- depts = ["Accident and emergency care" ,"Anaesthetics", "Biochemistry", "Cardiology", "Dermatology",
- "Diagnostic imaging", "ENT", "Gastroenterology", "General Surgery", "Gynaecology",
- "Haematology", "Maternity", "Microbiology", "Nephrology", "Neurology", "Oncology",
- "Orthopaedics", "Pathology", "Physiotherapy", "Rheumatology", "Serology", "Urology"]
- for d in depts:
+ departments = [
+ "Accident And Emergency Care" ,"Anaesthetics", "Biochemistry", "Cardiology", "Dermatology",
+ "Diagnostic Imaging", "ENT", "Gastroenterology", "General Surgery", "Gynaecology",
+ "Haematology", "Maternity", "Microbiology", "Nephrology", "Neurology", "Oncology",
+ "Orthopaedics", "Pathology", "Physiotherapy", "Rheumatology", "Serology", "Urology"
+ ]
+ for department in departments:
mediacal_department = frappe.new_doc("Medical Department")
- mediacal_department.department = d
+ mediacal_department.department = _(department)
try:
mediacal_department.save()
except frappe.DuplicateEntryError:
pass
def create_antibiotics():
- abt = ["Amoxicillin", "Ampicillin", "Bacampicillin", "Carbenicillin", "Cloxacillin", "Dicloxacillin",
- "Flucloxacillin", "Mezlocillin", "Nafcillin", "Oxacillin", "Penicillin G", "Penicillin V",
- "Piperacillin", "Pivampicillin", "Pivmecillinam", "Ticarcillin", "Cefacetrile (cephacetrile)",
- "Cefadroxil (cefadroxyl)", "Cefalexin (cephalexin)", "Cefaloglycin (cephaloglycin)",
- "Cefalonium (cephalonium)", "Cefaloridine (cephaloradine)", "Cefalotin (cephalothin)",
- "Cefapirin (cephapirin)", "Cefatrizine", "Cefazaflur", "Cefazedone", "Cefazolin (cephazolin)",
- "Cefradine (cephradine)", "Cefroxadine", "Ceftezole", "Cefaclor", "Cefamandole", "Cefmetazole",
- "Cefonicid", "Cefotetan", "Cefoxitin", "Cefprozil (cefproxil)", "Cefuroxime", "Cefuzonam",
- "Cefcapene", "Cefdaloxime", "Cefdinir", "Cefditoren", "Cefetamet", "Cefixime", "Cefmenoxime",
- "Cefodizime", "Cefotaxime", "Cefpimizole", "Cefpodoxime", "Cefteram", "Ceftibuten", "Ceftiofur",
- "Ceftiolene", "Ceftizoxime", "Ceftriaxone", "Cefoperazone", "Ceftazidime", "Cefclidine", "Cefepime",
- "Cefluprenam", "Cefoselis", "Cefozopran", "Cefpirome", "Cefquinome", "Ceftobiprole", "Ceftaroline",
- "Cefaclomezine","Cefaloram", "Cefaparole", "Cefcanel", "Cefedrolor", "Cefempidone", "Cefetrizole",
- "Cefivitril", "Cefmatilen", "Cefmepidium", "Cefovecin", "Cefoxazole", "Cefrotil", "Cefsumide",
- "Cefuracetime", "Ceftioxide", "Ceftazidime/Avibactam", "Ceftolozane/Tazobactam", "Aztreonam",
- "Imipenem", "Imipenem/cilastatin", "Doripenem", "Meropenem", "Ertapenem", "Azithromycin",
- "Erythromycin", "Clarithromycin", "Dirithromycin", "Roxithromycin", "Telithromycin", "Clindamycin",
- "Lincomycin", "Pristinamycin", "Quinupristin/dalfopristin", "Amikacin", "Gentamicin", "Kanamycin",
- "Neomycin", "Netilmicin", "Paromomycin", "Streptomycin", "Tobramycin", "Flumequine", "Nalidixic acid",
- "Oxolinic acid", "Piromidic acid", "Pipemidic acid", "Rosoxacin", "Ciprofloxacin", "Enoxacin",
- "Lomefloxacin", "Nadifloxacin", "Norfloxacin", "Ofloxacin", "Pefloxacin", "Rufloxacin", "Balofloxacin",
- "Gatifloxacin", "Grepafloxacin", "Levofloxacin", "Moxifloxacin", "Pazufloxacin", "Sparfloxacin",
- "Temafloxacin", "Tosufloxacin", "Besifloxacin", "Clinafloxacin", "Gemifloxacin",
- "Sitafloxacin", "Trovafloxacin", "Prulifloxacin", "Sulfamethizole", "Sulfamethoxazole",
- "Sulfisoxazole", "Trimethoprim-Sulfamethoxazole", "Demeclocycline", "Doxycycline", "Minocycline",
- "Oxytetracycline", "Tetracycline", "Tigecycline", "Chloramphenicol", "Metronidazole",
- "Tinidazole", "Nitrofurantoin", "Vancomycin", "Teicoplanin", "Telavancin", "Linezolid",
- "Cycloserine 2", "Rifampin", "Rifabutin", "Rifapentine", "Rifalazil", "Bacitracin", "Polymyxin B",
- "Viomycin", "Capreomycin"]
+ abt = [
+ "Amoxicillin", "Ampicillin", "Bacampicillin", "Carbenicillin", "Cloxacillin", "Dicloxacillin",
+ "Flucloxacillin", "Mezlocillin", "Nafcillin", "Oxacillin", "Penicillin G", "Penicillin V",
+ "Piperacillin", "Pivampicillin", "Pivmecillinam", "Ticarcillin", "Cefacetrile (cephacetrile)",
+ "Cefadroxil (cefadroxyl)", "Cefalexin (cephalexin)", "Cefaloglycin (cephaloglycin)",
+ "Cefalonium (cephalonium)", "Cefaloridine (cephaloradine)", "Cefalotin (cephalothin)",
+ "Cefapirin (cephapirin)", "Cefatrizine", "Cefazaflur", "Cefazedone", "Cefazolin (cephazolin)",
+ "Cefradine (cephradine)", "Cefroxadine", "Ceftezole", "Cefaclor", "Cefamandole", "Cefmetazole",
+ "Cefonicid", "Cefotetan", "Cefoxitin", "Cefprozil (cefproxil)", "Cefuroxime", "Cefuzonam",
+ "Cefcapene", "Cefdaloxime", "Cefdinir", "Cefditoren", "Cefetamet", "Cefixime", "Cefmenoxime",
+ "Cefodizime", "Cefotaxime", "Cefpimizole", "Cefpodoxime", "Cefteram", "Ceftibuten", "Ceftiofur",
+ "Ceftiolene", "Ceftizoxime", "Ceftriaxone", "Cefoperazone", "Ceftazidime", "Cefclidine", "Cefepime",
+ "Cefluprenam", "Cefoselis", "Cefozopran", "Cefpirome", "Cefquinome", "Ceftobiprole", "Ceftaroline",
+ "Cefaclomezine","Cefaloram", "Cefaparole", "Cefcanel", "Cefedrolor", "Cefempidone", "Cefetrizole",
+ "Cefivitril", "Cefmatilen", "Cefmepidium", "Cefovecin", "Cefoxazole", "Cefrotil", "Cefsumide",
+ "Cefuracetime", "Ceftioxide", "Ceftazidime/Avibactam", "Ceftolozane/Tazobactam", "Aztreonam",
+ "Imipenem", "Imipenem/cilastatin", "Doripenem", "Meropenem", "Ertapenem", "Azithromycin",
+ "Erythromycin", "Clarithromycin", "Dirithromycin", "Roxithromycin", "Telithromycin", "Clindamycin",
+ "Lincomycin", "Pristinamycin", "Quinupristin/dalfopristin", "Amikacin", "Gentamicin", "Kanamycin",
+ "Neomycin", "Netilmicin", "Paromomycin", "Streptomycin", "Tobramycin", "Flumequine", "Nalidixic acid",
+ "Oxolinic acid", "Piromidic acid", "Pipemidic acid", "Rosoxacin", "Ciprofloxacin", "Enoxacin",
+ "Lomefloxacin", "Nadifloxacin", "Norfloxacin", "Ofloxacin", "Pefloxacin", "Rufloxacin", "Balofloxacin",
+ "Gatifloxacin", "Grepafloxacin", "Levofloxacin", "Moxifloxacin", "Pazufloxacin", "Sparfloxacin",
+ "Temafloxacin", "Tosufloxacin", "Besifloxacin", "Clinafloxacin", "Gemifloxacin",
+ "Sitafloxacin", "Trovafloxacin", "Prulifloxacin", "Sulfamethizole", "Sulfamethoxazole",
+ "Sulfisoxazole", "Trimethoprim-Sulfamethoxazole", "Demeclocycline", "Doxycycline", "Minocycline",
+ "Oxytetracycline", "Tetracycline", "Tigecycline", "Chloramphenicol", "Metronidazole",
+ "Tinidazole", "Nitrofurantoin", "Vancomycin", "Teicoplanin", "Telavancin", "Linezolid",
+ "Cycloserine 2", "Rifampin", "Rifabutin", "Rifapentine", "Rifalazil", "Bacitracin", "Polymyxin B",
+ "Viomycin", "Capreomycin"
+ ]
+
for a in abt:
antibiotic = frappe.new_doc("Antibiotic")
antibiotic.antibiotic_name = a
@@ -190,65 +184,65 @@ def create_healthcare_item_groups():
def create_lab_test_items():
records = [
- {"doctype": "Item", "item_code": "MCH", "item_name": "MCH", "item_group": "Laboratory",
- "stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
- {"doctype": "Item", "item_code": "LDL", "item_name": "LDL", "item_group": "Laboratory",
- "stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
- {"doctype": "Item", "item_code": "GTT", "item_name": "GTT", "item_group": "Laboratory",
- "stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
- {"doctype": "Item", "item_code": "HDL", "item_name": "HDL", "item_group": "Laboratory",
- "stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
- {"doctype": "Item", "item_code": "BILT", "item_name": "BILT", "item_group": "Laboratory",
- "stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
- {"doctype": "Item", "item_code": "BILD", "item_name": "BILD", "item_group": "Laboratory",
- "stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
- {"doctype": "Item", "item_code": "BP", "item_name": "BP", "item_group": "Laboratory",
- "stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
- {"doctype": "Item", "item_code": "BS", "item_name": "BS", "item_group": "Laboratory",
- "stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1}
+ {"doctype": "Item", "item_code": "MCH", "item_name": "MCH", "item_group": _("Laboratory"),
+ "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
+ {"doctype": "Item", "item_code": "LDL", "item_name": "LDL", "item_group": _("Laboratory"),
+ "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
+ {"doctype": "Item", "item_code": "GTT", "item_name": "GTT", "item_group": _("Laboratory"),
+ "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
+ {"doctype": "Item", "item_code": "HDL", "item_name": "HDL", "item_group": _("Laboratory"),
+ "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
+ {"doctype": "Item", "item_code": "BILT", "item_name": "BILT", "item_group": _("Laboratory"),
+ "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
+ {"doctype": "Item", "item_code": "BILD", "item_name": "BILD", "item_group": _("Laboratory"),
+ "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
+ {"doctype": "Item", "item_code": "BP", "item_name": "BP", "item_group": _("Laboratory"),
+ "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
+ {"doctype": "Item", "item_code": "BS", "item_name": "BS", "item_group": _("Laboratory"),
+ "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1}
]
insert_record(records)
def create_lab_test_template():
records = [
{"doctype": "Lab Test Template", "name": "MCH","test_name": "MCH","test_code": "MCH",
- "test_group": "Laboratory","department": "Haematology","item": "MCH",
+ "test_group": _("Laboratory"),"department": _("Haematology"),"item": "MCH",
"test_template_type": "Single","is_billable": 1,"test_rate": 0.0,"test_uom": "Microgram",
"test_normal_range": "27 - 32 Microgram",
"sensitivity": 0,"test_description": "Mean Corpuscular Hemoglobin"},
{"doctype": "Lab Test Template", "name": "LDL","test_name": "LDL (Serum)","test_code": "LDL",
- "test_group": "Laboratory","department": "Biochemistry",
+ "test_group": _("Laboratory"),"department": _("Biochemistry"),
"item": "LDL","test_template_type": "Single",
"is_billable": 1,"test_rate": 0.0,"test_uom": "mg / dl","test_normal_range": "70 - 160 mg/dlLow-density Lipoprotein (LDL)",
"sensitivity": 0,"test_description": "Low-density Lipoprotein (LDL)"},
{"doctype": "Lab Test Template", "name": "GTT","test_name": "GTT","test_code": "GTT",
- "test_group": "Laboratory","department": "Haematology",
+ "test_group": _("Laboratory"),"department": _("Haematology"),
"item": "GTT","test_template_type": "Single",
"is_billable": 1,"test_rate": 0.0,"test_uom": "mg / dl","test_normal_range": "Less than 85 mg/dl",
"sensitivity": 0,"test_description": "Glucose Tolerance Test"},
{"doctype": "Lab Test Template", "name": "HDL","test_name": "HDL (Serum)","test_code": "HDL",
- "test_group": "Laboratory","department": "Biochemistry",
+ "test_group": _("Laboratory"),"department": _("Biochemistry"),
"item": "HDL","test_template_type": "Single",
"is_billable": 1,"test_rate": 0.0,"test_uom": "mg / dl","test_normal_range": "35 - 65 mg/dl",
"sensitivity": 0,"test_description": "High-density Lipoprotein (HDL)"},
{"doctype": "Lab Test Template", "name": "BILT","test_name": "Bilirubin Total","test_code": "BILT",
- "test_group": "Laboratory","department": "Biochemistry",
+ "test_group": _("Laboratory"),"department": _("Biochemistry"),
"item": "BILT","test_template_type": "Single",
"is_billable": 1,"test_rate": 0.0,"test_uom": "mg / dl","test_normal_range": "0.2 - 1.2 mg / dl",
"sensitivity": 0,"test_description": "Bilirubin Total"},
{"doctype": "Lab Test Template", "name": "BILD","test_name": "Bilirubin Direct","test_code": "BILD",
- "test_group": "Laboratory","department": "Biochemistry",
+ "test_group": _("Laboratory"),"department": _("Biochemistry"),
"item": "BILD","test_template_type": "Single",
"is_billable": 1,"test_rate": 0.0,"test_uom": "mg / dl","test_normal_range": "0.4 mg / dl",
"sensitivity": 0,"test_description": "Bilirubin Direct"},
{"doctype": "Lab Test Template", "name": "BP","test_name": "Bile Pigment","test_code": "BP",
- "test_group": "Laboratory","department": "Pathology",
+ "test_group": _("Laboratory"),"department": _("Pathology"),
"item": "BP","test_template_type": "Single",
"is_billable": 1,"test_rate": 0.0,"test_uom": "","test_normal_range": "",
"sensitivity": 0,"test_description": "Bile Pigment"},
{"doctype": "Lab Test Template", "name": "BS","test_name": "Bile Salt","test_code": "BS",
- "test_group": "Laboratory","department": "Pathology",
+ "test_group": _("Laboratory"),"department": _("Pathology"),
"item": "BS","test_template_type": "Single",
"is_billable": 1,"test_rate": 0.0,"test_uom": "","test_normal_range": "",
"sensitivity": 0,"test_description": "Bile Salt"}
@@ -257,12 +251,12 @@ def create_lab_test_template():
def create_sensitivity():
records = [
- {"doctype": "Sensitivity", "sensitivity": "Low Sensitivity"},
- {"doctype": "Sensitivity", "sensitivity": "High Sensitivity"},
- {"doctype": "Sensitivity", "sensitivity": "Moderate Sensitivity"},
- {"doctype": "Sensitivity", "sensitivity": "Susceptible"},
- {"doctype": "Sensitivity", "sensitivity": "Resistant"},
- {"doctype": "Sensitivity", "sensitivity": "Intermediate"}
+ {"doctype": "Sensitivity", "sensitivity": _("Low Sensitivity")},
+ {"doctype": "Sensitivity", "sensitivity": _("High Sensitivity")},
+ {"doctype": "Sensitivity", "sensitivity": _("Moderate Sensitivity")},
+ {"doctype": "Sensitivity", "sensitivity": _("Susceptible")},
+ {"doctype": "Sensitivity", "sensitivity": _("Resistant")},
+ {"doctype": "Sensitivity", "sensitivity": _("Intermediate")}
]
insert_record(records)
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 48ed7415d73..44a3b18f78d 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -11,7 +11,7 @@ app_email = "info@erpnext.com"
app_license = "GNU General Public License (v3)"
source_link = "https://github.com/frappe/erpnext"
-develop_version = '8.x.x-beta'
+develop_version = '9.x.x-develop'
error_report_email = "support@erpnext.com"
@@ -47,12 +47,22 @@ treeviews = ['Account', 'Cost Center', 'Warehouse', 'Item Group', 'Customer Grou
update_website_context = "erpnext.shopping_cart.utils.update_website_context"
my_account_context = "erpnext.shopping_cart.utils.update_my_account_context"
-email_append_to = ["Job Applicant", "Opportunity", "Issue"]
+email_append_to = ["Job Applicant", "Lead", "Opportunity", "Issue"]
calendars = ["Task", "Production Order", "Leave Application", "Sales Order", "Holiday List"]
fixtures = ["Web Form"]
+domains = {
+ 'Distribution': 'erpnext.domains.distribution',
+ 'Education': 'erpnext.domains.education',
+ 'Healthcare': 'erpnext.domains.healthcare',
+ 'Hospitality': 'erpnext.domains.hospitality',
+ 'Manufacturing': 'erpnext.domains.manufacturing',
+ 'Retail': 'erpnext.domains.retail',
+ 'Services': 'erpnext.domains.services',
+}
+
website_generators = ["Item Group", "Item", "BOM", "Sales Partner",
"Job Opening", "Student Admission"]
@@ -133,7 +143,8 @@ standard_portal_menu_items = [
{"title": _("Prescription"), "route": "/prescription", "reference_doctype": "Consultation", "role":"Patient"},
{"title": _("Patient Appointment"), "route": "/patient-appointments", "reference_doctype": "Patient Appointment", "role":"Patient"},
{"title": _("Fees"), "route": "/fees", "reference_doctype": "Fees", "role":"Student"},
- {"title": _("Newsletter"), "route": "/newsletters", "reference_doctype": "Newsletter"}
+ {"title": _("Newsletter"), "route": "/newsletters", "reference_doctype": "Newsletter"},
+ {"title": _("Admission"), "route": "/admissions", "reference_doctype": "Student Admission"}
]
default_roles = [
@@ -208,7 +219,7 @@ scheduler_events = {
"erpnext.stock.doctype.serial_no.serial_no.update_maintenance_status",
"erpnext.buying.doctype.supplier_scorecard.supplier_scorecard.refresh_scorecards",
"erpnext.setup.doctype.company.company.cache_companies_monthly_sales_history",
- "erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool.update_latest_price_in_all_boms",
+ "erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool.update_latest_price_in_all_boms"
]
}
diff --git a/erpnext/hr/doctype/employee/employee.json b/erpnext/hr/doctype/employee/employee.json
index 87f05377cd4..227302c16c7 100644
--- a/erpnext/hr/doctype/employee/employee.json
+++ b/erpnext/hr/doctype/employee/employee.json
@@ -149,7 +149,7 @@
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 1,
- "in_standard_filter": 0,
+ "in_standard_filter": 1,
"label": "Full Name",
"length": 0,
"no_copy": 0,
@@ -431,7 +431,7 @@
"no_copy": 0,
"oldfieldname": "gender",
"oldfieldtype": "Select",
- "options": "Gender",
+ "options": "Gender",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
@@ -2432,7 +2432,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-06-13 14:29:13.694009",
+ "modified": "2017-10-04 11:42:02.495731",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee",
diff --git a/erpnext/hr/doctype/expense_claim_detail/expense_claim_detail.json b/erpnext/hr/doctype/expense_claim_detail/expense_claim_detail.json
index bafee91df24..99e79942bfa 100644
--- a/erpnext/hr/doctype/expense_claim_detail/expense_claim_detail.json
+++ b/erpnext/hr/doctype/expense_claim_detail/expense_claim_detail.json
@@ -1,5 +1,6 @@
{
"allow_copy": 0,
+ "allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
@@ -10,16 +11,20 @@
"editable_grid": 1,
"fields": [
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "expense_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Expense Date",
"length": 0,
"no_copy": 0,
@@ -30,6 +35,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -38,16 +44,20 @@
"width": "150px"
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -55,6 +65,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -62,16 +73,20 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "expense_type",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Expense Claim Type",
"length": 0,
"no_copy": 0,
@@ -83,6 +98,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -91,9 +107,11 @@
"width": "150px"
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "expense_type",
"fieldname": "default_account",
"fieldtype": "Link",
@@ -101,7 +119,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Default Account",
"length": 0,
"no_copy": 0,
@@ -111,6 +131,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -118,16 +139,20 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break_4",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -135,6 +160,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -142,26 +168,32 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "description",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"oldfieldname": "description",
"oldfieldtype": "Small Text",
+ "options": "expense_type.description",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -170,16 +202,20 @@
"width": "300px"
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break_6",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -187,6 +223,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -194,16 +231,20 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "claim_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Claim Amount",
"length": 0,
"no_copy": 0,
@@ -215,6 +256,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -223,16 +265,20 @@
"width": "150px"
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_8",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -240,6 +286,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -247,16 +294,20 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "sanctioned_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Sanctioned Amount",
"length": 0,
"no_copy": 1,
@@ -268,6 +319,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -276,17 +328,17 @@
"width": "150px"
}
],
+ "has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 1,
"image_view": 0,
"in_create": 0,
- "in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-07-11 03:28:00.406154",
+ "modified": "2017-10-11 12:50:48.606727",
"modified_by": "Administrator",
"module": "HR",
"name": "Expense Claim Detail",
@@ -295,7 +347,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/job_opening/job_opening.py b/erpnext/hr/doctype/job_opening/job_opening.py
index 3d935f55e6b..60c911a0161 100644
--- a/erpnext/hr/doctype/job_opening/job_opening.py
+++ b/erpnext/hr/doctype/job_opening/job_opening.py
@@ -21,7 +21,7 @@ class JobOpening(WebsiteGenerator):
self.route = frappe.scrub(self.job_title).replace('_', '-')
def get_context(self, context):
- context.parents = [{'name': 'jobs', 'title': _('All Jobs') }]
+ context.parents = [{'route': 'jobs', 'title': _('All Jobs') }]
def get_list_context(context):
context.title = _("Jobs")
diff --git a/erpnext/hr/doctype/offer_letter/test_offer_letter.js b/erpnext/hr/doctype/offer_letter/test_offer_letter.js
index 20695326129..c9b08a6c50d 100644
--- a/erpnext/hr/doctype/offer_letter/test_offer_letter.js
+++ b/erpnext/hr/doctype/offer_letter/test_offer_letter.js
@@ -27,13 +27,13 @@ QUnit.test("Test: Offer Letter [HR]", function (assert) {
]},
]);
},
- () => frappe.timeout(8),
+ () => frappe.timeout(10),
() => frappe.click_button('Submit'),
() => frappe.timeout(2),
() => frappe.click_button('Yes'),
- () => frappe.timeout(8),
+ () => frappe.timeout(5),
+ // To check if the fields are correctly set
() => {
- // To check if the fields are correctly set
assert.ok(cur_frm.get_field('status').value=='Accepted',
'Status of job offer is correct');
assert.ok(cur_frm.get_field('designation').value=='Software Developer',
@@ -45,7 +45,7 @@ QUnit.test("Test: Offer Letter [HR]", function (assert) {
() => {
assert.ok(cur_list.data[0].docstatus==1,'Offer Letter Submitted successfully');
},
- () => frappe.timeout(4),
+ () => frappe.timeout(2),
() => done()
]);
});
\ No newline at end of file
diff --git a/erpnext/hr/doctype/process_payroll/process_payroll.py b/erpnext/hr/doctype/process_payroll/process_payroll.py
index 55c0cce59f6..0e329a7c19b 100644
--- a/erpnext/hr/doctype/process_payroll/process_payroll.py
+++ b/erpnext/hr/doctype/process_payroll/process_payroll.py
@@ -284,7 +284,7 @@ class ProcessPayroll(Document):
})
# Deductions
- for acc, amt in deductions.items():
+ for acc, amount in deductions.items():
payable_amount -= flt(amount, precision)
accounts.append({
"account": acc,
diff --git a/erpnext/hr/doctype/salary_detail/salary_detail.json b/erpnext/hr/doctype/salary_detail/salary_detail.json
index d1312957658..01d02779b79 100644
--- a/erpnext/hr/doctype/salary_detail/salary_detail.json
+++ b/erpnext/hr/doctype/salary_detail/salary_detail.json
@@ -12,6 +12,7 @@
"editable_grid": 1,
"fields": [
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -42,6 +43,7 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -73,6 +75,7 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -101,6 +104,7 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -131,6 +135,7 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -159,6 +164,7 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -189,6 +195,7 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -221,6 +228,7 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -253,6 +261,7 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -284,6 +293,7 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -314,6 +324,37 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "do_not_include_in_total",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Do not include in total",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -345,6 +386,7 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -374,6 +416,7 @@
"unique": 0
},
{
+ "allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
@@ -415,8 +458,8 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-04-13 00:47:33.980646",
- "modified_by": "chude.osiegbu@manqala.com",
+ "modified": "2017-10-02 13:57:22.769751",
+ "modified_by": "Administrator",
"module": "HR",
"name": "Salary Detail",
"name_case": "",
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.js b/erpnext/hr/doctype/salary_slip/salary_slip.js
index de3276c8e3f..24f2016bd62 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.js
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.js
@@ -158,14 +158,18 @@ var calculate_earning_total = function(doc, dt, dn, reset_amount) {
var total_earn = 0;
for(var i = 0; i < tbl.length; i++){
if(cint(tbl[i].depends_on_lwp) == 1) {
+
tbl[i].amount = Math.round(tbl[i].default_amount)*(flt(doc.payment_days) /
cint(doc.total_working_days)*100)/100;
refresh_field('amount', tbl[i].name, 'earnings');
+
} else if(reset_amount) {
tbl[i].amount = tbl[i].default_amount;
refresh_field('amount', tbl[i].name, 'earnings');
}
- total_earn += flt(tbl[i].amount);
+ if(!tbl[i].do_not_include_in_total) {
+ total_earn += flt(tbl[i].amount);
+ }
}
doc.gross_pay = total_earn;
refresh_many(['amount','gross_pay']);
@@ -184,7 +188,9 @@ var calculate_ded_total = function(doc, dt, dn, reset_amount) {
tbl[i].amount = tbl[i].default_amount;
refresh_field('amount', tbl[i].name, 'deductions');
}
- total_ded += flt(tbl[i].amount);
+ if(!tbl[i].do_not_include_in_total) {
+ total_ded += flt(tbl[i].amount);
+ }
}
doc.total_deduction = total_ded;
refresh_field('total_deduction');
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py
index 356104e69c2..7581624bef7 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.py
@@ -69,7 +69,9 @@ class SalarySlip(TransactionBase):
'amount': amount,
'default_amount': amount,
'depends_on_lwp' : struct_row.depends_on_lwp,
- 'salary_component' : struct_row.salary_component
+ 'salary_component' : struct_row.salary_component,
+ 'abbr' : struct_row.abbr,
+ 'do_not_include_in_total' : struct_row.do_not_include_in_total
})
else:
component_row.amount = amount
@@ -345,11 +347,13 @@ class SalarySlip(TransactionBase):
(flt(d.default_amount) * flt(self.payment_days)
/ cint(self.total_working_days)), self.precision("amount", component_type)
)
+
elif not self.payment_days and not self.salary_slip_based_on_timesheet:
d.amount = 0
elif not d.amount:
d.amount = d.default_amount
- self.set(total_field, self.get(total_field) + flt(d.amount))
+ if not d.do_not_include_in_total:
+ self.set(total_field, self.get(total_field) + flt(d.amount))
def calculate_net_pay(self):
if self.salary_structure:
diff --git a/erpnext/hr/doctype/salary_slip/test_salary_slip.js b/erpnext/hr/doctype/salary_slip/test_salary_slip.js
index a49c973d132..619e5300ca7 100644
--- a/erpnext/hr/doctype/salary_slip/test_salary_slip.js
+++ b/erpnext/hr/doctype/salary_slip/test_salary_slip.js
@@ -15,7 +15,7 @@ QUnit.test("test salary slip", function(assert) {
{ employee: employee_name}
]);
},
- () => frappe.timeout(1),
+ () => frappe.timeout(3),
() => {
// To check if all the calculations are correctly done
if(ename === 'Test Employee 1')
@@ -43,7 +43,7 @@ QUnit.test("test salary slip", function(assert) {
() => salary_slip('Test Employee 1'),
() => frappe.timeout(6),
() => salary_slip('Test Employee 3'),
- () => frappe.timeout(3),
+ () => frappe.timeout(5),
() => done()
]);
});
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_structure/test_salary_structure.js b/erpnext/hr/doctype/salary_structure/test_salary_structure.js
index 8276a82cb79..542fa503549 100644
--- a/erpnext/hr/doctype/salary_structure/test_salary_structure.js
+++ b/erpnext/hr/doctype/salary_structure/test_salary_structure.js
@@ -1,5 +1,5 @@
QUnit.test("test Salary Structure", function(assert) {
- assert.expect(6);
+ assert.expect(7);
let done = assert.async();
let employee_name1;
@@ -9,10 +9,12 @@ QUnit.test("test Salary Structure", function(assert) {
employee_name1 = r.name;
}
),
+ () => frappe.timeout(5),
() => frappe.db.get_value('Employee', {'employee_name': "Test Employee 3"}, 'name',
(r) => {
// Creating Salary Structure for employees);
return frappe.tests.make('Salary Structure', [
+ { __newname: 'Test Salary Structure'},
{ company: 'For Testing'},
{ payroll_frequency: 'Monthly'},
{ employees: [
@@ -47,16 +49,14 @@ QUnit.test("test Salary Structure", function(assert) {
]);
}
),
- () => frappe.timeout(18),
- () => cur_dialog.set_value('value','Test Salary Structure'),
- () => frappe.timeout(1),
- () => frappe.click_button('Create'),
- () => frappe.timeout(1),
+ () => frappe.timeout(15),
() => {
- // To check if all the fields are correctly set
- assert.ok(cur_frm.doc.employees[0].employee_name.includes('Test Employee 1') &&
- cur_frm.doc.employees[1].employee_name.includes('Test Employee 3'),
- 'Employee names are correctly set');
+ // To check if all the fields are correctly set
+ assert.ok(cur_frm.doc.employees[0].employee_name=='Test Employee 1',
+ 'Employee 1 name correctly set');
+
+ assert.ok(cur_frm.doc.employees[1].employee_name=='Test Employee 3',
+ 'Employee 2 name correctly set');
assert.ok(cur_frm.doc.employees[0].base==25000,
'Base value for first employee is correctly set');
diff --git a/erpnext/hr/doctype/training_event/test_training_event.py b/erpnext/hr/doctype/training_event/test_training_event.py
index 03416ee1f43..57123e304f5 100644
--- a/erpnext/hr/doctype/training_event/test_training_event.py
+++ b/erpnext/hr/doctype/training_event/test_training_event.py
@@ -5,8 +5,38 @@ from __future__ import unicode_literals
import frappe
import unittest
-
-# test_records = frappe.get_test_records('Training Event')
+from frappe.utils import today, add_days
+from erpnext.hr.doctype.salary_structure.test_salary_structure import make_employee
class TestTrainingEvent(unittest.TestCase):
- pass
+ def setUp(self):
+ create_training_program("Basic Training")
+ self.employee = make_employee("robert_loan@trainig.com")
+ self.employee2 = make_employee("suzie.tan@trainig.com")
+
+ def test_create_training_event(self):
+ if not frappe.db.get_value("Training Event", "Basic Training Event"):
+ frappe.get_doc({
+ "doctype": "Training Event",
+ "event_name": "Basic Training Event",
+ "training_program": "Basic Training",
+ "location": "Union Square",
+ "start_time": add_days(today(), 5),
+ "end_time": add_days(today(), 6),
+ "introduction": "Welcome to the Basic Training Event",
+ "employees": get_attendees(self.employee, self.employee2)
+ }).insert()
+
+def create_training_program(training_program):
+ if not frappe.db.get_value("Training Program", training_program):
+ frappe.get_doc({
+ "doctype": "Training Program",
+ "training_program": training_program,
+ "description": training_program
+ }).insert()
+
+def get_attendees(employee, employee2):
+ return [
+ {"employee": employee},
+ {"employee": employee2}
+ ]
\ No newline at end of file
diff --git a/erpnext/hr/doctype/training_event/tests/test_training_event.js b/erpnext/hr/doctype/training_event/tests/test_training_event.js
index a359af3329d..8ff4fecd6ee 100644
--- a/erpnext/hr/doctype/training_event/tests/test_training_event.js
+++ b/erpnext/hr/doctype/training_event/tests/test_training_event.js
@@ -1,7 +1,7 @@
QUnit.module('hr');
QUnit.test("Test: Training Event [HR]", function (assert) {
- assert.expect(4);
+ assert.expect(5);
let done = assert.async();
let employee_name;
@@ -21,7 +21,8 @@ QUnit.test("Test: Training Event [HR]", function (assert) {
{ employees: [
[
{employee: employee_name},
- {employee_name: 'Test Employee 1'}
+ {employee_name: 'Test Employee 1'},
+ {attendance: 'Optional'}
]
]},
]);
@@ -41,6 +42,9 @@ QUnit.test("Test: Training Event [HR]", function (assert) {
assert.ok(cur_frm.doc.employees[0].employee_name=='Test Employee 1',
'Attendee Employee is correctly set');
+
+ assert.ok(cur_frm.doc.employees[0].attendance=='Optional',
+ 'Attendance is correctly set');
},
() => frappe.set_route('List','Training Event','List'),
diff --git a/erpnext/hr/doctype/training_event/tests/test_training_event_attendance.js b/erpnext/hr/doctype/training_event/tests/test_training_event_attendance.js
deleted file mode 100644
index 6364308f731..00000000000
--- a/erpnext/hr/doctype/training_event/tests/test_training_event_attendance.js
+++ /dev/null
@@ -1,40 +0,0 @@
-QUnit.module('hr');
-
-QUnit.test("test: Training Event", function (assert) {
- // number of asserts
- assert.expect(1);
- let done = assert.async();
-
- frappe.run_serially([
- // insert a new Training Event
- () => frappe.set_route("List", "Training Event", "List"),
- () => frappe.new_doc("Training Event"),
- () => frappe.timeout(1),
- () => frappe.click_link('Edit in full page'),
- () => cur_frm.set_value("event_name", "Test Event " + frappe.utils.get_random(10)),
- () => cur_frm.set_value("start_time", "2017-07-26, 2:00 pm PDT"),
- () => cur_frm.set_value("end_time", "2017-07-26, 2:30 pm PDT"),
- () => cur_frm.set_value("introduction", "This is a test report"),
- () => cur_frm.set_value("location", "Fake office"),
- () => frappe.click_button('Add Row'),
- () => frappe.db.get_value('Employee', {'employee_name':'Test Employee 1'}, 'name'),
- (r) => {
- console.log(r);
- return cur_frm.fields_dict.employees.grid.grid_rows[0].doc.employee = r.message.name;
- },
- () => {
- return cur_frm.fields_dict.employees.grid.grid_rows[0].doc.attendance = "Optional";
- },
- () => frappe.click_button('Save'),
- () => frappe.timeout(2),
- () => frappe.click_button('Submit'),
- () => frappe.timeout(2),
- () => frappe.click_button('Yes'),
- () => frappe.timeout(1),
- () => {
- assert.equal(cur_frm.doc.docstatus, 1);
- },
- () => done()
- ]);
-
-});
\ No newline at end of file
diff --git a/erpnext/hr/doctype/training_event/training_event.js b/erpnext/hr/doctype/training_event/training_event.js
index 6a6e8fe0a6a..12bc920b187 100644
--- a/erpnext/hr/doctype/training_event/training_event.js
+++ b/erpnext/hr/doctype/training_event/training_event.js
@@ -2,6 +2,9 @@
// For license information, please see license.txt
frappe.ui.form.on('Training Event', {
+ onload_post_render: function(frm) {
+ frm.get_field("employees").grid.set_multiple_add("employee");
+ },
refresh: function(frm) {
if(!frm.doc.__islocal) {
frm.add_custom_button(__("Training Result"), function() {
@@ -18,4 +21,4 @@ frappe.ui.form.on('Training Event', {
});
}
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/hr/doctype/training_event/training_event.json b/erpnext/hr/doctype/training_event/training_event.json
index 7be9d974fe6..4b812a992e0 100644
--- a/erpnext/hr/doctype/training_event/training_event.json
+++ b/erpnext/hr/doctype/training_event/training_event.json
@@ -42,6 +42,37 @@
"set_only_once": 0,
"unique": 0
},
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "training_program",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Training Program",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Training Program",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
{
"allow_bulk_edit": 0,
"allow_on_submit": 1,
@@ -73,6 +104,37 @@
"set_only_once": 0,
"unique": 0
},
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:doc.type == 'Seminar' || doc.type == 'Workshop' || doc.type == 'Conference' || doc.type == 'Exam'",
+ "fieldname": "has_certificate",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Has Certificate",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
@@ -133,6 +195,69 @@
"set_only_once": 0,
"unique": 0
},
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:doc.type == 'Seminar' || doc.type == 'Workshop' || doc.type == 'Exam'",
+ "fieldname": "level",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Level",
+ "length": 0,
+ "no_copy": 0,
+ "options": "\nBeginner\nExpert\nAdvance",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "company",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Company",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
@@ -684,7 +809,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-08-11 03:11:25.768563",
+ "modified": "2017-10-23 06:13:29.065781",
"modified_by": "Administrator",
"module": "HR",
"name": "Training Event",
@@ -712,7 +837,7 @@
"write": 1
}
],
- "quick_entry": 1,
+ "quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "event_name",
diff --git a/erpnext/hr/doctype/training_event/training_event.py b/erpnext/hr/doctype/training_event/training_event.py
index cc568414a03..19721005d14 100644
--- a/erpnext/hr/doctype/training_event/training_event.py
+++ b/erpnext/hr/doctype/training_event/training_event.py
@@ -3,6 +3,7 @@
# For license information, please see license.txt
from __future__ import unicode_literals
+import frappe
from frappe.model.document import Document
from erpnext.hr.doctype.employee.employee import get_employee_emails
@@ -10,3 +11,29 @@ class TrainingEvent(Document):
def validate(self):
self.employee_emails = ', '.join(get_employee_emails([d.employee
for d in self.employees]))
+
+@frappe.whitelist()
+def get_events(start, end, filters=None):
+ """Returns events for Gantt / Calendar view rendering.
+
+ :param start: Start date-time.
+ :param end: End date-time.
+ :param filters: Filters (JSON).
+ """
+ from frappe.desk.calendar import get_event_conditions
+ conditions = get_event_conditions("Training Event", filters)
+
+ data = frappe.db.sql("""
+ select
+ name, event_name, event_status, start_time, end_time
+ from
+ `tabTraining Event`
+ where (ifnull(start_time, '0000-00-00')!= '0000-00-00') \
+ and (start_time between %(start)s and %(end)s)
+ and docstatus < 2
+ {conditions}
+ """.format(conditions=conditions), {
+ "start": start,
+ "end": end
+ }, as_dict=True, update={"allDay": 0})
+ return data
diff --git a/erpnext/hr/doctype/training_event/training_event_calendar.js b/erpnext/hr/doctype/training_event/training_event_calendar.js
new file mode 100644
index 00000000000..cb938518a4b
--- /dev/null
+++ b/erpnext/hr/doctype/training_event/training_event_calendar.js
@@ -0,0 +1,14 @@
+// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+// License: GNU General Public License v3. See license.txt
+
+frappe.views.calendar["Training Event"] = {
+ field_map: {
+ "start": "start_time",
+ "end": "end_time",
+ "id": "name",
+ "title": "event_name",
+ "allDay": "allDay"
+ },
+ gantt: true,
+ get_events_method: "erpnext.hr.doctype.training_event.training_event.get_events",
+}
diff --git a/erpnext/hr/doctype/training_event_employee/training_event_employee.json b/erpnext/hr/doctype/training_event_employee/training_event_employee.json
index a8a72b1a701..76adcb0ed22 100644
--- a/erpnext/hr/doctype/training_event_employee/training_event_employee.json
+++ b/erpnext/hr/doctype/training_event_employee/training_event_employee.json
@@ -147,7 +147,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
- "in_list_view": 0,
+ "in_list_view": 1,
"in_standard_filter": 0,
"label": "Attendance",
"length": 0,
@@ -176,7 +176,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-08-11 03:36:22.738253",
+ "modified": "2017-10-05 08:49:41.869998",
"modified_by": "Administrator",
"module": "HR",
"name": "Training Event Employee",
diff --git a/erpnext/hr/doctype/training_program/__init__.py b/erpnext/hr/doctype/training_program/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.js b/erpnext/hr/doctype/training_program/test_training_program.js
similarity index 65%
rename from erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.js
rename to erpnext/hr/doctype/training_program/test_training_program.js
index 7097a6dcb2b..3a62b2fa221 100644
--- a/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.js
+++ b/erpnext/hr/doctype/training_program/test_training_program.js
@@ -2,15 +2,15 @@
// rename this file from _test_[name] to test_[name] to activate
// and remove above this line
-QUnit.test("test: Supplier Quotation", function (assert) {
+QUnit.test("test: Training Program", function (assert) {
let done = assert.async();
// number of asserts
assert.expect(1);
- frappe.run_serially('Supplier Quotation', [
- // insert a new Supplier Quotation
- () => frappe.tests.make([
+ frappe.run_serially([
+ // insert a new Training Program
+ () => frappe.tests.make('Training Program', [
// values to be set
{key: 'value'}
]),
diff --git a/erpnext/hr/doctype/training_program/test_training_program.py b/erpnext/hr/doctype/training_program/test_training_program.py
new file mode 100644
index 00000000000..9d5b28616b1
--- /dev/null
+++ b/erpnext/hr/doctype/training_program/test_training_program.py
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+import unittest
+
+class TestTrainingProgram(unittest.TestCase):
+ pass
diff --git a/erpnext/hr/doctype/training_program/training_program.js b/erpnext/hr/doctype/training_program/training_program.js
new file mode 100644
index 00000000000..7d85cab59dc
--- /dev/null
+++ b/erpnext/hr/doctype/training_program/training_program.js
@@ -0,0 +1,5 @@
+// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
+frappe.ui.form.on('Training Program', {
+});
\ No newline at end of file
diff --git a/erpnext/hr/doctype/training_program/training_program.json b/erpnext/hr/doctype/training_program/training_program.json
new file mode 100644
index 00000000000..d9b33d5de7d
--- /dev/null
+++ b/erpnext/hr/doctype/training_program/training_program.json
@@ -0,0 +1,454 @@
+{
+ "allow_copy": 0,
+ "allow_guest_to_view": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "autoname": "field:training_program",
+ "beta": 0,
+ "creation": "2017-10-11 04:43:17.230065",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "fields": [
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "training_program",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Training Program",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 1,
+ "bold": 1,
+ "collapsible": 0,
+ "columns": 0,
+ "default": "Scheduled",
+ "fieldname": "status",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Status",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Scheduled\nCompleted\nCancelled",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_3",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "company",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Company",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "section_break_5",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "trainer_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Trainer Name",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "trainer_email",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Trainer Email",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_8",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "supplier",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Supplier",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Supplier",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "contact_number",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Contact Number",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "section_break_11",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "description",
+ "fieldtype": "Text Editor",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Description",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "amended_from",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Amended From",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Training Program",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ }
+ ],
+ "has_web_view": 0,
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "image_view": 0,
+ "in_create": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2017-10-16 05:34:23.055153",
+ "modified_by": "Administrator",
+ "module": "HR",
+ "name": "Training Program",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "HR Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ }
+ ],
+ "quick_entry": 0,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "show_name_in_global_search": 1,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "title_field": "training_program",
+ "track_changes": 1,
+ "track_seen": 0
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/training_program/training_program.py b/erpnext/hr/doctype/training_program/training_program.py
new file mode 100644
index 00000000000..7a3720b66b6
--- /dev/null
+++ b/erpnext/hr/doctype/training_program/training_program.py
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+from frappe.model.document import Document
+
+class TrainingProgram(Document):
+ pass
diff --git a/erpnext/hr/doctype/training_program/training_program_dashboard.py b/erpnext/hr/doctype/training_program/training_program_dashboard.py
new file mode 100644
index 00000000000..a314081c6b9
--- /dev/null
+++ b/erpnext/hr/doctype/training_program/training_program_dashboard.py
@@ -0,0 +1,12 @@
+from frappe import _
+
+def get_data():
+ return {
+ 'fieldname': 'training_program',
+ 'transactions': [
+ {
+ 'label': _('Training Events'),
+ 'items': ['Training Event']
+ },
+ ]
+ }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/upload_attendance/upload_attendance.js b/erpnext/hr/doctype/upload_attendance/upload_attendance.js
index f639898e27c..776fd3c13b0 100644
--- a/erpnext/hr/doctype/upload_attendance/upload_attendance.js
+++ b/erpnext/hr/doctype/upload_attendance/upload_attendance.js
@@ -39,6 +39,7 @@ erpnext.hr.AttendanceControlPanel = frappe.ui.form.Controller.extend({
args: {
method: 'erpnext.hr.doctype.upload_attendance.upload_attendance.upload'
},
+ no_socketio: true,
sample_url: "e.g. http://example.com/somefile.csv",
callback: function(attachment, r) {
var $log_wrapper = $(cur_frm.fields_dict.import_log.wrapper).empty();
diff --git a/erpnext/hr/email_alert/training_scheduled/training_scheduled.json b/erpnext/hr/email_alert/training_scheduled/training_scheduled.json
index e1631f86839..0782f0cfc11 100644
--- a/erpnext/hr/email_alert/training_scheduled/training_scheduled.json
+++ b/erpnext/hr/email_alert/training_scheduled/training_scheduled.json
@@ -10,8 +10,8 @@
"idx": 0,
"is_standard": 1,
"message": "