Merge pull request #5346 from umairsy/domains

Domainifying
This commit is contained in:
Rushabh Mehta 2016-05-16 12:02:51 +05:30
commit 3a87c479c7
4 changed files with 105 additions and 73 deletions

View File

@ -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
@ -214,6 +192,57 @@
"set_only_once": 0,
"unique": 0
},
{
"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,
@ -320,34 +349,6 @@
"set_only_once": 0,
"unique": 0
},
{
"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,
@ -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",

View File

@ -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",

View File

@ -7,24 +7,50 @@ 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', '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]
]
}
}

View File

@ -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",