[hub] start
diff --git a/erpnext/hub_node/__init__.py b/erpnext/hub_node/__init__.py
new file mode 100644
index 0000000..4eaf807
--- /dev/null
+++ b/erpnext/hub_node/__init__.py
@@ -0,0 +1,17 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe, requests
+
+@frappe.whitelist()
+def get_items(text, start, limit):
+ hub = frappe.get_single("Hub Settings")
+ response = requests.get(hub.hub_url + "/api/method/hub.hub.api.get_items", params={
+ "access_token": hub.access_token,
+ "text": text,
+ "start": start,
+ "limit": limit
+ })
+ response.raise_for_status()
+ return response.json().get("message")
diff --git a/erpnext/hub_node/doctype/__init__.py b/erpnext/hub_node/doctype/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/hub_node/doctype/__init__.py
diff --git a/erpnext/hub_node/doctype/hub_settings/__init__.py b/erpnext/hub_node/doctype/hub_settings/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/hub_node/doctype/hub_settings/__init__.py
diff --git a/erpnext/hub_node/doctype/hub_settings/hub_settings.js b/erpnext/hub_node/doctype/hub_settings/hub_settings.js
new file mode 100644
index 0000000..190b9bb
--- /dev/null
+++ b/erpnext/hub_node/doctype/hub_settings/hub_settings.js
@@ -0,0 +1,17 @@
+frappe.ui.form.on("Hub Settings", "onload", function(frm) {
+ if(!frm.doc.seller_country) {
+ frm.set_value("seller_country", frappe.defaults.get_default("country"));
+ }
+ if(!frm.doc.seller_name) {
+ frm.set_value("seller_name", frappe.defaults.get_default("company"));
+ }
+});
+
+frappe.ui.form.on("Hub Settings", "refresh", function(frm) {
+ // make mandatory if published
+ frm.toggle_reqd(["seller_name", "seller_email", "seller_country"], frm.doc.publish);
+});
+
+frappe.ui.form.on("Hub Settings", "publish", function(frm) {
+ frm.trigger("refresh");
+});
diff --git a/erpnext/hub_node/doctype/hub_settings/hub_settings.json b/erpnext/hub_node/doctype/hub_settings/hub_settings.json
new file mode 100644
index 0000000..3670d9a
--- /dev/null
+++ b/erpnext/hub_node/doctype/hub_settings/hub_settings.json
@@ -0,0 +1,268 @@
+{
+ "allow_copy": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "creation": "2015-02-18 00:59:34.560476",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "System",
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "fieldname": "publish",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Publish Items to Hub",
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0
+ },
+ {
+ "depends_on": "publish",
+ "fieldname": "section_break_2",
+ "fieldtype": "Section Break",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
+ "allow_on_submit": 0,
+ "fieldname": "publish_pricing",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Publish Pricing",
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "fieldname": "publish_availability",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Publish Availability",
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "fieldname": "column_break_5",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "fieldname": "sync_now",
+ "fieldtype": "Button",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Sync Now",
+ "no_copy": 0,
+ "options": "sync",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0
+ },
+ {
+ "depends_on": "publish",
+ "fieldname": "section_break_6",
+ "fieldtype": "Section Break",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
+ "fieldname": "seller_name",
+ "fieldtype": "Data",
+ "label": "Seller Name",
+ "permlevel": 0,
+ "precision": "",
+ "reqd": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "fieldname": "seller_country",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Seller Country",
+ "no_copy": 0,
+ "options": "Country",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0
+ },
+ {
+ "fieldname": "seller_email",
+ "fieldtype": "Data",
+ "label": "Seller Email",
+ "options": "Email",
+ "permlevel": 0,
+ "precision": "",
+ "reqd": 0
+ },
+ {
+ "fieldname": "column_break_10",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
+ "fieldname": "seller_city",
+ "fieldtype": "Data",
+ "label": "Seller City",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
+ "fieldname": "seller_website",
+ "fieldtype": "Data",
+ "label": "Seller Website",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
+ "depends_on": "publish",
+ "fieldname": "section_break_13",
+ "fieldtype": "Section Break",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
+ "fieldname": "seller_description",
+ "fieldtype": "Text Editor",
+ "label": "Seller Description",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
+ "allow_on_submit": 0,
+ "fieldname": "name_token",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Name Token",
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "fieldname": "access_token",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Access Token",
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0
+ }
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
+ "issingle": 1,
+ "istable": 0,
+ "modified": "2015-02-18 08:14:46.140473",
+ "modified_by": "Administrator",
+ "module": "Hub Node",
+ "name": "Hub Settings",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 0,
+ "email": 0,
+ "export": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 0,
+ "read": 1,
+ "report": 0,
+ "role": "System Manager",
+ "set_user_permissions": 0,
+ "share": 0,
+ "submit": 0,
+ "write": 1
+ }
+ ],
+ "read_only": 0,
+ "read_only_onload": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC"
+}
\ No newline at end of file
diff --git a/erpnext/hub_node/doctype/hub_settings/hub_settings.py b/erpnext/hub_node/doctype/hub_settings/hub_settings.py
new file mode 100644
index 0000000..8b213cd
--- /dev/null
+++ b/erpnext/hub_node/doctype/hub_settings/hub_settings.py
@@ -0,0 +1,96 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe, requests, json
+from frappe.model.document import Document
+from frappe.utils import cint, expand_relative_urls
+from frappe import _
+
+
+class HubSettings(Document):
+ hub_url = "http://localhost:8001"
+ def validate(self):
+ if cint(self.publish):
+ if not self.name_token:
+ self.register()
+ else:
+ self.update_seller_details()
+ self.publish_selling_items()
+ else:
+ if self.name_token:
+ self.unpublish()
+
+ def publish_selling_items(self):
+ """Set `publish_in_hub`=1 for all Sales Items"""
+ for item in frappe.get_all("Item", fields=["name"],
+ filters={"is_sales_item": "Yes", "publish_in_hub": "0"}):
+ frappe.db.set_value("Item", item.name, "publish_in_hub", 1)
+
+ def register(self):
+ """Register at hub.erpnext.com, save `name_token` and `access_token`"""
+ response = requests.post(self.hub_url + "/api/method/hub.hub.api.register", data=self.get_args())
+ response.raise_for_status()
+ response = response.json()
+ self.name_token = response.get("message").get("name")
+ self.access_token = response.get("message").get("access_token")
+
+ def unpublish(self):
+ """Unpublish from hub.erpnext.com"""
+ response = requests.post(self.hub_url + "/api/method/hub.hub.api.unpublish", data={
+ "access_token": self.access_token
+ })
+ response.raise_for_status()
+
+ def update_seller_details(self):
+ """Update details at hub.erpnext.com"""
+ args = self.get_args()
+ args["published"] = 1
+ response = requests.post(self.hub_url + "/api/method/hub.hub.api.update_seller", data={
+ "access_token": self.access_token,
+ "args": json.dumps(args)
+ })
+ response.raise_for_status()
+
+ def get_args(self):
+ return {
+ "seller_name": self.seller_name,
+ "seller_country": self.seller_country,
+ "seller_city": self.seller_city,
+ "seller_email": self.seller_email,
+ "seller_website": self.seller_website,
+ "seller_description": self.seller_description
+ }
+
+ def sync(self, verbose=True):
+ """Sync items with hub.erpnext.com"""
+ if not self.publish:
+ if verbose:
+ frappe.msgprint(_("Publish to sync items"))
+ return
+
+ items = frappe.db.get_all("Item",
+ fields=["name", "item_name", "description", "image", "item_group"],
+ filters={"publish_in_hub": 1, "synced_with_hub": 0})
+
+ for item in items:
+ item.item_code = item.name
+ if item.image:
+ item.image = expand_relative_urls(item.image)
+
+ item_list = frappe.db.sql_list("select name from tabItem where ifnull(publish_in_hub,0)=1")
+
+ if items:
+ response = requests.post(self.hub_url + "/api/method/hub.hub.api.sync", data={
+ "access_token": self.access_token,
+ "items": json.dumps(items),
+ "item_list": json.dumps(item_list)
+ })
+ response.raise_for_status()
+ for item in items:
+ frappe.db.set_value("Item", item.name, "synced_with_hub", 1)
+ if verbose:
+ frappe.msgprint(_("{0} Items synced".format(len(items))))
+ else:
+ if verbose:
+ frappe.msgprint(_("Items already synced"))
diff --git a/erpnext/hub_node/page/__init__.py b/erpnext/hub_node/page/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/hub_node/page/__init__.py
diff --git a/erpnext/hub_node/page/hub/__init__.py b/erpnext/hub_node/page/hub/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/hub_node/page/hub/__init__.py
diff --git a/erpnext/hub_node/page/hub/hub.js b/erpnext/hub_node/page/hub/hub.js
new file mode 100644
index 0000000..ad09b9d
--- /dev/null
+++ b/erpnext/hub_node/page/hub/hub.js
@@ -0,0 +1,90 @@
+frappe.pages['hub'].on_page_load = function(wrapper) {
+ var page = frappe.ui.make_app_page({
+ parent: wrapper,
+ title: 'Hub',
+ single_column: true
+ });
+
+ frappe.hub = new frappe.Hub({page:page});
+
+}
+
+frappe.pages['hub'].on_page_show = function() {
+ frappe.hub.refresh();
+}
+
+frappe.Hub = Class.extend({
+ init: function(args) {
+ $.extend(this, args);
+ this.render();
+ },
+ refresh: function() {
+ if(this.hub && this.hub.publish && !this.hub_list) {
+ this.setup_list();
+ }
+ },
+ render: function() {
+ this.page.main.empty();
+ var me = this;
+ frappe.model.with_doc("Hub Settings", "Hub Settings", function() {
+ me.hub = locals["Hub Settings"]["Hub Settings"];
+ if(!me.hub.publish) {
+ $(frappe.render_template("register_in_hub", {})).appendTo(me.page.main);
+ } else {
+ me.setup_list();
+ }
+ });
+ },
+ setup_list: function() {
+ var me = this;
+ $(frappe.render_template("hub_body", {})).appendTo(this.page.main);
+ this.hub_list = this.page.main.find(".hub-list");
+ this.search = this.page.main.find("input").on("keypress", function(e) {
+ if(e.which===13) {
+ me.reset();
+ }
+ });
+ this.loading = this.page.main.find(".loading");
+ this.done = this.page.main.find(".done");
+ this.more = this.page.main.find(".more")
+ this.more.find(".btn").on("click", function() { me.next_page() });
+ this.reset();
+ },
+ reset: function() {
+ this.hub_list.empty();
+ this.start = 0;
+ this.page_length = 20;
+ this.next_page();
+ },
+ next_page: function() {
+ var me = this;
+ this.loading.toggleClass("hide", false);
+ frappe.call({
+ method: "erpnext.hub_node.get_items",
+ args: {
+ text: this.get_text(),
+ start: this.start,
+ limit: this.page_length
+ },
+ callback: function(r) {
+ me.loading.toggleClass("hide", true);
+ if(!r.message)
+ r.message = [];
+ me.start += r.message.length;
+ $(frappe.render_template("hub_list", {items: r.message})).appendTo(me.hub_list);
+ if(r.message.length && r.message.length===me.page_length) {
+ // more
+ me.more.removeClass("hide");
+ me.done.addClass("hide");
+ } else {
+ // done
+ me.more.addClass("hide");
+ me.done.removeClass("hide");
+ }
+ }
+ });
+ },
+ get_text: function() {
+ return this.search.val();
+ },
+})
diff --git a/erpnext/hub_node/page/hub/hub.json b/erpnext/hub_node/page/hub/hub.json
new file mode 100644
index 0000000..2d7c899
--- /dev/null
+++ b/erpnext/hub_node/page/hub/hub.json
@@ -0,0 +1,21 @@
+{
+ "content": null,
+ "creation": "2015-02-18 05:17:17.301735",
+ "docstatus": 0,
+ "doctype": "Page",
+ "modified": "2015-02-18 05:17:17.301735",
+ "modified_by": "Administrator",
+ "module": "Hub Node",
+ "name": "hub",
+ "owner": "Administrator",
+ "page_name": "hub",
+ "roles": [
+ {
+ "role": "All"
+ }
+ ],
+ "script": null,
+ "standard": "Yes",
+ "style": null,
+ "title": "Hub"
+}
\ No newline at end of file
diff --git a/erpnext/hub_node/page/hub/hub_body.html b/erpnext/hub_node/page/hub/hub_body.html
new file mode 100644
index 0000000..e415f7e
--- /dev/null
+++ b/erpnext/hub_node/page/hub/hub_body.html
@@ -0,0 +1,20 @@
+<div class="padding">
+ <div class="row">
+ <div class="col-md-4 col-md-offset-4">
+ <input class="form-control" name="search" placeholder="{%= __("Search") %}">
+ </div>
+ </div>
+ <hr style="margin: 15px -15px">
+ <div class="hub-list">
+
+ </div>
+ <div class="loading">
+ <p class="text-muted text-center">{%= __("Loading...") %}</p>
+ </div>
+ <div class="more text-center hide">
+ <button class="btn btn-default btn-sm">{%= __("More") %}</div>
+ </div>
+ <div class="done text-center text-extra-muted hide">
+ <p>{%= __("No more results.") %}</p>
+ </div>
+</div>
diff --git a/erpnext/hub_node/page/hub/hub_list.html b/erpnext/hub_node/page/hub/hub_list.html
new file mode 100644
index 0000000..036ef2b
--- /dev/null
+++ b/erpnext/hub_node/page/hub/hub_list.html
@@ -0,0 +1,16 @@
+{% for(var i=0, l=items.length; i < l; i++) { %}
+<div class="list-item">
+ <div class="row">
+ <div class="col-sm-6">
+ <h6>{%= items[i].item_name %}<h6>
+ </div>
+ <div class="col-sm-3">
+ <h6>{%= items[i].seller_name %}<h6>
+ </div>
+ <div class="col-sm-3 text-right">
+ <h6 class="text-muted">{%= items[i].seller_country %}<h6>
+ </div>
+ </div>
+ <p class="text-muted small">{%= items[i].description %}</p>
+</div>
+{% } %}
diff --git a/erpnext/hub_node/page/hub/register_in_hub.html b/erpnext/hub_node/page/hub/register_in_hub.html
new file mode 100644
index 0000000..96b1fb3
--- /dev/null
+++ b/erpnext/hub_node/page/hub/register_in_hub.html
@@ -0,0 +1,19 @@
+<div style="padding: 70px 0px;">
+ <h2 class="text-center">{%= __("Register For ERPNext Hub") %}</h2>
+ <br>
+ <div class="row">
+ <div class="col-md-6 col-md-offset-3">
+ <ul>
+ <li>Free listing of your products</li>
+ <li>Let other ERPNext users discover your products</li>
+ <li>Discover products quickly</li>
+ <li>Automate workflow with Supplier from within ERPNext (later)</li>
+ </ul>
+ </div>
+ </div>
+ <br>
+ <div class="text-center">
+ <a class="btn btn-primary" href="#Form/Hub Settings">
+ Hub Settings</a>
+ </div>
+</div>
diff --git a/erpnext/modules.txt b/erpnext/modules.txt
index 255fbc5..67c856d 100644
--- a/erpnext/modules.txt
+++ b/erpnext/modules.txt
@@ -11,3 +11,4 @@
Utilities
Contacts
Shopping Cart
+Hub Node
diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json
index c2f2a9b..81d6fd0 100644
--- a/erpnext/stock/doctype/item/item.json
+++ b/erpnext/stock/doctype/item/item.json
@@ -1,944 +1,962 @@
{
- "allow_import": 1,
- "allow_rename": 1,
- "autoname": "field:item_code",
- "creation": "2013-05-03 10:45:46",
- "default_print_format": "Standard",
- "description": "A Product or a Service that is bought, sold or kept in stock.",
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Master",
+ "allow_import": 1,
+ "allow_rename": 1,
+ "autoname": "field:item_code",
+ "creation": "2013-05-03 10:45:46",
+ "default_print_format": "Standard",
+ "description": "A Product or a Service that is bought, sold or kept in stock.",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Master",
"fields": [
{
- "fieldname": "name_and_description_section",
- "fieldtype": "Section Break",
- "label": "Name and Description",
- "no_copy": 0,
- "oldfieldtype": "Section Break",
- "options": "icon-flag",
- "permlevel": 0,
+ "fieldname": "name_and_description_section",
+ "fieldtype": "Section Break",
+ "label": "Name and Description",
+ "no_copy": 0,
+ "oldfieldtype": "Section Break",
+ "options": "icon-flag",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "naming_series",
- "fieldtype": "Select",
- "label": "Series",
- "options": "ITEM-",
- "permlevel": 0,
+ "fieldname": "naming_series",
+ "fieldtype": "Select",
+ "label": "Series",
+ "options": "ITEM-",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "description": "Item will be saved by this name in the data base.",
- "fieldname": "item_code",
- "fieldtype": "Data",
- "in_filter": 0,
- "label": "Item Code",
- "no_copy": 1,
- "oldfieldname": "item_code",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "read_only": 0,
- "reqd": 0,
+ "description": "Item will be saved by this name in the data base.",
+ "fieldname": "item_code",
+ "fieldtype": "Data",
+ "in_filter": 0,
+ "label": "Item Code",
+ "no_copy": 1,
+ "oldfieldname": "item_code",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "read_only": 0,
+ "reqd": 0,
"search_index": 0
- },
+ },
{
- "depends_on": "variant_of",
- "description": "If item is a variant of another item then description, image, pricing, taxes etc will be set from the template unless explicitly specified",
- "fieldname": "variant_of",
- "fieldtype": "Link",
- "label": "Variant Of",
- "options": "Item",
- "permlevel": 0,
- "precision": "",
+ "depends_on": "variant_of",
+ "description": "If item is a variant of another item then description, image, pricing, taxes etc will be set from the template unless explicitly specified",
+ "fieldname": "variant_of",
+ "fieldtype": "Link",
+ "label": "Variant Of",
+ "options": "Item",
+ "permlevel": 0,
+ "precision": "",
"read_only": 1
- },
+ },
{
- "fieldname": "item_name",
- "fieldtype": "Data",
- "in_filter": 1,
- "in_list_view": 0,
- "label": "Item Name",
- "oldfieldname": "item_name",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "read_only": 0,
- "reqd": 1,
+ "fieldname": "item_name",
+ "fieldtype": "Data",
+ "in_filter": 1,
+ "in_list_view": 0,
+ "label": "Item Name",
+ "oldfieldname": "item_name",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "read_only": 0,
+ "reqd": 1,
"search_index": 1
- },
+ },
{
- "description": "",
- "fieldname": "item_group",
- "fieldtype": "Link",
- "in_filter": 1,
- "in_list_view": 1,
- "label": "Item Group",
- "oldfieldname": "item_group",
- "oldfieldtype": "Link",
- "options": "Item Group",
- "permlevel": 0,
- "read_only": 0,
+ "description": "",
+ "fieldname": "item_group",
+ "fieldtype": "Link",
+ "in_filter": 1,
+ "in_list_view": 1,
+ "label": "Item Group",
+ "oldfieldname": "item_group",
+ "oldfieldtype": "Link",
+ "options": "Item Group",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "fieldname": "column_break0",
- "fieldtype": "Column Break",
- "permlevel": 0,
+ "fieldname": "column_break0",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "description": "Unit of measurement of this item (e.g. Kg, Unit, No, Pair).",
- "fieldname": "stock_uom",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Default Unit of Measure",
- "oldfieldname": "stock_uom",
- "oldfieldtype": "Link",
- "options": "UOM",
- "permlevel": 0,
- "read_only": 0,
+ "description": "Unit of measurement of this item (e.g. Kg, Unit, No, Pair).",
+ "fieldname": "stock_uom",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Default Unit of Measure",
+ "oldfieldname": "stock_uom",
+ "oldfieldtype": "Link",
+ "options": "UOM",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "fieldname": "brand",
- "fieldtype": "Link",
- "hidden": 0,
- "label": "Brand",
- "oldfieldname": "brand",
- "oldfieldtype": "Link",
- "options": "Brand",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
+ "fieldname": "brand",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "label": "Brand",
+ "oldfieldname": "brand",
+ "oldfieldtype": "Link",
+ "options": "Brand",
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 0,
"reqd": 0
- },
+ },
{
- "fieldname": "barcode",
- "fieldtype": "Data",
- "label": "Barcode",
- "permlevel": 0,
+ "fieldname": "barcode",
+ "fieldtype": "Data",
+ "label": "Barcode",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "section_break_11",
- "fieldtype": "Section Break",
- "permlevel": 0,
+ "fieldname": "section_break_11",
+ "fieldtype": "Section Break",
+ "permlevel": 0,
"precision": ""
- },
+ },
{
- "fieldname": "description",
- "fieldtype": "Text Editor",
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Description",
- "oldfieldname": "description",
- "oldfieldtype": "Text",
- "permlevel": 0,
- "read_only": 0,
- "reqd": 1,
+ "fieldname": "description",
+ "fieldtype": "Text Editor",
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Description",
+ "oldfieldname": "description",
+ "oldfieldtype": "Text",
+ "permlevel": 0,
+ "read_only": 0,
+ "reqd": 1,
"search_index": 0
- },
+ },
{
- "fieldname": "column_break_13",
- "fieldtype": "Column Break",
- "permlevel": 0,
+ "fieldname": "column_break_13",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
"precision": ""
- },
+ },
{
- "fieldname": "image",
- "fieldtype": "Attach",
- "label": "Image",
- "options": "",
- "permlevel": 0,
+ "fieldname": "image",
+ "fieldtype": "Attach",
+ "label": "Image",
+ "options": "",
+ "permlevel": 0,
"precision": ""
- },
+ },
{
- "fieldname": "image_view",
- "fieldtype": "Image",
- "in_list_view": 1,
- "label": "Image View",
- "options": "image",
- "permlevel": 0,
+ "fieldname": "image_view",
+ "fieldtype": "Image",
+ "in_list_view": 1,
+ "label": "Image View",
+ "options": "image",
+ "permlevel": 0,
"precision": ""
- },
+ },
{
- "fieldname": "variants_section",
- "fieldtype": "Section Break",
- "label": "Variants",
- "permlevel": 0,
+ "fieldname": "variants_section",
+ "fieldtype": "Section Break",
+ "label": "Variants",
+ "permlevel": 0,
"precision": ""
- },
+ },
{
- "description": "Automatically set. If this item has variants, then it cannot be selected in sales orders etc.",
- "fieldname": "has_variants",
- "fieldtype": "Check",
- "label": "Has Variants",
- "options": "",
- "permlevel": 0,
- "precision": "",
+ "description": "Automatically set. If this item has variants, then it cannot be selected in sales orders etc.",
+ "fieldname": "has_variants",
+ "fieldtype": "Check",
+ "label": "Has Variants",
+ "options": "",
+ "permlevel": 0,
+ "precision": "",
"read_only": 0
- },
+ },
{
- "depends_on": "has_variants",
- "description": "A new variant (Item) will be created for each attribute value combination",
- "fieldname": "variants",
- "fieldtype": "Table",
- "label": "Variants",
- "options": "Item Variant",
- "permlevel": 0,
+ "depends_on": "has_variants",
+ "description": "A new variant (Item) will be created for each attribute value combination",
+ "fieldname": "variants",
+ "fieldtype": "Table",
+ "label": "Variants",
+ "options": "Item Variant",
+ "permlevel": 0,
"precision": ""
- },
+ },
{
- "fieldname": "inventory",
- "fieldtype": "Section Break",
- "label": "Inventory",
- "oldfieldtype": "Section Break",
- "options": "icon-truck",
- "permlevel": 0,
+ "fieldname": "inventory",
+ "fieldtype": "Section Break",
+ "label": "Inventory",
+ "oldfieldtype": "Section Break",
+ "options": "icon-truck",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "default": "Yes",
- "description": "Select \"Yes\" if you are maintaining stock of this item in your Inventory.",
- "fieldname": "is_stock_item",
- "fieldtype": "Select",
- "label": "Is Stock Item",
- "oldfieldname": "is_stock_item",
- "oldfieldtype": "Select",
- "options": "Yes\nNo",
- "permlevel": 0,
- "read_only": 0,
+ "default": "Yes",
+ "description": "Select \"Yes\" if you are maintaining stock of this item in your Inventory.",
+ "fieldname": "is_stock_item",
+ "fieldtype": "Select",
+ "label": "Is Stock Item",
+ "oldfieldname": "is_stock_item",
+ "oldfieldtype": "Select",
+ "options": "Yes\nNo",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "depends_on": "",
- "description": "Mandatory if Stock Item is \"Yes\". Also the default warehouse where reserved quantity is set from Sales Order.",
- "fieldname": "default_warehouse",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Default Warehouse",
- "oldfieldname": "default_warehouse",
- "oldfieldtype": "Link",
- "options": "Warehouse",
- "permlevel": 0,
+ "depends_on": "",
+ "description": "Mandatory if Stock Item is \"Yes\". Also the default warehouse where reserved quantity is set from Sales Order.",
+ "fieldname": "default_warehouse",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Default Warehouse",
+ "oldfieldname": "default_warehouse",
+ "oldfieldtype": "Link",
+ "options": "Warehouse",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_stock_item==\"Yes\"",
- "description": "Percentage variation in quantity to be allowed while receiving or delivering this item.",
- "fieldname": "tolerance",
- "fieldtype": "Float",
- "label": "Allowance Percent",
- "oldfieldname": "tolerance",
- "oldfieldtype": "Currency",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_stock_item==\"Yes\"",
+ "description": "Percentage variation in quantity to be allowed while receiving or delivering this item.",
+ "fieldname": "tolerance",
+ "fieldtype": "Float",
+ "label": "Allowance Percent",
+ "oldfieldname": "tolerance",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_stock_item==\"Yes\"",
- "fieldname": "valuation_method",
- "fieldtype": "Select",
- "label": "Valuation Method",
- "options": "\nFIFO\nMoving Average",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_stock_item==\"Yes\"",
+ "fieldname": "valuation_method",
+ "fieldtype": "Select",
+ "label": "Valuation Method",
+ "options": "\nFIFO\nMoving Average",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "default": "0.00",
- "depends_on": "eval:doc.is_stock_item==\"Yes\"",
- "description": "You can enter the minimum quantity of this item to be ordered.",
- "fieldname": "min_order_qty",
- "fieldtype": "Float",
- "hidden": 0,
- "label": "Minimum Order Qty",
- "oldfieldname": "min_order_qty",
- "oldfieldtype": "Currency",
- "permlevel": 0,
+ "default": "0.00",
+ "depends_on": "eval:doc.is_stock_item==\"Yes\"",
+ "description": "You can enter the minimum quantity of this item to be ordered.",
+ "fieldname": "min_order_qty",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "label": "Minimum Order Qty",
+ "oldfieldname": "min_order_qty",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_stock_item==\"Yes\"",
- "fieldname": "column_break1",
- "fieldtype": "Column Break",
- "oldfieldtype": "Column Break",
- "permlevel": 0,
- "read_only": 0,
+ "depends_on": "eval:doc.is_stock_item==\"Yes\"",
+ "fieldname": "column_break1",
+ "fieldtype": "Column Break",
+ "oldfieldtype": "Column Break",
+ "permlevel": 0,
+ "read_only": 0,
"width": "50%"
- },
+ },
{
- "default": "No",
- "depends_on": "eval:doc.is_stock_item==\"Yes\"",
- "description": "Select \"Yes\" if this item is used for some internal purpose in your company.",
- "fieldname": "is_asset_item",
- "fieldtype": "Select",
- "label": "Is Fixed Asset Item",
- "oldfieldname": "is_asset_item",
- "oldfieldtype": "Select",
- "options": "Yes\nNo",
- "permlevel": 0,
- "read_only": 0,
+ "default": "No",
+ "depends_on": "eval:doc.is_stock_item==\"Yes\"",
+ "description": "Select \"Yes\" if this item is used for some internal purpose in your company.",
+ "fieldname": "is_asset_item",
+ "fieldtype": "Select",
+ "label": "Is Fixed Asset Item",
+ "oldfieldname": "is_asset_item",
+ "oldfieldtype": "Select",
+ "options": "Yes\nNo",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "default": "No",
- "depends_on": "eval:doc.is_stock_item==\"Yes\"",
- "fieldname": "has_batch_no",
- "fieldtype": "Select",
- "label": "Has Batch No",
- "oldfieldname": "has_batch_no",
- "oldfieldtype": "Select",
- "options": "Yes\nNo",
- "permlevel": 0,
- "read_only": 0,
+ "default": "No",
+ "depends_on": "eval:doc.is_stock_item==\"Yes\"",
+ "fieldname": "has_batch_no",
+ "fieldtype": "Select",
+ "label": "Has Batch No",
+ "oldfieldname": "has_batch_no",
+ "oldfieldtype": "Select",
+ "options": "Yes\nNo",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "default": "No",
- "depends_on": "eval:doc.is_stock_item==\"Yes\"",
- "description": "Selecting \"Yes\" will give a unique identity to each entity of this item which can be viewed in the Serial No master.",
- "fieldname": "has_serial_no",
- "fieldtype": "Select",
- "in_filter": 1,
- "label": "Has Serial No",
- "oldfieldname": "has_serial_no",
- "oldfieldtype": "Select",
- "options": "Yes\nNo",
- "permlevel": 0,
- "read_only": 0,
+ "default": "No",
+ "depends_on": "eval:doc.is_stock_item==\"Yes\"",
+ "description": "Selecting \"Yes\" will give a unique identity to each entity of this item which can be viewed in the Serial No master.",
+ "fieldname": "has_serial_no",
+ "fieldtype": "Select",
+ "in_filter": 1,
+ "label": "Has Serial No",
+ "oldfieldname": "has_serial_no",
+ "oldfieldtype": "Select",
+ "options": "Yes\nNo",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "depends_on": "eval: doc.has_serial_no===\"Yes\"",
- "description": "Example: ABCD.#####\nIf series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.",
- "fieldname": "serial_no_series",
- "fieldtype": "Data",
- "label": "Serial Number Series",
- "no_copy": 0,
+ "depends_on": "eval: doc.has_serial_no===\"Yes\"",
+ "description": "Example: ABCD.#####\nIf series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.",
+ "fieldname": "serial_no_series",
+ "fieldtype": "Data",
+ "label": "Serial Number Series",
+ "no_copy": 0,
"permlevel": 0
- },
+ },
{
- "depends_on": "eval:doc.is_stock_item==\"Yes\"",
- "fieldname": "warranty_period",
- "fieldtype": "Data",
- "label": "Warranty Period (in days)",
- "oldfieldname": "warranty_period",
- "oldfieldtype": "Data",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_stock_item==\"Yes\"",
+ "fieldname": "warranty_period",
+ "fieldtype": "Data",
+ "label": "Warranty Period (in days)",
+ "oldfieldname": "warranty_period",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_stock_item==\"Yes\"",
- "fieldname": "end_of_life",
- "fieldtype": "Date",
- "label": "End of Life",
- "oldfieldname": "end_of_life",
- "oldfieldtype": "Date",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_stock_item==\"Yes\"",
+ "fieldname": "end_of_life",
+ "fieldtype": "Date",
+ "label": "End of Life",
+ "oldfieldname": "end_of_life",
+ "oldfieldtype": "Date",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_stock_item==\"Yes\"",
- "description": "Net Weight of each Item",
- "fieldname": "net_weight",
- "fieldtype": "Float",
- "label": "Net Weight",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_stock_item==\"Yes\"",
+ "description": "Net Weight of each Item",
+ "fieldname": "net_weight",
+ "fieldtype": "Float",
+ "label": "Net Weight",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_stock_item==\"Yes\"",
- "fieldname": "weight_uom",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Weight UOM",
- "options": "UOM",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_stock_item==\"Yes\"",
+ "fieldname": "weight_uom",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Weight UOM",
+ "options": "UOM",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_stock_item==\"Yes\"",
- "description": "Auto-raise Material Request if quantity goes below re-order level in default warehouse",
- "fieldname": "reorder_section",
- "fieldtype": "Section Break",
- "label": "Re-order",
- "options": "icon-rss",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_stock_item==\"Yes\"",
+ "description": "Auto-raise Material Request if quantity goes below re-order level in default warehouse",
+ "fieldname": "reorder_section",
+ "fieldtype": "Section Break",
+ "label": "Re-order",
+ "options": "icon-rss",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:(doc.is_stock_item==\"Yes\" && !doc.apply_warehouse_wise_reorder_level)",
- "fieldname": "re_order_level",
- "fieldtype": "Float",
- "label": "Re-Order Level",
- "oldfieldname": "re_order_level",
- "oldfieldtype": "Currency",
- "permlevel": 0,
+ "depends_on": "eval:(doc.is_stock_item==\"Yes\" && !doc.apply_warehouse_wise_reorder_level)",
+ "fieldname": "re_order_level",
+ "fieldtype": "Float",
+ "label": "Re-Order Level",
+ "oldfieldname": "re_order_level",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:(doc.is_stock_item==\"Yes\" && !doc.apply_warehouse_wise_reorder_level)",
- "fieldname": "re_order_qty",
- "fieldtype": "Float",
- "label": "Re-Order Qty",
- "permlevel": 0,
+ "depends_on": "eval:(doc.is_stock_item==\"Yes\" && !doc.apply_warehouse_wise_reorder_level)",
+ "fieldname": "re_order_qty",
+ "fieldtype": "Float",
+ "label": "Re-Order Qty",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_stock_item==\"Yes\"",
- "fieldname": "apply_warehouse_wise_reorder_level",
- "fieldtype": "Check",
- "label": "Apply Warehouse-wise Reorder Level",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_stock_item==\"Yes\"",
+ "fieldname": "apply_warehouse_wise_reorder_level",
+ "fieldtype": "Check",
+ "label": "Apply Warehouse-wise Reorder Level",
+ "permlevel": 0,
"precision": ""
- },
+ },
{
- "depends_on": "eval:(doc.is_stock_item==\"Yes\" && doc.apply_warehouse_wise_reorder_level)",
- "fieldname": "section_break_31",
- "fieldtype": "Section Break",
- "permlevel": 0,
+ "depends_on": "eval:(doc.is_stock_item==\"Yes\" && doc.apply_warehouse_wise_reorder_level)",
+ "fieldname": "section_break_31",
+ "fieldtype": "Section Break",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:(doc.is_stock_item==\"Yes\" && doc.apply_warehouse_wise_reorder_level)",
- "description": "Will also apply for variants unless overrridden",
- "fieldname": "reorder_levels",
- "fieldtype": "Table",
- "label": "Warehouse-wise Reorder Levels",
- "options": "Item Reorder",
- "permlevel": 0,
+ "depends_on": "eval:(doc.is_stock_item==\"Yes\" && doc.apply_warehouse_wise_reorder_level)",
+ "description": "Will also apply for variants unless overrridden",
+ "fieldname": "reorder_levels",
+ "fieldtype": "Table",
+ "label": "Warehouse-wise Reorder Levels",
+ "options": "Item Reorder",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "purchase_details",
- "fieldtype": "Section Break",
- "label": "Purchase Details",
- "oldfieldtype": "Section Break",
- "options": "icon-shopping-cart",
- "permlevel": 0,
+ "fieldname": "purchase_details",
+ "fieldtype": "Section Break",
+ "label": "Purchase Details",
+ "oldfieldtype": "Section Break",
+ "options": "icon-shopping-cart",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "default": "Yes",
- "description": "Selecting \"Yes\" will allow this item to appear in Purchase Order , Purchase Receipt.",
- "fieldname": "is_purchase_item",
- "fieldtype": "Select",
- "label": "Is Purchase Item",
- "oldfieldname": "is_purchase_item",
- "oldfieldtype": "Select",
- "options": "Yes\nNo",
- "permlevel": 0,
- "read_only": 0,
+ "default": "Yes",
+ "description": "Selecting \"Yes\" will allow this item to appear in Purchase Order , Purchase Receipt.",
+ "fieldname": "is_purchase_item",
+ "fieldtype": "Select",
+ "label": "Is Purchase Item",
+ "oldfieldname": "is_purchase_item",
+ "oldfieldtype": "Select",
+ "options": "Yes\nNo",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "fieldname": "default_supplier",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Default Supplier",
- "options": "Supplier",
+ "fieldname": "default_supplier",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Default Supplier",
+ "options": "Supplier",
"permlevel": 0
- },
+ },
{
- "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
- "description": "Lead Time days is number of days by which this item is expected in your warehouse. This days is fetched in Material Request when you select this item.",
- "fieldname": "lead_time_days",
- "fieldtype": "Int",
- "label": "Lead Time Days",
- "no_copy": 0,
- "oldfieldname": "lead_time_days",
- "oldfieldtype": "Int",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
+ "description": "Lead Time days is number of days by which this item is expected in your warehouse. This days is fetched in Material Request when you select this item.",
+ "fieldname": "lead_time_days",
+ "fieldtype": "Int",
+ "label": "Lead Time Days",
+ "no_copy": 0,
+ "oldfieldname": "lead_time_days",
+ "oldfieldtype": "Int",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
- "description": "Default Purchase Account in which cost of the item will be debited.",
- "fieldname": "expense_account",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Default Expense Account",
- "oldfieldname": "purchase_account",
- "oldfieldtype": "Link",
- "options": "Account",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
+ "description": "Default Purchase Account in which cost of the item will be debited.",
+ "fieldname": "expense_account",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Default Expense Account",
+ "oldfieldname": "purchase_account",
+ "oldfieldtype": "Link",
+ "options": "Account",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
- "description": "",
- "fieldname": "buying_cost_center",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Default Buying Cost Center",
- "oldfieldname": "cost_center",
- "oldfieldtype": "Link",
- "options": "Cost Center",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
+ "description": "",
+ "fieldname": "buying_cost_center",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Default Buying Cost Center",
+ "oldfieldname": "cost_center",
+ "oldfieldtype": "Link",
+ "options": "Cost Center",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
- "fieldname": "last_purchase_rate",
- "fieldtype": "Float",
- "label": "Last Purchase Rate",
- "no_copy": 1,
- "oldfieldname": "last_purchase_rate",
- "oldfieldtype": "Currency",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
+ "fieldname": "last_purchase_rate",
+ "fieldtype": "Float",
+ "label": "Last Purchase Rate",
+ "no_copy": 1,
+ "oldfieldname": "last_purchase_rate",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
"read_only": 1
- },
+ },
{
- "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
- "fieldname": "column_break2",
- "fieldtype": "Column Break",
- "oldfieldtype": "Column Break",
- "permlevel": 0,
- "read_only": 0,
+ "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
+ "fieldname": "column_break2",
+ "fieldtype": "Column Break",
+ "oldfieldtype": "Column Break",
+ "permlevel": 0,
+ "read_only": 0,
"width": "50%"
- },
+ },
{
- "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
- "description": "Will also apply for variants",
- "fieldname": "uoms",
- "fieldtype": "Table",
- "label": "UOMs",
- "no_copy": 1,
- "oldfieldname": "uom_conversion_details",
- "oldfieldtype": "Table",
- "options": "UOM Conversion Detail",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
+ "description": "Will also apply for variants",
+ "fieldname": "uoms",
+ "fieldtype": "Table",
+ "label": "UOMs",
+ "no_copy": 1,
+ "oldfieldname": "uom_conversion_details",
+ "oldfieldtype": "Table",
+ "options": "UOM Conversion Detail",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
- "fieldname": "manufacturer",
- "fieldtype": "Data",
- "label": "Manufacturer",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
+ "fieldname": "manufacturer",
+ "fieldtype": "Data",
+ "label": "Manufacturer",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
- "fieldname": "manufacturer_part_no",
- "fieldtype": "Data",
- "label": "Manufacturer Part Number",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
+ "fieldname": "manufacturer_part_no",
+ "fieldtype": "Data",
+ "label": "Manufacturer Part Number",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
- "fieldname": "supplier_items",
- "fieldtype": "Table",
- "label": "Supplier Items",
- "options": "Item Supplier",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_purchase_item==\"Yes\"",
+ "fieldname": "supplier_items",
+ "fieldtype": "Table",
+ "label": "Supplier Items",
+ "options": "Item Supplier",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "sales_details",
- "fieldtype": "Section Break",
- "label": "Sales Details",
- "oldfieldtype": "Section Break",
- "options": "icon-tag",
- "permlevel": 0,
+ "fieldname": "sales_details",
+ "fieldtype": "Section Break",
+ "label": "Sales Details",
+ "oldfieldtype": "Section Break",
+ "options": "icon-tag",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "default": "Yes",
- "description": "Selecting \"Yes\" will allow this item to figure in Sales Order, Delivery Note",
- "fieldname": "is_sales_item",
- "fieldtype": "Select",
- "in_filter": 1,
- "label": "Is Sales Item",
- "oldfieldname": "is_sales_item",
- "oldfieldtype": "Select",
- "options": "Yes\nNo",
- "permlevel": 0,
- "read_only": 0,
+ "default": "Yes",
+ "description": "Selecting \"Yes\" will allow this item to figure in Sales Order, Delivery Note",
+ "fieldname": "is_sales_item",
+ "fieldtype": "Select",
+ "in_filter": 1,
+ "label": "Is Sales Item",
+ "oldfieldname": "is_sales_item",
+ "oldfieldtype": "Select",
+ "options": "Yes\nNo",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "default": "No",
- "depends_on": "eval:doc.is_sales_item==\"Yes\"",
- "description": "Select \"Yes\" if this item represents some work like training, designing, consulting etc.",
- "fieldname": "is_service_item",
- "fieldtype": "Select",
- "in_filter": 1,
- "label": "Is Service Item",
- "oldfieldname": "is_service_item",
- "oldfieldtype": "Select",
- "options": "Yes\nNo",
- "permlevel": 0,
- "read_only": 0,
+ "default": "No",
+ "depends_on": "eval:doc.is_sales_item==\"Yes\"",
+ "description": "Select \"Yes\" if this item represents some work like training, designing, consulting etc.",
+ "fieldname": "is_service_item",
+ "fieldtype": "Select",
+ "in_filter": 1,
+ "label": "Is Service Item",
+ "oldfieldname": "is_service_item",
+ "oldfieldtype": "Select",
+ "options": "Yes\nNo",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "depends_on": "eval:doc.is_sales_item==\"Yes\"",
- "fieldname": "max_discount",
- "fieldtype": "Float",
- "label": "Max Discount (%)",
- "oldfieldname": "max_discount",
- "oldfieldtype": "Currency",
- "permlevel": 0,
+ "default": "0",
+ "description": "Publish Item to hub.erpnext.com",
+ "fieldname": "publish_in_hub",
+ "fieldtype": "Check",
+ "label": "Publish in Hub",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
+ "default": "0",
+ "fieldname": "synced_with_hub",
+ "fieldtype": "Check",
+ "hidden": 1,
+ "label": "Synced With Hub",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
+ "depends_on": "eval:doc.is_sales_item==\"Yes\"",
+ "fieldname": "max_discount",
+ "fieldtype": "Float",
+ "label": "Max Discount (%)",
+ "oldfieldname": "max_discount",
+ "oldfieldtype": "Currency",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_sales_item==\"Yes\"",
- "fieldname": "income_account",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Default Income Account",
- "options": "Account",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_sales_item==\"Yes\"",
+ "fieldname": "income_account",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Default Income Account",
+ "options": "Account",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_sales_item==\"Yes\"",
- "fieldname": "selling_cost_center",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Default Selling Cost Center",
- "options": "Cost Center",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_sales_item==\"Yes\"",
+ "fieldname": "selling_cost_center",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Default Selling Cost Center",
+ "options": "Cost Center",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "eval:doc.is_sales_item==\"Yes\"",
- "fieldname": "column_break3",
- "fieldtype": "Column Break",
- "oldfieldtype": "Column Break",
- "permlevel": 0,
- "read_only": 0,
+ "depends_on": "eval:doc.is_sales_item==\"Yes\"",
+ "fieldname": "column_break3",
+ "fieldtype": "Column Break",
+ "oldfieldtype": "Column Break",
+ "permlevel": 0,
+ "read_only": 0,
"width": "50%"
- },
+ },
{
- "depends_on": "eval:doc.is_sales_item==\"Yes\"",
- "description": "For the convenience of customers, these codes can be used in print formats like Invoices and Delivery Notes",
- "fieldname": "customer_items",
- "fieldtype": "Table",
- "label": "Customer Items",
- "options": "Item Customer Detail",
- "permlevel": 0,
+ "depends_on": "eval:doc.is_sales_item==\"Yes\"",
+ "description": "For the convenience of customers, these codes can be used in print formats like Invoices and Delivery Notes",
+ "fieldname": "customer_items",
+ "fieldtype": "Table",
+ "label": "Customer Items",
+ "options": "Item Customer Detail",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "item_tax_section_break",
- "fieldtype": "Section Break",
- "label": "Item Tax",
- "oldfieldtype": "Section Break",
- "options": "icon-money",
- "permlevel": 0,
+ "fieldname": "item_tax_section_break",
+ "fieldtype": "Section Break",
+ "label": "Item Tax",
+ "oldfieldtype": "Section Break",
+ "options": "icon-money",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "description": "Will also apply for variants",
- "fieldname": "taxes",
- "fieldtype": "Table",
- "label": "Taxes",
- "oldfieldname": "item_tax",
- "oldfieldtype": "Table",
- "options": "Item Tax",
- "permlevel": 0,
+ "description": "Will also apply for variants",
+ "fieldname": "taxes",
+ "fieldtype": "Table",
+ "label": "Taxes",
+ "oldfieldname": "item_tax",
+ "oldfieldtype": "Table",
+ "options": "Item Tax",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "inspection_criteria",
- "fieldtype": "Section Break",
- "label": "Inspection Criteria",
- "oldfieldtype": "Section Break",
- "options": "icon-search",
- "permlevel": 0,
+ "fieldname": "inspection_criteria",
+ "fieldtype": "Section Break",
+ "label": "Inspection Criteria",
+ "oldfieldtype": "Section Break",
+ "options": "icon-search",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "default": "No",
- "fieldname": "inspection_required",
- "fieldtype": "Select",
- "label": "Inspection Required",
- "no_copy": 0,
- "oldfieldname": "inspection_required",
- "oldfieldtype": "Select",
- "options": "\nYes\nNo",
- "permlevel": 0,
- "read_only": 0,
+ "default": "No",
+ "fieldname": "inspection_required",
+ "fieldtype": "Select",
+ "label": "Inspection Required",
+ "no_copy": 0,
+ "oldfieldname": "inspection_required",
+ "oldfieldtype": "Select",
+ "options": "\nYes\nNo",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "depends_on": "eval:doc.inspection_required==\"Yes\"",
- "description": "Will also apply to variants",
- "fieldname": "quality_parameters",
- "fieldtype": "Table",
- "label": "Quality Parameters",
- "oldfieldname": "item_specification_details",
- "oldfieldtype": "Table",
- "options": "Item Quality Inspection Parameter",
- "permlevel": 0,
+ "depends_on": "eval:doc.inspection_required==\"Yes\"",
+ "description": "Will also apply to variants",
+ "fieldname": "quality_parameters",
+ "fieldtype": "Table",
+ "label": "Quality Parameters",
+ "oldfieldname": "item_specification_details",
+ "oldfieldtype": "Table",
+ "options": "Item Quality Inspection Parameter",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "manufacturing",
- "fieldtype": "Section Break",
- "label": "Manufacturing",
- "oldfieldtype": "Section Break",
- "options": "icon-cogs",
- "permlevel": 0,
+ "fieldname": "manufacturing",
+ "fieldtype": "Section Break",
+ "label": "Manufacturing",
+ "oldfieldtype": "Section Break",
+ "options": "icon-cogs",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "",
- "fieldname": "default_bom",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Default BOM",
- "no_copy": 1,
- "oldfieldname": "default_bom",
- "oldfieldtype": "Link",
- "options": "BOM",
- "permlevel": 0,
+ "depends_on": "",
+ "fieldname": "default_bom",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Default BOM",
+ "no_copy": 1,
+ "oldfieldname": "default_bom",
+ "oldfieldtype": "Link",
+ "options": "BOM",
+ "permlevel": 0,
"read_only": 1
- },
+ },
{
- "default": "No",
- "depends_on": "",
- "description": "Selecting \"Yes\" will allow you to make a Production Order for this item.",
- "fieldname": "is_pro_applicable",
- "fieldtype": "Select",
- "label": "Allow Production Order",
- "oldfieldname": "is_pro_applicable",
- "oldfieldtype": "Select",
- "options": "Yes\nNo",
- "permlevel": 0,
- "read_only": 0,
+ "default": "No",
+ "depends_on": "",
+ "description": "Selecting \"Yes\" will allow you to make a Production Order for this item.",
+ "fieldname": "is_pro_applicable",
+ "fieldtype": "Select",
+ "label": "Allow Production Order",
+ "oldfieldname": "is_pro_applicable",
+ "oldfieldtype": "Select",
+ "options": "Yes\nNo",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "default": "No",
- "description": "Select \"Yes\" if you supply raw materials to your supplier to manufacture this item.",
- "fieldname": "is_sub_contracted_item",
- "fieldtype": "Select",
- "label": "Is Sub Contracted Item",
- "oldfieldname": "is_sub_contracted_item",
- "oldfieldtype": "Select",
- "options": "Yes\nNo",
- "permlevel": 0,
- "read_only": 0,
+ "default": "No",
+ "description": "Select \"Yes\" if you supply raw materials to your supplier to manufacture this item.",
+ "fieldname": "is_sub_contracted_item",
+ "fieldtype": "Select",
+ "label": "Is Sub Contracted Item",
+ "oldfieldname": "is_sub_contracted_item",
+ "oldfieldtype": "Select",
+ "options": "Yes\nNo",
+ "permlevel": 0,
+ "read_only": 0,
"reqd": 1
- },
+ },
{
- "fieldname": "customer_code",
- "fieldtype": "Data",
- "hidden": 1,
- "in_filter": 1,
- "label": "Customer Code",
- "no_copy": 1,
- "permlevel": 0,
- "print_hide": 1,
+ "fieldname": "customer_code",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "in_filter": 1,
+ "label": "Customer Code",
+ "no_copy": 1,
+ "permlevel": 0,
+ "print_hide": 1,
"read_only": 0
- },
+ },
{
- "fieldname": "website_section",
- "fieldtype": "Section Break",
- "label": "Website",
- "options": "icon-globe",
- "permlevel": 0,
+ "fieldname": "website_section",
+ "fieldtype": "Section Break",
+ "label": "Website",
+ "options": "icon-globe",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "show_in_website",
- "fieldtype": "Check",
- "label": "Show in Website",
- "permlevel": 0,
+ "fieldname": "show_in_website",
+ "fieldtype": "Check",
+ "label": "Show in Website",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "show_in_website",
- "description": "website page link",
- "fieldname": "page_name",
- "fieldtype": "Data",
- "label": "Page Name",
- "no_copy": 1,
- "permlevel": 0,
+ "depends_on": "show_in_website",
+ "description": "website page link",
+ "fieldname": "page_name",
+ "fieldtype": "Data",
+ "label": "Page Name",
+ "no_copy": 1,
+ "permlevel": 0,
"read_only": 1
- },
+ },
{
- "depends_on": "show_in_website",
- "description": "Products will be sorted by weight-age in default searches. More the weight-age, higher the product will appear in the list.",
- "fieldname": "weightage",
- "fieldtype": "Int",
- "label": "Weightage",
- "permlevel": 0,
- "read_only": 0,
+ "depends_on": "show_in_website",
+ "description": "Products will be sorted by weight-age in default searches. More the weight-age, higher the product will appear in the list.",
+ "fieldname": "weightage",
+ "fieldtype": "Int",
+ "label": "Weightage",
+ "permlevel": 0,
+ "read_only": 0,
"search_index": 1
- },
+ },
{
- "depends_on": "show_in_website",
- "description": "Show a slideshow at the top of the page",
- "fieldname": "slideshow",
- "fieldtype": "Link",
- "label": "Slideshow",
- "options": "Website Slideshow",
- "permlevel": 0,
+ "depends_on": "show_in_website",
+ "description": "Show a slideshow at the top of the page",
+ "fieldname": "slideshow",
+ "fieldtype": "Link",
+ "label": "Slideshow",
+ "options": "Website Slideshow",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "show_in_website",
- "description": "Item Image (if not slideshow)",
- "fieldname": "website_image",
- "fieldtype": "Select",
- "label": "Image",
- "options": "attach_files:",
- "permlevel": 0,
+ "depends_on": "show_in_website",
+ "description": "Item Image (if not slideshow)",
+ "fieldname": "website_image",
+ "fieldtype": "Select",
+ "label": "Image",
+ "options": "attach_files:",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "cb72",
- "fieldtype": "Column Break",
- "permlevel": 0,
+ "fieldname": "cb72",
+ "fieldtype": "Column Break",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "show_in_website",
- "description": "Show \"In Stock\" or \"Not in Stock\" based on stock available in this warehouse.",
- "fieldname": "website_warehouse",
- "fieldtype": "Link",
- "ignore_user_permissions": 1,
- "label": "Website Warehouse",
- "options": "Warehouse",
- "permlevel": 0,
+ "depends_on": "show_in_website",
+ "description": "Show \"In Stock\" or \"Not in Stock\" based on stock available in this warehouse.",
+ "fieldname": "website_warehouse",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Website Warehouse",
+ "options": "Warehouse",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "show_in_website",
- "description": "List this Item in multiple groups on the website.",
- "fieldname": "website_item_groups",
- "fieldtype": "Table",
- "label": "Website Item Groups",
- "options": "Website Item Group",
- "permlevel": 0,
+ "depends_on": "show_in_website",
+ "description": "List this Item in multiple groups on the website.",
+ "fieldname": "website_item_groups",
+ "fieldtype": "Table",
+ "label": "Website Item Groups",
+ "options": "Website Item Group",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "show_in_website",
- "fieldname": "sb72",
- "fieldtype": "Section Break",
- "permlevel": 0,
+ "depends_on": "show_in_website",
+ "fieldname": "sb72",
+ "fieldtype": "Section Break",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "show_in_website",
- "fieldname": "copy_from_item_group",
- "fieldtype": "Button",
- "label": "Copy From Item Group",
- "permlevel": 0,
+ "depends_on": "show_in_website",
+ "fieldname": "copy_from_item_group",
+ "fieldtype": "Button",
+ "label": "Copy From Item Group",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "show_in_website",
- "fieldname": "website_specifications",
- "fieldtype": "Table",
- "label": "Website Specifications",
- "options": "Item Website Specification",
- "permlevel": 0,
+ "depends_on": "show_in_website",
+ "fieldname": "website_specifications",
+ "fieldtype": "Table",
+ "label": "Website Specifications",
+ "options": "Item Website Specification",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "depends_on": "show_in_website",
- "fieldname": "web_long_description",
- "fieldtype": "Text Editor",
- "label": "Website Description",
- "permlevel": 0,
+ "depends_on": "show_in_website",
+ "fieldname": "web_long_description",
+ "fieldtype": "Text Editor",
+ "label": "Website Description",
+ "permlevel": 0,
"read_only": 0
- },
+ },
{
- "fieldname": "parent_website_route",
- "fieldtype": "Read Only",
- "ignore_user_permissions": 1,
- "label": "Parent Website Route",
- "no_copy": 1,
- "options": "",
+ "fieldname": "parent_website_route",
+ "fieldtype": "Read Only",
+ "ignore_user_permissions": 1,
+ "label": "Parent Website Route",
+ "no_copy": 1,
+ "options": "",
"permlevel": 0
}
- ],
- "icon": "icon-tag",
- "idx": 1,
- "max_attachments": 1,
- "modified": "2015-02-10 12:59:15.652054",
- "modified_by": "Administrator",
- "module": "Stock",
- "name": "Item",
- "owner": "Administrator",
+ ],
+ "icon": "icon-tag",
+ "idx": 1,
+ "max_attachments": 1,
+ "modified": "2015-02-18 04:38:59.061328",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Item",
+ "owner": "Administrator",
"permissions": [
{
- "create": 1,
- "delete": 1,
- "email": 1,
- "import": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Material Master Manager",
- "share": 1,
- "submit": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "import": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Material Master Manager",
+ "share": 1,
+ "submit": 0,
"write": 1
- },
+ },
{
- "amend": 0,
- "create": 0,
- "delete": 0,
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Material Manager",
- "submit": 0,
+ "amend": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Material Manager",
+ "submit": 0,
"write": 0
- },
+ },
{
- "amend": 0,
- "apply_user_permissions": 1,
- "create": 0,
- "delete": 0,
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Material User",
- "submit": 0,
+ "amend": 0,
+ "apply_user_permissions": 1,
+ "create": 0,
+ "delete": 0,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Material User",
+ "submit": 0,
"write": 0
- },
+ },
{
- "apply_user_permissions": 1,
- "permlevel": 0,
- "read": 1,
+ "apply_user_permissions": 1,
+ "permlevel": 0,
+ "read": 1,
"role": "Sales User"
- },
+ },
{
- "apply_user_permissions": 1,
- "permlevel": 0,
- "read": 1,
+ "apply_user_permissions": 1,
+ "permlevel": 0,
+ "read": 1,
"role": "Purchase User"
- },
+ },
{
- "apply_user_permissions": 1,
- "permlevel": 0,
- "read": 1,
+ "apply_user_permissions": 1,
+ "permlevel": 0,
+ "read": 1,
"role": "Maintenance User"
- },
+ },
{
- "apply_user_permissions": 1,
- "permlevel": 0,
- "read": 1,
+ "apply_user_permissions": 1,
+ "permlevel": 0,
+ "read": 1,
"role": "Accounts User"
- },
+ },
{
- "apply_user_permissions": 1,
- "permlevel": 0,
- "read": 1,
+ "apply_user_permissions": 1,
+ "permlevel": 0,
+ "read": 1,
"role": "Manufacturing User"
}
- ],
- "search_fields": "item_name,description,item_group,customer_code",
+ ],
+ "search_fields": "item_name,description,item_group,customer_code",
"title_field": "item_name"
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index 351f717..789cbbf 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -34,6 +34,10 @@
self.name = self.item_code
+ def before_insert(self):
+ if self.is_sales_item=="Yes":
+ self.publish_in_hub = 1
+
def validate(self):
super(Item, self).validate()
@@ -58,6 +62,7 @@
self.validate_warehouse_for_reorder()
self.validate_variants()
self.update_item_desc()
+ self.synced_with_hub = 0
if not self.get("__islocal"):
self.old_item_group = frappe.db.get_value(self.doctype, self.name, "item_group")
@@ -434,13 +439,13 @@
row = self.append("website_specifications")
row.label = label
row.description = desc
-
+
def update_item_desc(self):
if frappe.db.get_value('BOM',self.name, 'description') != self.description:
frappe.db.sql("""update `tabBOM` set description = %s where item = %s and docstatus < 2""",(self.description, self.name))
frappe.db.sql("""update `tabBOM Item` set description = %s where item_code = %s and docstatus < 2""",(self.description, self.name))
- frappe.db.sql("""update `tabBOM Explosion Item` set description = %s where item_code = %s and docstatus < 2""",(self.description, self.name))
-
+ frappe.db.sql("""update `tabBOM Explosion Item` set description = %s where item_code = %s and docstatus < 2""",(self.description, self.name))
+
def validate_end_of_life(item_code, end_of_life=None, verbose=1):
if not end_of_life:
end_of_life = frappe.db.get_value("Item", item_code, "end_of_life")
diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json
index ba61981..2a8b54c 100644
--- a/erpnext/stock/doctype/stock_settings/stock_settings.json
+++ b/erpnext/stock/doctype/stock_settings/stock_settings.json
@@ -36,13 +36,6 @@
"permlevel": 0
},
{
- "fieldname": "allow_negative_stock",
- "fieldtype": "Check",
- "in_list_view": 1,
- "label": "Allow Negative Stock",
- "permlevel": 0
- },
- {
"fieldname": "valuation_method",
"fieldtype": "Select",
"label": "Default Valuation Method",
@@ -57,6 +50,13 @@
"permlevel": 0
},
{
+ "fieldname": "allow_negative_stock",
+ "fieldtype": "Check",
+ "in_list_view": 1,
+ "label": "Allow Negative Stock",
+ "permlevel": 0
+ },
+ {
"fieldname": "auto_material_request",
"fieldtype": "Section Break",
"label": "Auto Material Request",
@@ -103,7 +103,7 @@
"icon": "icon-cog",
"idx": 1,
"issingle": 1,
- "modified": "2015-02-05 05:11:47.229371",
+ "modified": "2015-02-18 08:37:18.229705",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Settings",