Merge branch 'develop' of https://github.com/frappe/erpnext into wip_payrec

This commit is contained in:
ankitjavalkarwork
2014-07-21 14:23:52 +05:30
5 changed files with 51 additions and 50 deletions

View File

@@ -266,8 +266,7 @@ def get_tolerance_for(item_code, item_tolerance={}, global_tolerance=None):
if not tolerance: if not tolerance:
if global_tolerance == None: if global_tolerance == None:
global_tolerance = flt(frappe.db.get_value('Global Defaults', None, global_tolerance = flt(frappe.db.get_value('Stock Settings', None, 'tolerance'))
'tolerance'))
tolerance = global_tolerance tolerance = global_tolerance
item_tolerance[item_code] = tolerance item_tolerance[item_code] = tolerance

View File

@@ -53,6 +53,15 @@
"permlevel": 0, "permlevel": 0,
"reqd": 0 "reqd": 0
}, },
{
"fieldname": "country",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Country",
"options": "Country",
"permlevel": 0,
"reqd": 1
},
{ {
"fieldname": "charts_section", "fieldname": "charts_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
@@ -60,18 +69,10 @@
"label": "Chart of Accounts", "label": "Chart of Accounts",
"permlevel": 0 "permlevel": 0
}, },
{
"fieldname": "country",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Country",
"options": "Country",
"permlevel": 0,
"reqd": 0
},
{ {
"fieldname": "chart_of_accounts", "fieldname": "chart_of_accounts",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1, "ignore_user_permissions": 1,
"label": "Chart of Accounts", "label": "Chart of Accounts",
"options": "Chart of Accounts", "options": "Chart of Accounts",
@@ -348,7 +349,7 @@
], ],
"icon": "icon-building", "icon": "icon-building",
"idx": 1, "idx": 1,
"modified": "2014-05-27 03:49:08.597191", "modified": "2014-07-17 19:30:24.487672",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Setup", "module": "Setup",
"name": "Company", "name": "Company",

View File

