Merge pull request #5346 from umairsy/domains
Domainifying
diff --git a/erpnext/manufacturing/doctype/bom/bom.json b/erpnext/manufacturing/doctype/bom/bom.json
index e833e46..5eeb69f 100644
--- a/erpnext/manufacturing/doctype/bom/bom.json
+++ b/erpnext/manufacturing/doctype/bom/bom.json
@@ -2,6 +2,7 @@
"allow_copy": 0,
"allow_import": 1,
"allow_rename": 0,
+ "beta": 0,
"creation": "2013-01-22 15:11:38",
"custom": 0,
"docstatus": 0,
@@ -65,49 +66,26 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "fieldname": "rm_cost_as_per",
- "fieldtype": "Select",
+ "default": "1",
+ "description": "Quantity of item obtained after manufacturing / repacking from given quantities of raw materials",
+ "fieldname": "quantity",
+ "fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
- "label": "Rate Of Materials Based On",
+ "label": "Quantity",
"length": 0,
"no_copy": 0,
- "options": "Valuation Rate\nLast Purchase Rate\nPrice List",
+ "oldfieldname": "quantity",
+ "oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval:doc.rm_cost_as_per===\"Price List\"",
- "fieldname": "buying_price_list",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Price List",
- "length": 0,
- "no_copy": 0,
- "options": "Price List",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
+ "reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -218,6 +196,57 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "fieldname": "rm_cost_as_per",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Rate Of Materials Based On",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Valuation Rate\nLast Purchase Rate\nPrice List",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "depends_on": "eval:doc.rm_cost_as_per===\"Price List\"",
+ "fieldname": "buying_price_list",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Price List",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Price List",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
"depends_on": "",
"description": "Specify the operations, operating cost and give a unique Operation no to your operations.",
"fieldname": "operations_section",
@@ -324,34 +353,6 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "default": "1",
- "description": "Quantity of item obtained after manufacturing / repacking from given quantities of raw materials",
- "fieldname": "quantity",
- "fieldtype": "Float",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Quantity",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "quantity",
- "oldfieldtype": "Currency",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
"fieldname": "costing",
"fieldtype": "Section Break",
"hidden": 0,
@@ -807,7 +808,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-03-30 03:50:02.164476",
+ "modified": "2016-05-13 18:28:53.557967",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "BOM",
@@ -854,6 +855,7 @@
"write": 1
}
],
+ "quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "item",
diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json
index ff47a79..aac9360 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 a866869..5985708 100644
--- a/erpnext/setup/setup_wizard/domainify.py
+++ b/erpnext/setup/setup_wizard/domainify.py
@@ -7,24 +7,50 @@
domains = {
'Manufacturing': {
'desktop_icons': ['Item', 'BOM', 'Customer', 'Supplier', 'Sales Order',
- 'Production Order', 'Stock Entry', 'Buying', 'Selling', 'Accounts']
+ 'Production Order', 'Stock Entry', 'Purchase Order', 'Task', 'Buying', 'Selling',
+ 'Accounts', 'HR'],
+ 'properties': [
+ {'doctype': 'Item', 'fieldname': 'manufacturing', 'property': 'collapsible_depends_on', 'value': 'is_stock_item'},
+ ],
+ 'set_value': [
+ ['Stock Settings', None, 'show_barcode_field', 1]
+ ]
},
- 'Retail': {
- 'remove_roles': ['Manufacturing User', 'Manufacturing Manager', 'Maintenance User'],
- 'desktop_icons': ['POS', 'Item', 'Customer', 'Sales Invoice', 'Accounts']
+
+ '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': {
- 'remove_roles': ['Manufacturing User', 'Manufacturing Manager', 'Maintenance User'],
+ 'desktop_icons': ['Item', 'Customer', 'Supplier', 'Lead', 'Sales Order',
+ 'Sales Invoice', 'CRM', 'Selling', 'Buying', 'Stock', 'Accounts', 'HR'],
+ 'remove_roles': ['Manufacturing User', 'Manufacturing Manager'],
+ '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'],
- 'remove_roles': ['Manufacturing User', 'Manufacturing Manager', 'Maintenance User'],
+ 'Expense Claim', 'Employee', 'HR'],
+ 'remove_roles': ['Manufacturing User', 'Manufacturing Manager'],
'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]
]
}
}
diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json
index 4228949..9f2c60c 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",