mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 02:31:21 +00:00
Merge branch 'responsive' of github.com:webnotes/erpnext into responsive
Conflicts: selling/doctype/quotation/quotation.py utilities/transaction_base.py
This commit is contained in:
@@ -10,9 +10,9 @@ def pre_import():
|
||||
|
||||
def make_modules():
|
||||
modules = [
|
||||
" Home", " System", " Utilities", " Website", " Setup",
|
||||
" Selling", " Buying", " Projects", " Accounts", " Stock",
|
||||
" Support", " HR", " Manufacturing"]
|
||||
"Home", "System", "Utilities", "Website", "Setup",
|
||||
"Selling", "Buying", "Projects", "Accounts", "Stock",
|
||||
"Support", "HR", "Manufacturing"]
|
||||
|
||||
for m in modules:
|
||||
doc = webnotes.doc(fielddata = {
|
||||
@@ -100,8 +100,10 @@ def import_country_and_currency():
|
||||
def import_defaults():
|
||||
records = [
|
||||
# item group
|
||||
{'doctype': 'Item Group', 'item_group_name': 'All Item Groups', 'is_group': 'Yes', 'name': 'All Item Groups', 'parent_item_group': ''},
|
||||
{'doctype': 'Item Group', 'item_group_name': 'Default', 'is_group': 'No', 'name': 'Default', 'parent_item_group': 'All Item Groups'},
|
||||
{'doctype': 'Item Group', 'item_group_name': 'All Item Groups', 'is_group': 'Yes', 'parent_item_group': ''},
|
||||
{'doctype': 'Item Group', 'item_group_name': 'Products', 'is_group': 'No', 'parent_item_group': 'All Item Groups'},
|
||||
{'doctype': 'Item Group', 'item_group_name': 'Raw Material', 'is_group': 'No', 'parent_item_group': 'All Item Groups'},
|
||||
{'doctype': 'Item Group', 'item_group_name': 'Services', 'is_group': 'No', 'parent_item_group': 'All Item Groups'},
|
||||
|
||||
# deduction type
|
||||
{'doctype': 'Deduction Type', 'name': 'Income Tax', 'description': 'Income Tax', 'deduction_name': 'Income Tax'},
|
||||
@@ -131,37 +133,27 @@ def import_defaults():
|
||||
|
||||
# customer group
|
||||
{'doctype': 'Customer Group', 'customer_group_name': 'All Customer Groups', 'is_group': 'Yes', 'name': 'All Customer Groups', 'parent_customer_group': ''},
|
||||
{'doctype': 'Customer Group', 'customer_group_name': 'Default', 'is_group': 'No', 'name': 'Default Customer Group', 'parent_customer_group': 'All Customer Groups'},
|
||||
{'doctype': 'Customer Group', 'customer_group_name': 'Individual', 'is_group': 'No', 'parent_customer_group': 'All Customer Groups'},
|
||||
{'doctype': 'Customer Group', 'customer_group_name': 'Commercial', 'is_group': 'No', 'parent_customer_group': 'All Customer Groups'},
|
||||
{'doctype': 'Customer Group', 'customer_group_name': 'Non Profit', 'is_group': 'No', 'parent_customer_group': 'All Customer Groups'},
|
||||
{'doctype': 'Customer Group', 'customer_group_name': 'Government', 'is_group': 'No', 'parent_customer_group': 'All Customer Groups'},
|
||||
|
||||
# supplier type
|
||||
{'doctype': 'Supplier Type', 'name': 'Default Supplier Type', 'supplier_type': 'Default Supplier Type'},
|
||||
|
||||
# warehouse type
|
||||
{'doctype': 'Warehouse Type', 'name': 'Default Warehouse Type', 'warehouse_type': 'Default Warehouse Type'},
|
||||
{'doctype': 'Warehouse Type', 'name': 'Fixed Asset', 'warehouse_type': 'Fixed Asset'},
|
||||
{'doctype': 'Warehouse Type', 'name': 'Reserved', 'warehouse_type': 'Reserved'},
|
||||
{'doctype': 'Warehouse Type', 'name': 'Rejected', 'warehouse_type': 'Rejected'},
|
||||
{'doctype': 'Warehouse Type', 'name': 'Sample', 'warehouse_type': 'Sample'},
|
||||
{'doctype': 'Warehouse Type', 'name': 'Stores', 'warehouse_type': 'Stores'},
|
||||
{'doctype': 'Warehouse Type', 'name': 'WIP Warehouse', 'warehouse_type': 'WIP Warehouse'},
|
||||
|
||||
# warehouse
|
||||
{'doctype': 'Warehouse', 'warehouse_name': 'Default Warehouse', 'name': 'Default Warehouse', 'warehouse_type': 'Default Warehouse Type'},
|
||||
|
||||
# Workstation
|
||||
{'doctype': 'Workstation', 'name': 'Default Workstation', 'workstation_name': 'Default Workstation', 'warehouse': 'Default Warehouse'},
|
||||
{'doctype': 'Supplier Type', 'supplier_type': 'Services'},
|
||||
{'doctype': 'Supplier Type', 'supplier_type': 'Local'},
|
||||
{'doctype': 'Supplier Type', 'supplier_type': 'Raw Material'},
|
||||
{'doctype': 'Supplier Type', 'supplier_type': 'Electrical'},
|
||||
{'doctype': 'Supplier Type', 'supplier_type': 'Hardware'},
|
||||
{'doctype': 'Supplier Type', 'supplier_type': 'Pharmaceutical'},
|
||||
{'doctype': 'Supplier Type', 'supplier_type': 'Distributor'},
|
||||
|
||||
# Sales Person
|
||||
{'doctype': 'Sales Person', 'name': 'All Sales Persons', 'sales_person_name': 'All Sales Persons', 'is_group': "Yes", "parent_sales_person": ""},
|
||||
{'doctype': 'Sales Person', 'sales_person_name': 'Sales Team', 'is_group': "Yes", "parent_sales_person": ""},
|
||||
|
||||
# UOM
|
||||
{'uom_name': 'Unit', 'doctype': 'UOM', 'name': 'Unit'},
|
||||
{'uom_name': 'Box', 'doctype': 'UOM', 'name': 'Box'},
|
||||
{'uom_name': 'Ft', 'doctype': 'UOM', 'name': 'Ft'},
|
||||
{'uom_name': 'Kg', 'doctype': 'UOM', 'name': 'Kg'},
|
||||
{'uom_name': 'Ltr', 'doctype': 'UOM', 'name': 'Ltr'},
|
||||
{'uom_name': 'Meter', 'doctype': 'UOM', 'name': 'Meter'},
|
||||
{'uom_name': 'Mtr', 'doctype': 'UOM', 'name': 'Mtr'},
|
||||
{'uom_name': 'Nos', 'doctype': 'UOM', 'name': 'Nos'},
|
||||
{'uom_name': 'Pair', 'doctype': 'UOM', 'name': 'Pair'},
|
||||
{'uom_name': 'Set', 'doctype': 'UOM', 'name': 'Set'},
|
||||
@@ -171,12 +163,11 @@ def import_defaults():
|
||||
|
||||
from webnotes.modules import scrub
|
||||
for r in records:
|
||||
if not webnotes.conn.exists(r['doctype'], r['name']):
|
||||
bean = webnotes.bean(r)
|
||||
|
||||
# ignore mandatory for root
|
||||
parent_link_field = ("parent_" + scrub(bean.doc.doctype))
|
||||
if parent_link_field in bean.doc.fields and not bean.doc.fields.get(parent_link_field):
|
||||
bean.ignore_mandatory = True
|
||||
|
||||
bean.insert()
|
||||
bean = webnotes.bean(r)
|
||||
|
||||
# ignore mandatory for root
|
||||
parent_link_field = ("parent_" + scrub(bean.doc.doctype))
|
||||
if parent_link_field in bean.doc.fields and not bean.doc.fields.get(parent_link_field):
|
||||
bean.ignore_mandatory = True
|
||||
|
||||
bean.insert()
|
||||
Reference in New Issue
Block a user