From 90cea14ce320916e30cfd8588994d90d884d57bd Mon Sep 17 00:00:00 2001 From: Umair Sayyed Date: Fri, 13 May 2016 18:06:01 +0530 Subject: [PATCH] domanifying EPRNext, fixes #5334 --- .../selling/doctype/customer/customer.json | 6 ++-- erpnext/setup/setup_wizard/domainify.py | 33 ++++++++++++++----- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json index ff47a79ca4..aac9360e72 100644 --- a/erpnext/selling/doctype/customer/customer.json +++ b/erpnext/selling/doctype/customer/customer.json @@ -3,6 +3,7 @@ "allow_import": 1, "allow_rename": 1, "autoname": "naming_series:", + "beta": 0, "creation": "2013-06-11 14:26:44", "custom": 0, "description": "Buyer of Goods and Services.", @@ -605,7 +606,7 @@ "bold": 0, "collapsible": 1, "collapsible_depends_on": "eval:doc.credit_days || doc.credit_limit", - "fieldname": "column_break2", + "fieldname": "credit_limit_section", "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, @@ -954,7 +955,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-04-13 05:46:36.473341", + "modified": "2016-05-13 17:50:42.227329", "modified_by": "Administrator", "module": "Selling", "name": "Customer", @@ -1141,6 +1142,7 @@ "write": 0 } ], + "quick_entry": 0, "read_only": 0, "read_only_onload": 0, "search_fields": "customer_name,customer_group,territory", diff --git a/erpnext/setup/setup_wizard/domainify.py b/erpnext/setup/setup_wizard/domainify.py index 3606c58bc2..8aec54b7cf 100644 --- a/erpnext/setup/setup_wizard/domainify.py +++ b/erpnext/setup/setup_wizard/domainify.py @@ -7,34 +7,51 @@ import frappe domains = { 'Manufacturing': { 'desktop_icons': ['Item', 'BOM', 'Customer', 'Supplier', 'Sales Order', - 'Production Order', 'Stock Entry', 'Purchase Order', 'Buying', 'Selling', 'Accounts'], + 'Production Order', 'Stock Entry', 'Purchase Order', 'Task', 'Buying', 'Selling', + 'Accounts', 'HR'], 'remove_roles': ['Maintenance Manager', 'Maintenance User', 'Support Manager', 'Support Team'], + 'properties': [ + {'doctype': 'Item', 'fieldname': 'manufacturing', 'property': 'collapsible_depends_on', 'value': 'is_stock_item'}, + ], + 'set_value': [ + ['Stock Settings', None, 'show_barcode_field', 0] + ] }, - 'Retail': { - 'desktop_icons': ['POS', 'Item', 'Customer', 'Sales Invoice', 'Purchase Order', 'Accounts', - 'Buying'], - 'remove_roles': ['Manufacturing User', 'Manufacturing Manager', 'Maintenance User'], + 'Retail': { + 'desktop_icons': ['POS', 'Item', 'Customer', 'Sales Invoice', 'Purchase Order', 'Warranty Claim', + 'Accounts', 'Buying'], + 'remove_roles': ['Manufacturing User', 'Manufacturing Manager'], + '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] + ] }, 'Distribution': { 'desktop_icons': ['Item', 'Customer', 'Supplier', 'Lead', 'Sales Order', - 'Sales Invoice', 'CRM', 'Selling', 'Buying', 'Stock', 'Accounts'], + 'Sales Invoice', 'CRM', 'Selling', 'Buying', 'Stock', 'Accounts', 'HR'], 'remove_roles': ['Manufacturing User', 'Manufacturing Manager', 'Maintenance User'], 'properties': [ {'doctype': 'Item', 'fieldname': 'manufacturing', 'property': 'hidden', 'value': 1}, + ], + 'set_value': [ + ['Stock Settings', None, 'show_barcode_field', 1] ] }, 'Services': { 'desktop_icons': ['Project', 'Time Log', 'Customer', 'Sales Invoice', 'Lead', 'Opportunity', - 'Expense Claim', 'Employee'], + 'Expense Claim', 'Employee', 'HR'], 'remove_roles': ['Manufacturing User', 'Manufacturing Manager', 'Maintenance User'], 'properties': [ {'doctype': 'Item', 'fieldname': 'is_stock_item', 'property': 'default', 'value': 0}, ], 'set_value': [ - ['Stock Settings', None, 'show_barcode', 0] + ['Stock Settings', None, 'show_barcode_field', 0] ] } }