@@ -4,6 +4,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import frappe import frappe
from frappe import _
def install(company): def install(company):
docs = [ docs = [
@@ -27,44 +28,45 @@ def install(company):
'group_or_ledger': 2, 'group_or_ledger': 2,
'account_type': 3, 'account_type': 3,
'report_type': 4, 'report_type': 4,
'tax_rate': 5 'tax_rate': 5,
'root_type': 6
} }
acc_list_india = [ acc_list_india = [
['CENVAT Capital Goods','Tax Assets','Ledger','Chargeable','Balance Sheet', None], [_('CENVAT Capital Goods'),_(_('Tax Assets')),'Ledger','Chargeable','Balance Sheet', None, 'Asset'],
['CENVAT','Tax Assets','Ledger','Chargeable','Balance Sheet', None], [_('CENVAT'),_('Tax Assets'),'Ledger','Chargeable','Balance Sheet', None, 'Asset'],
['CENVAT Service Tax','Tax Assets','Ledger','Chargeable','Balance Sheet', None], [_('CENVAT Service Tax'),_('Tax Assets'),'Ledger','Chargeable','Balance Sheet', None, 'Asset'],
['CENVAT Service Tax Cess 1','Tax Assets','Ledger','Chargeable','Balance Sheet', None], [_('CENVAT Service Tax Cess 1'),_('Tax Assets'),'Ledger','Chargeable','Balance Sheet', None, 'Asset'],
['CENVAT Service Tax Cess 2','Tax Assets','Ledger','Chargeable','Balance Sheet', None], [_('CENVAT Service Tax Cess 2'),_('Tax Assets'),'Ledger','Chargeable','Balance Sheet', None, 'Asset'],
['CENVAT Edu Cess','Tax Assets','Ledger','Chargeable','Balance Sheet', None], [_('CENVAT Edu Cess'),_('Tax Assets'),'Ledger','Chargeable','Balance Sheet', None, 'Asset'],
['CENVAT SHE Cess','Tax Assets','Ledger','Chargeable','Balance Sheet', None], [_('CENVAT SHE Cess'),_('Tax Assets'),'Ledger','Chargeable','Balance Sheet', None, 'Asset'],
['Excise Duty 4','Tax Assets','Ledger','Tax','Balance Sheet','4.00'], [_('Excise Duty 4'),_('Tax Assets'),'Ledger','Tax','Balance Sheet','4.00', 'Asset'],
['Excise Duty 8','Tax Assets','Ledger','Tax','Balance Sheet','8.00'], [_('Excise Duty 8'),_('Tax Assets'),'Ledger','Tax','Balance Sheet','8.00', 'Asset'],
['Excise Duty 10','Tax Assets','Ledger','Tax','Balance Sheet','10.00'], [_('Excise Duty 10'),_('Tax Assets'),'Ledger','Tax','Balance Sheet','10.00', 'Asset'],
['Excise Duty 14','Tax Assets','Ledger','Tax','Balance Sheet','14.00'], [_('Excise Duty 14'),_('Tax Assets'),'Ledger','Tax','Balance Sheet','14.00', 'Asset'],
['Excise Duty Edu Cess 2','Tax Assets','Ledger','Tax','Balance Sheet','2.00'], [_('Excise Duty Edu Cess 2'),_('Tax Assets'),'Ledger','Tax','Balance Sheet','2.00', 'Asset'],
['Excise Duty SHE Cess 1','Tax Assets','Ledger','Tax','Balance Sheet','1.00'], [_('Excise Duty SHE Cess 1'),_('Tax Assets'),'Ledger','Tax','Balance Sheet','1.00', 'Asset'],
['P L A','Tax Assets','Ledger','Chargeable','Balance Sheet', None], [_('P L A'),_('Tax Assets'),'Ledger','Chargeable','Balance Sheet', None, 'Asset'],
['P L A - Cess Portion','Tax Assets','Ledger','Chargeable','Balance Sheet', None], [_('P L A - Cess Portion'),_('Tax Assets'),'Ledger','Chargeable','Balance Sheet', None, 'Asset'],
['Edu. Cess on Excise','Duties and Taxes','Ledger','Tax','Balance Sheet','2.00'], [_('Edu. Cess on Excise'),_('Duties and Taxes'),'Ledger','Tax','Balance Sheet','2.00', 'Liability'],
['Edu. Cess on Service Tax','Duties and Taxes','Ledger','Tax','Balance Sheet','2.00'], [_('Edu. Cess on Service Tax'),_('Duties and Taxes'),'Ledger','Tax','Balance Sheet','2.00', 'Liability'],
['Edu. Cess on TDS','Duties and Taxes','Ledger','Tax','Balance Sheet','2.00'], [_('Edu. Cess on TDS'),_('Duties and Taxes'),'Ledger','Tax','Balance Sheet','2.00', 'Liability'],
['Excise Duty @ 4','Duties and Taxes','Ledger','Tax','Balance Sheet','4.00'], [_('Excise Duty @ 4'),_('Duties and Taxes'),'Ledger','Tax','Balance Sheet','4.00', 'Liability'],
['Excise Duty @ 8','Duties and Taxes','Ledger','Tax','Balance Sheet','8.00'], [_('Excise Duty @ 8'),_('Duties and Taxes'),'Ledger','Tax','Balance Sheet','8.00', 'Liability'],
['Excise Duty @ 10','Duties and Taxes','Ledger','Tax','Balance Sheet','10.00'], [_('Excise Duty @ 10'),_('Duties and Taxes'),'Ledger','Tax','Balance Sheet','10.00', 'Liability'],
['Excise Duty @ 14','Duties and Taxes','Ledger','Tax','Balance Sheet','14.00'], [_('Excise Duty @ 14'),_('Duties and Taxes'),'Ledger','Tax','Balance Sheet','14.00', 'Liability'],
['Service Tax','Duties and Taxes','Ledger','Tax','Balance Sheet','10.3'], [_('Service Tax'),_('Duties and Taxes'),'Ledger','Tax','Balance Sheet','10.3', 'Liability'],
['SHE Cess on Excise','Duties and Taxes','Ledger','Tax','Balance Sheet','1.00'], [_('SHE Cess on Excise'),_('Duties and Taxes'),'Ledger','Tax','Balance Sheet','1.00', 'Liability'],
['SHE Cess on Service Tax','Duties and Taxes','Ledger','Tax','Balance Sheet','1.00'], [_('SHE Cess on Service Tax'),_('Duties and Taxes'),'Ledger','Tax','Balance Sheet','1.00', 'Liability'],
['SHE Cess on TDS','Duties and Taxes','Ledger','Tax','Balance Sheet','1.00'], [_('SHE Cess on TDS'),_('Duties and Taxes'),'Ledger','Tax','Balance Sheet','1.00', 'Liability'],
['Professional Tax','Duties and Taxes','Ledger','Chargeable','Balance Sheet', None], [_('Professional Tax'),_('Duties and Taxes'),'Ledger','Chargeable','Balance Sheet', None, 'Liability'],
['VAT','Duties and Taxes','Ledger','Chargeable','Balance Sheet', None], [_('VAT'),_('Duties and Taxes'),'Ledger','Chargeable','Balance Sheet', None, 'Liability'],
['TDS (Advertisement)','Duties and Taxes','Ledger','Chargeable','Balance Sheet', None], [_('TDS (Advertisement)'),_('Duties and Taxes'),'Ledger','Chargeable','Balance Sheet', None, 'Liability'],
['TDS (Commission)','Duties and Taxes','Ledger','Chargeable','Balance Sheet', None], [_('TDS (Commission)'),_('Duties and Taxes'),'Ledger','Chargeable','Balance Sheet', None, 'Liability'],
['TDS (Contractor)','Duties and Taxes','Ledger','Chargeable','Balance Sheet', None], [_('TDS (Contractor)'),_('Duties and Taxes'),'Ledger','Chargeable','Balance Sheet', None, 'Liability'],
['TDS (Interest)','Duties and Taxes','Ledger','Chargeable','Balance Sheet', None], [_('TDS (Interest)'),_('Duties and Taxes'),'Ledger','Chargeable','Balance Sheet', None, 'Liability'],
['TDS (Rent)','Duties and Taxes','Ledger','Chargeable','Balance Sheet', None], [_('TDS (Rent)'),_('Duties and Taxes'),'Ledger','Chargeable','Balance Sheet', None, 'Liability'],
['TDS (Salary)','Duties and Taxes','Ledger','Chargeable','Balance Sheet', None] [_('TDS (Salary)'),_('Duties and Taxes'),'Ledger','Chargeable','Balance Sheet', None, 'Liability']
] ]
for lst in acc_list_india: for lst in acc_list_india:

View File

@@ -11,8 +11,7 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
this._super(); this._super();
this.frm.set_query("item_code", this.frm.cscript.fname, function() { this.frm.set_query("item_code", this.frm.cscript.fname, function() {
return { return {
query: "erpnext.controllers.queries.item_query", query: "erpnext.controllers.queries.item_query"
filters: {'is_stock_item': 'Yes'}
} }
}); });
}, },

View File

@@ -192,7 +192,7 @@ def _reorder_item():
item_warehouse_projected_qty = get_item_warehouse_projected_qty() item_warehouse_projected_qty = get_item_warehouse_projected_qty()
warehouse_company = frappe._dict(frappe.db.sql("""select name, company from `tabWarehouse`""")) warehouse_company = frappe._dict(frappe.db.sql("""select name, company from `tabWarehouse`"""))
default_company = (frappe.defaults.get_defaults()["company"] or default_company = (frappe.defaults.get_defaults().get("company") or
frappe.db.sql("""select name from tabCompany limit 1""")[0][0]) frappe.db.sql("""select name from tabCompany limit 1""")[0][0])
def add_to_material_request(item_code, warehouse, reorder_level, reorder_qty, material_request_type): def add_to_material_request(item_code, warehouse, reorder_level, reorder_qty, material_request_type):