mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-12 19:35:09 +00:00
Merge branch 'master' of github.com:webnotes/erpnext into purchase_price_list
Conflicts: accounts/doctype/gl_control/gl_control.py
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
from __future__ import unicode_literals
|
||||
install_docs = [
|
||||
{'doctype':'Role', 'role_name': 'System Manager', 'name': 'System Manager'},
|
||||
{'doctype':'Role', 'role_name': 'Analytics', 'name': 'Analytics'}
|
||||
]
|
||||
|
||||
@@ -162,7 +162,6 @@ class DocType:
|
||||
ac = Document('Account')
|
||||
for d in self.fld_dict.keys():
|
||||
ac.fields[d] = (d == 'parent_account' and lst[self.fld_dict[d]]) and lst[self.fld_dict[d]] +' - '+ self.doc.abbr or lst[self.fld_dict[d]]
|
||||
ac.old_parent = ''
|
||||
ac_obj = get_obj(doc=ac)
|
||||
ac_obj.doc.freeze_account='No'
|
||||
ac_obj.doc.master_type = ''
|
||||
@@ -199,7 +198,7 @@ class DocType:
|
||||
# ---------------------------------------------------
|
||||
def create_default_cost_center(self):
|
||||
glc = get_obj('GL Control')
|
||||
cc_list = [{'cost_center_name':'Root','company_name':self.doc.name,'company_abbr':self.doc.abbr,'group_or_ledger':'Group','parent_cost_center':'','old_parent':''}, {'cost_center_name':'Default CC Ledger','company_name':self.doc.name,'company_abbr':self.doc.abbr,'group_or_ledger':'Ledger','parent_cost_center':'Root - ' + self.doc.abbr,'old_parent':''}]
|
||||
cc_list = [{'cost_center_name':'Root','company_name':self.doc.name,'company_abbr':self.doc.abbr,'group_or_ledger':'Group','parent_cost_center':''}, {'cost_center_name':'Default CC Ledger','company_name':self.doc.name,'company_abbr':self.doc.abbr,'group_or_ledger':'Ledger','parent_cost_center':'Root - ' + self.doc.abbr}]
|
||||
for c in cc_list:
|
||||
glc.add_cc(str(c))
|
||||
|
||||
|
||||
@@ -2,35 +2,24 @@
|
||||
{
|
||||
"owner": "Administrator",
|
||||
"docstatus": 0,
|
||||
"creation": "2012-03-27 14:36:19",
|
||||
"creation": "2013-01-17 17:02:24",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2012-03-27 14:36:19"
|
||||
"modified": "2013-01-17 17:04:08"
|
||||
},
|
||||
{
|
||||
"section_style": "Simple",
|
||||
"in_create": 0,
|
||||
"module": "Setup",
|
||||
"server_code_error": " ",
|
||||
"document_type": "Master",
|
||||
"read_only": 0,
|
||||
"autoname": "field:country_name",
|
||||
"name": "__common__",
|
||||
"colour": "White:FFF",
|
||||
"in_create": 0,
|
||||
"doctype": "DocType",
|
||||
"show_in_menu": 0,
|
||||
"version": 11
|
||||
"module": "Setup",
|
||||
"document_type": "Master",
|
||||
"name": "__common__"
|
||||
},
|
||||
{
|
||||
"parent": "Country",
|
||||
"oldfieldtype": "Data",
|
||||
"oldfieldname": "country_name",
|
||||
"reqd": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Country",
|
||||
"doctype": "DocField",
|
||||
"label": "Country Name",
|
||||
"parenttype": "DocType",
|
||||
"fieldname": "country_name",
|
||||
"fieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"parentfield": "fields"
|
||||
},
|
||||
@@ -49,12 +38,33 @@
|
||||
"name": "Country",
|
||||
"doctype": "DocType"
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Data",
|
||||
"doctype": "DocField",
|
||||
"label": "Country Name",
|
||||
"oldfieldname": "country_name",
|
||||
"fieldname": "country_name",
|
||||
"fieldtype": "Data",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"label": "Date Format",
|
||||
"fieldname": "date_format",
|
||||
"fieldtype": "Data"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"label": "Time Zones",
|
||||
"fieldname": "time_zones",
|
||||
"fieldtype": "Text"
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"role": "Sales Master Manager",
|
||||
"doctype": "DocPerm",
|
||||
"submit": 0
|
||||
"submit": 0,
|
||||
"role": "Sales Master Manager",
|
||||
"cancel": 0
|
||||
},
|
||||
{
|
||||
"role": "Purchase Master Manager",
|
||||
@@ -67,8 +77,5 @@
|
||||
{
|
||||
"role": "HR Manager",
|
||||
"doctype": "DocPerm"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField"
|
||||
}
|
||||
]
|
||||
@@ -2,36 +2,24 @@
|
||||
{
|
||||
"owner": "Administrator",
|
||||
"docstatus": 0,
|
||||
"creation": "2012-07-03 13:30:55",
|
||||
"creation": "2013-01-17 12:30:28",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2012-07-11 16:11:45"
|
||||
"modified": "2013-01-17 16:24:59"
|
||||
},
|
||||
{
|
||||
"section_style": "Simple",
|
||||
"description": "**Currency** Master",
|
||||
"module": "Setup",
|
||||
"allow_trash": 1,
|
||||
"server_code_error": " ",
|
||||
"in_create": 0,
|
||||
"read_only": 0,
|
||||
"autoname": "field:currency_name",
|
||||
"name": "__common__",
|
||||
"colour": "White:FFF",
|
||||
"in_create": 0,
|
||||
"description": "**Currency** Master",
|
||||
"doctype": "DocType",
|
||||
"show_in_menu": 0,
|
||||
"version": 1
|
||||
"module": "Setup",
|
||||
"name": "__common__"
|
||||
},
|
||||
{
|
||||
"parent": "Currency",
|
||||
"oldfieldtype": "Data",
|
||||
"oldfieldname": "currency_name",
|
||||
"reqd": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Currency Name",
|
||||
"parenttype": "DocType",
|
||||
"fieldname": "currency_name",
|
||||
"fieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"parentfield": "fields"
|
||||
},
|
||||
@@ -39,9 +27,7 @@
|
||||
"name": "__common__",
|
||||
"parent": "Currency",
|
||||
"read": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"write": 1,
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"parentfield": "permissions"
|
||||
@@ -51,25 +37,44 @@
|
||||
"doctype": "DocType"
|
||||
},
|
||||
{
|
||||
"cancel": 1,
|
||||
"role": "Accounts Manager",
|
||||
"oldfieldtype": "Data",
|
||||
"doctype": "DocField",
|
||||
"label": "Currency Name",
|
||||
"oldfieldname": "currency_name",
|
||||
"fieldname": "currency_name",
|
||||
"fieldtype": "Data",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"label": "Fraction",
|
||||
"fieldname": "fraction",
|
||||
"fieldtype": "Data"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"label": "Fraction Units",
|
||||
"fieldname": "fraction_units",
|
||||
"fieldtype": "Int"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"label": "Symbol",
|
||||
"fieldname": "symbol",
|
||||
"fieldtype": "Data"
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"submit": 0,
|
||||
"write": 1,
|
||||
"report": 1,
|
||||
"role": "System Manager",
|
||||
"cancel": 1
|
||||
},
|
||||
{
|
||||
"role": "All",
|
||||
"doctype": "DocPerm"
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 1,
|
||||
"role": "Sales Master Manager",
|
||||
"doctype": "DocPerm",
|
||||
"submit": 0
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"role": "Purchase Master Manager",
|
||||
"doctype": "DocPerm",
|
||||
"submit": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField"
|
||||
}
|
||||
]
|
||||
@@ -50,33 +50,37 @@ class DocType:
|
||||
master_dict = {'Fiscal Year':{
|
||||
'year': curr_fiscal_year,
|
||||
'year_start_date': fy_start_date,
|
||||
'company': args.get('company_name')}}
|
||||
}}
|
||||
self.create_records(master_dict)
|
||||
|
||||
# Company
|
||||
master_dict = {'Company':{'company_name':args.get('company_name'),
|
||||
'abbr':args.get('company_abbr'),
|
||||
'default_currency':args.get('currency')
|
||||
}}
|
||||
master_dict = {'Company': {
|
||||
'company_name':args.get('company_name'),
|
||||
'abbr':args.get('company_abbr'),
|
||||
'default_currency':args.get('currency')
|
||||
}}
|
||||
self.create_records(master_dict)
|
||||
|
||||
def_args = {'current_fiscal_year':curr_fiscal_year,
|
||||
'default_currency': args.get('currency'),
|
||||
'default_company':args.get('company_name'),
|
||||
'default_valuation_method':'FIFO',
|
||||
'default_stock_uom':'Nos',
|
||||
'date_format':'dd-mm-yyyy',
|
||||
'default_currency_format':'Lacs',
|
||||
'so_required':'No',
|
||||
'dn_required':'No',
|
||||
'po_required':'No',
|
||||
'pr_required':'No',
|
||||
'emp_created_by':'Naming Series',
|
||||
'cust_master_name':'Customer Name',
|
||||
'supp_master_name':'Supplier Name',
|
||||
'default_currency_format': \
|
||||
(args.get('currency')=='INR') and 'Lacs' or 'Millions'
|
||||
}
|
||||
def_args = {
|
||||
'current_fiscal_year':curr_fiscal_year,
|
||||
'default_currency': args.get('currency'),
|
||||
"default_fraction_currency": webnotes.conn.get_value("Currency",
|
||||
args.get("currency"), "fraction"),
|
||||
'default_company':args.get('company_name'),
|
||||
'default_valuation_method':'FIFO',
|
||||
'default_stock_uom':'Nos',
|
||||
'date_format': webnotes.conn.get_value("Country",
|
||||
args.get("country"), "date_format"),
|
||||
'so_required':'No',
|
||||
'dn_required':'No',
|
||||
'po_required':'No',
|
||||
'pr_required':'No',
|
||||
'emp_created_by':'Naming Series',
|
||||
'cust_master_name':'Customer Name',
|
||||
'supp_master_name':'Supplier Name',
|
||||
'default_currency_format': \
|
||||
(args.get('currency')=='INR') and 'Lacs' or 'Millions'
|
||||
}
|
||||
|
||||
# Set
|
||||
self.set_defaults(def_args)
|
||||
@@ -185,8 +189,6 @@ class DocType:
|
||||
return fy, stdt, abbr
|
||||
|
||||
|
||||
# Create Company and Fiscal Year
|
||||
# -------------------------------
|
||||
def create_records(self, master_dict):
|
||||
for d in master_dict.keys():
|
||||
rec = Document(d)
|
||||
@@ -234,18 +236,12 @@ class DocType:
|
||||
on duplicate key update `password`=password(%s)""",
|
||||
(user_email, pwd, pwd))
|
||||
|
||||
self.add_roles(pr)
|
||||
|
||||
def add_roles(self, pr):
|
||||
roles_list = ['Accounts Manager', 'Accounts User', 'Blogger', 'HR Manager', 'HR User', 'Maintenance User', 'Maintenance Manager', 'Material Manager', 'Material User', 'Material Master Manager', 'Manufacturing Manager', 'Manufacturing User', 'Projects User', 'Purchase Manager', 'Purchase User', 'Purchase Master Manager', 'Quality Manager', 'Sales Manager', 'Sales User', 'Sales Master Manager', 'Support Manager', 'Support Team', 'System Manager', 'Website Manager']
|
||||
for r in roles_list:
|
||||
d = addchild(pr, 'userroles', 'UserRole')
|
||||
d.role = r
|
||||
d.save(1)
|
||||
|
||||
# Add roles to Administrator profile
|
||||
pr = Document('Profile','Administrator')
|
||||
for r in roles_list:
|
||||
d = addchild(pr,'userroles', 'UserRole')
|
||||
d.role = r
|
||||
d.save(1)
|
||||
self.add_all_roles_to(pr.name)
|
||||
|
||||
def add_all_roles_to(name):
|
||||
profile = webnotes.doc("Profile", name)
|
||||
for role in webnotes.conn.sql("""select name from tabRole"""):
|
||||
if role[0] not in ["Administrator", "Guest", "All", "Customer", "Supplier", "Partner"]:
|
||||
d = profile.addchild("userroles", "UserRole")
|
||||
d.role = role[0]
|
||||
d.insert()
|
||||
@@ -1,18 +0,0 @@
|
||||
[
|
||||
"Item Classification",
|
||||
"Webforms",
|
||||
"Modules Setup",
|
||||
"Email Settings for Outgoing and Incoming Emails.",
|
||||
"Standard Terms and Conditions that can be added to Sales and Purchases.Examples:1. Validity of the offer.1. Payment Terms (In Advance, On Credit, part advance etc).1. What is extra (or payable by the Customer).1. Safety / usage warning.1. Warranty if any.1. Returns Policy.1. Terms of shipping, if applicable.1. Ways of addressing disputes, indemnity, liability, etc.1. Address and Contact of your Company.",
|
||||
"Price List Master",
|
||||
"**Currency** Master",
|
||||
"Send automatic emails to Contacts on Submitting transactions.",
|
||||
"Setup",
|
||||
"Send regular summary reports via Email.",
|
||||
"A third party distributor / dealer / commission agent / affiliate / reseller who sells the companies products for a commission.",
|
||||
"Classification of Customers by region",
|
||||
"Set prefix for numbering series on your transactions",
|
||||
"All Sales Transactions can be tagged against multiple **Sales Persons** so that you can set and monitor targets.",
|
||||
"Permission Engine",
|
||||
"Legal Entity / Subsidiary with a separate Chart of Accounts belonging to the Organization."
|
||||
]
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"**Currency** Master": "** \u092e\u0941\u0926\u094d\u0930\u093e ** \u092e\u093e\u0938\u094d\u091f\u0930",
|
||||
"A third party distributor / dealer / commission agent / affiliate / reseller who sells the companies products for a commission.": "\u090f\u0915 \u0924\u0940\u0938\u0930\u0947 \u092a\u0915\u094d\u0937 \u0915\u0947 \u0935\u093f\u0924\u0930\u0915 / \u0921\u0940\u0932\u0930 / \u0915\u092e\u0940\u0936\u0928 \u090f\u091c\u0947\u0902\u091f / \u0938\u0939\u092c\u0926\u094d\u0927 / \u092a\u0941\u0928\u0930\u094d\u0935\u093f\u0915\u094d\u0930\u0947\u0924\u093e \u091c\u094b \u090f\u0915 \u0906\u092f\u094b\u0917 \u0915\u0947 \u0932\u093f\u090f \u0915\u0902\u092a\u0928\u093f\u092f\u094b\u0902 \u0915\u0947 \u0909\u0924\u094d\u092a\u093e\u0926\u094b\u0902 \u0915\u094b \u092c\u0947\u091a\u0924\u093e \u0939\u0948.",
|
||||
"All Sales Transactions can be tagged against multiple **Sales Persons** so that you can set and monitor targets.": "\u0938\u092d\u0940 \u092c\u093f\u0915\u094d\u0930\u0940 \u0932\u0947\u0928\u0926\u0947\u0928 \u0915\u0908 ** \u092c\u093f\u0915\u094d\u0930\u0940 \u0935\u094d\u092f\u0915\u094d\u0924\u093f\u092f\u094b\u0902 ** \u0907\u0924\u0928\u0940 \u0939\u0948 \u0915\u093f \u0906\u092a \u0938\u0947\u091f \u0914\u0930 \u0932\u0915\u094d\u0937\u094d\u092f\u094b\u0902 \u0915\u0940 \u0928\u093f\u0917\u0930\u093e\u0928\u0940 \u0915\u0930 \u0938\u0915\u0924\u0947 \u0939\u0948\u0902 \u0915\u0947 \u0916\u093f\u0932\u093e\u092b \u091a\u093f\u0939\u094d\u0928\u093f\u0924 \u0915\u093f\u092f\u093e \u091c\u093e \u0938\u0915\u0924\u093e \u0939\u0948.",
|
||||
"Classification of Customers by region": "\u0917\u094d\u0930\u093e\u0939\u0915 \u0915\u0947 \u0915\u094d\u0937\u0947\u0924\u094d\u0930 \u0926\u094d\u0935\u093e\u0930\u093e \u0935\u0930\u094d\u0917\u0940\u0915\u0930\u0923",
|
||||
"Email Settings for Outgoing and Incoming Emails.": "\u0928\u093f\u0935\u0930\u094d\u0924\u092e\u093e\u0928 \u0914\u0930 \u0906\u0928\u0947 \u0935\u093e\u0932\u0940 \u0908\u092e\u0947\u0932 \u0915\u0947 \u0932\u093f\u090f \u0908\u092e\u0947\u0932 \u0938\u0947\u091f\u093f\u0902\u0917\u094d\u0938.",
|
||||
"Item Classification": "\u0906\u0907\u091f\u092e \u0935\u0930\u094d\u0917\u0940\u0915\u0930\u0923",
|
||||
"Legal Entity / Subsidiary with a separate Chart of Accounts belonging to the Organization.": "\u0915\u093e\u0928\u0942\u0928\u0940 \u0938\u0902\u0917\u0920\u0928 \u0938\u0947 \u0938\u0902\u092c\u0902\u0927\u093f\u0924 \u0916\u093e\u0924\u094b\u0902 \u0915\u0940 \u090f\u0915 \u0905\u0932\u0917 \u091a\u093e\u0930\u094d\u091f \u0915\u0947 \u0938\u093e\u0925 \u0907\u0915\u093e\u0908 / \u0938\u0939\u093e\u092f\u0915.",
|
||||
"Modules Setup": "\u092e\u0949\u0921\u094d\u092f\u0942\u0932 \u0938\u0947\u091f\u0905\u092a",
|
||||
"Permission Engine": "\u0905\u0928\u0941\u092e\u0924\u093f \u0907\u0902\u091c\u0928",
|
||||
"Price List Master": "\u092e\u0942\u0932\u094d\u092f \u0938\u0942\u091a\u0940 \u092e\u093e\u0938\u094d\u091f\u0930",
|
||||
"Send automatic emails to Contacts on Submitting transactions.": "\u0932\u0947\u0928\u0926\u0947\u0928 \u092d\u0947\u091c\u0928\u0947 \u092a\u0930 \u0938\u0902\u092a\u0930\u094d\u0915 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0938\u094d\u0935\u0924: \u0908\u092e\u0947\u0932 \u092d\u0947\u091c\u0947\u0902.",
|
||||
"Send regular summary reports via Email.": "\u0908\u092e\u0947\u0932 \u0915\u0947 \u092e\u093e\u0927\u094d\u092f\u092e \u0938\u0947 \u0928\u093f\u092f\u092e\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u0938\u093e\u0930\u093e\u0902\u0936 \u0930\u093f\u092a\u094b\u0930\u094d\u091f \u092d\u0947\u091c\u0947\u0902.",
|
||||
"Set prefix for numbering series on your transactions": "\u0905\u092a\u0928\u0947 \u0932\u0947\u0928\u0926\u0947\u0928 \u092a\u0930 \u0936\u094d\u0930\u0943\u0902\u0916\u0932\u093e \u0928\u0902\u092c\u0930\u093f\u0902\u0917 \u0915\u0947 \u0932\u093f\u090f \u0909\u092a\u0938\u0930\u094d\u0917 \u0938\u0947\u091f",
|
||||
"Setup": "\u0935\u094d\u092f\u0935\u0938\u094d\u0925\u093e",
|
||||
"Standard Terms and Conditions that can be added to Sales and Purchases.Examples:1. Validity of the offer.1. Payment Terms (In Advance, On Credit, part advance etc).1. What is extra (or payable by the Customer).1. Safety / usage warning.1. Warranty if any.1. Returns Policy.1. Terms of shipping, if applicable.1. Ways of addressing disputes, indemnity, liability, etc.1. Address and Contact of your Company.": "1: \u092e\u093e\u0928\u0915 \u0928\u093f\u092f\u092e\u094b\u0902 \u0914\u0930 \u0936\u0930\u094d\u0924\u094b\u0902 \u0915\u093f \u092c\u093f\u0915\u094d\u0930\u0940 \u0914\u0930 Purchases.Examples \u0915\u0947 \u0932\u093f\u090f \u091c\u094b\u0921\u093c\u093e \u091c\u093e \u0938\u0915\u0924\u093e \u0939\u0948. Offer.1 \u0915\u0940 \u0935\u0948\u0927\u0924\u093e. \u092d\u0941\u0917\u0924\u093e\u0928 (\u090f\u0921\u0935\u093e\u0902\u0938 \u092e\u0947\u0902, \u0915\u094d\u0930\u0947\u0921\u093f\u091f, \u092d\u093e\u0917 \u0905\u0917\u094d\u0930\u093f\u092e \u0906\u0926\u093f) \u0936\u0930\u094d\u0924\u0947\u0902 .1. \u0915\u094d\u092f\u093e (\u092f\u093e \u0917\u094d\u0930\u093e\u0939\u0915 \u0926\u094d\u0935\u093e\u0930\u093e \u0926\u0947\u092f) \u0905\u0924\u093f\u0930\u093f\u0915\u094d\u0924 .1 \u0939\u0948. / \u0938\u0941\u0930\u0915\u094d\u0937\u093e warning.1 \u0909\u092a\u092f\u094b\u0917. \u0935\u093e\u0930\u0902\u091f\u0940 \u0905\u0917\u0930 any.1. Policy.1 \u0926\u0947\u0924\u093e \u0939\u0948. \u0936\u093f\u092a\u093f\u0902\u0917 \u0915\u0947 applicable.1 \u0905\u0917\u0930 \u0936\u0930\u094d\u0924\u0947\u0902. \u0935\u093f\u0935\u093e\u0926\u094b\u0902 \u0915\u094b \u0938\u0902\u092c\u094b\u0927\u093f\u0924 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0924\u0930\u0940\u0915\u0947, \u0915\u094d\u0937\u0924\u093f\u092a\u0942\u0930\u094d\u0924\u093f, \u0926\u093e\u092f\u093f\u0924\u094d\u0935, etc.1. \u092a\u0924\u093e \u0939\u0948 \u0914\u0930 \u0905\u092a\u0928\u0940 \u0915\u0902\u092a\u0928\u0940 \u0915\u0947 \u0938\u0902\u092a\u0930\u094d\u0915 \u0915\u0930\u0947\u0902.",
|
||||
"Webforms": "WebForms"
|
||||
}
|
||||
Reference in New Issue
Block a user