From 99f75285785f12c57540bb9d5fb154e4abd9ed5b Mon Sep 17 00:00:00 2001 From: Umair Sayyed Date: Thu, 12 May 2016 17:56:23 +0530 Subject: [PATCH] domanifying ERPNext via #5334 --- erpnext/setup/setup_wizard/domainify.py | 14 ++++++++++++-- erpnext/stock/doctype/item/item.json | 8 +++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/erpnext/setup/setup_wizard/domainify.py b/erpnext/setup/setup_wizard/domainify.py index a866869442b..3606c58bc2f 100644 --- a/erpnext/setup/setup_wizard/domainify.py +++ b/erpnext/setup/setup_wizard/domainify.py @@ -7,15 +7,25 @@ import frappe domains = { 'Manufacturing': { 'desktop_icons': ['Item', 'BOM', 'Customer', 'Supplier', 'Sales Order', - 'Production Order', 'Stock Entry', 'Buying', 'Selling', 'Accounts'] + 'Production Order', 'Stock Entry', 'Purchase Order', 'Buying', 'Selling', 'Accounts'], + 'remove_roles': ['Maintenance Manager', 'Maintenance User', 'Support Manager', 'Support Team'], }, + 'Retail': { + 'desktop_icons': ['POS', 'Item', 'Customer', 'Sales Invoice', 'Purchase Order', 'Accounts', + 'Buying'], 'remove_roles': ['Manufacturing User', 'Manufacturing Manager', 'Maintenance User'], - 'desktop_icons': ['POS', 'Item', 'Customer', 'Sales Invoice', 'Accounts'] }, + 'Distribution': { + 'desktop_icons': ['Item', 'Customer', 'Supplier', 'Lead', 'Sales Order', + 'Sales Invoice', 'CRM', 'Selling', 'Buying', 'Stock', 'Accounts'], 'remove_roles': ['Manufacturing User', 'Manufacturing Manager', 'Maintenance User'], + 'properties': [ + {'doctype': 'Item', 'fieldname': 'manufacturing', 'property': 'hidden', 'value': 1}, + ] }, + 'Services': { 'desktop_icons': ['Project', 'Time Log', 'Customer', 'Sales Invoice', 'Lead', 'Opportunity', 'Expense Claim', 'Employee'], diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index 422894945e8..9f2c60c2dae 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -3,6 +3,7 @@ "allow_import": 1, "allow_rename": 1, "autoname": "field:item_code", + "beta": 0, "creation": "2013-05-03 10:45:46", "custom": 0, "default_print_format": "Standard", @@ -280,7 +281,7 @@ "allow_on_submit": 0, "bold": 1, "collapsible": 0, - "depends_on": "__islocal", + "depends_on": "eval:(doc.__islocal&&doc.is_stock_item)", "fieldname": "opening_stock", "fieldtype": "Int", "hidden": 0, @@ -1678,6 +1679,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 1, + "depends_on": "is_stock_item", "fieldname": "manufacturing", "fieldtype": "Section Break", "hidden": 0, @@ -2226,8 +2228,8 @@ "issingle": 0, "istable": 0, "max_attachments": 1, - "modified": "2016-04-15 07:10:24.271815", - "modified_by": "Administrator", + "modified": "2016-05-12 15:33:02.407671", + "modified_by": "umair@erpnext.com", "module": "Stock", "name": "Item", "owner": "Administrator",