Merge branch 'develop'

This commit is contained in:
Pratik Vyas 2015-01-12 12:14:36 +05:30
commit 4b3d99d39a
16 changed files with 51 additions and 34 deletions

View File

@ -1,34 +1,31 @@
# ERPNext - Open Source ERP for small, medium sized businesses [![Build Status](https://travis-ci.org/frappe/erpnext.png)](https://travis-ci.org/frappe/erpnext) # ERPNext - Open source ERP for small and medium-size business [![Build Status](https://travis-ci.org/frappe/erpnext.png)](https://travis-ci.org/frappe/erpnext)
[https://erpnext.com](https://erpnext.com) [https://erpnext.com](https://erpnext.com)
Includes Accounting, Inventory, CRM, Sales, Purchase, Projects, HRMS. Built on Python / MariaDB. Includes: Accounting, Inventory, CRM, Sales, Purchase, Projects, HRMS. Requires MariaDB.
ERPNext is built on [frappe](https://github.com/frappe/frappe) Python Framework. ERPNext is built on the [Frappe](https://github.com/frappe/frappe) Framework, a full-stack web app framework in Python & Javascript.
- [User Guide](http://erpnext.org/user-guide.html) - [User Guide](https://erpnext.com/user-guide)
- [Getting Help](http://erpnext.org/getting-help.html) - [Getting Help](http://erpnext.org/getting-help.html)
- [Developer Forum](http://groups.google.com/group/erpnext-developer-forum) - [Discussion Forum](https://discuss.frappe.io/)
- [User Forum](http://groups.google.com/group/erpnext-user-forum)
--- ---
### Install ### Full Install
Use the bench, https://github.com/frappe/bench The Easy Way install script for bench will install all dependencies (e.g. MariaDB). See https://github.com/frappe/bench
### Admin Login New passwords will be created for the ERPNext "Administrator" user, the MariaDB root user, and the frappe user (the script displays the passwords and saves them to ~/frappe_passwords.txt).
1. go to "/login" ### Virtual Image
1. Administrator user name: "Administrator"
1. Administrator password: "admin"
### Download and Install You can download a virtual image to run ERPNext in a virtual machine on your local system.
##### Virtual Image:
- [ERPNext Download](http://erpnext.com/download) - [ERPNext Download](http://erpnext.com/download)
System and user credentials are listed on the download page.
--- ---
## License ## License

View File

@ -1 +1 @@
__version__ = '4.16.0' __version__ = '4.17.0'

View File

@ -3,9 +3,9 @@
"doc_type": "Journal Voucher", "doc_type": "Journal Voucher",
"docstatus": 0, "docstatus": 0,
"doctype": "Print Format", "doctype": "Print Format",
"html": "<div style=\"position: relative\">\n\n\t{%- from \"templates/print_formats/standard_macros.html\" import add_header -%}\n<div class=\"page-break\">\n {%- if not doc.get(\"print_heading\") and not doc.get(\"select_print_heading\") \n and doc.set(\"select_print_heading\", _(\"Payment Advice\")) -%}{%- endif -%}\n {{ add_header(0, 1, doc, letter_head, no_letterhead) }}\n\n{%- for label, value in (\n (_(\"Voucher Date\"), frappe.utils.formatdate(doc.voucher_date)),\n (_(\"Reference / Cheque No.\"), doc.cheque_no),\n (_(\"Reference / Cheque Date\"), frappe.utils.formatdate(doc.cheque_date))\n ) -%}\n <div class=\"row\">\n <div class=\"col-sm-4\"><label class=\"text-right\">{{ label }}</label></div>\n <div class=\"col-sm-8\">{{ value }}</div>\n </div>\n{%- endfor -%}\n\t<hr>\n\t<p>{{ _(\"This amount is in full / part settlement of the listed bills\") }}:</p>\n{%- for label, value in (\n (_(\"Amount\"), \"<strong>\" + (doc.total_amount or \"\") + \"</strong><br>\" + (doc.total_amount_in_words or \"\") + \"<br>\"),\n (_(\"References\"), doc.remark)\n ) -%}\n <div class=\"row\">\n <div class=\"col-sm-4\"><label class=\"text-right\">{{ label }}</label></div>\n <div class=\"col-sm-8\">{{ value }}</div>\n </div>\n {%- endfor -%}\n <hr>\n\t<div style=\"position: absolute; top: 14cm; left: 0cm;\">\n\t\tPrepared By</div>\n\t<div style=\"position: absolute; top: 14cm; left: 5.5cm;\">\n\t\tAuthorised Signatory</div>\n\t<div style=\"position: absolute; top: 14cm; left: 11cm;\">\n\t\tReceived Payment as Above</div>\n\t<div style=\"position: absolute; top: 16.4cm; left: 5.9cm;\">\n\t\t<strong>_____________</strong></div>\n\t<div style=\"position: absolute; top: 16.7cm; left: 6cm;\">\n\t\t<strong>A/C Payee</strong></div>\n\t<div style=\"position: absolute; top: 16.7cm; left: 5.9cm;\">\n\t\t<strong>_____________</strong></div>\n\t<div style=\"position: absolute; top: 16.9cm; left: 12cm;\">\n\t\t{{ frappe.utils.formatdate(doc.cheque_date) }}</div>\n\t<div style=\"position: absolute; top: 17.9cm; left: 1cm;\">\n\t\t{{ doc.pay_to_recd_from }}</div>\n\t<div style=\"position: absolute; top: 18.6cm; left: 1cm; width: 7cm;\">\n\t\t{{ doc.total_amount_in_words }}</div>\n\t<div style=\"position: absolute; top: 19.7cm; left: 12cm;\">\n\t\t{{ doc.total_amount }}</div>\n</div>", "html": "<div style=\"position: relative\">\n\n\t{%- from \"templates/print_formats/standard_macros.html\" import add_header -%}\n<div class=\"page-break\">\n {%- if not doc.get(\"print_heading\") and not doc.get(\"select_print_heading\") \n and doc.set(\"select_print_heading\", _(\"Payment Advice\")) -%}{%- endif -%}\n {{ add_header(0, 1, doc, letter_head, no_letterhead) }}\n\n{%- for label, value in (\n (_(\"Voucher Date\"), frappe.utils.formatdate(doc.voucher_date)),\n (_(\"Reference / Cheque No.\"), doc.cheque_no),\n (_(\"Reference / Cheque Date\"), frappe.utils.formatdate(doc.cheque_date))\n ) -%}\n <div class=\"row\">\n <div class=\"col-xs-4\"><label class=\"text-right\">{{ label }}</label></div>\n <div class=\"col-xs-8\">{{ value }}</div>\n </div>\n{%- endfor -%}\n\t<hr>\n\t<p>{{ _(\"This amount is in full / part settlement of the listed bills\") }}:</p>\n{%- for label, value in (\n (_(\"Amount\"), \"<strong>\" + (doc.total_amount or \"\") + \"</strong><br>\" + (doc.total_amount_in_words or \"\") + \"<br>\"),\n (_(\"References\"), doc.remark)\n ) -%}\n <div class=\"row\">\n <div class=\"col-xs-4\"><label class=\"text-right\">{{ label }}</label></div>\n <div class=\"col-xs-8\">{{ value }}</div>\n </div>\n {%- endfor -%}\n <hr>\n\t<div style=\"position: absolute; top: 14cm; left: 0cm;\">\n\t\tPrepared By</div>\n\t<div style=\"position: absolute; top: 14cm; left: 5.5cm;\">\n\t\tAuthorised Signatory</div>\n\t<div style=\"position: absolute; top: 14cm; left: 11cm;\">\n\t\tReceived Payment as Above</div>\n\t<div style=\"position: absolute; top: 16.4cm; left: 5.9cm;\">\n\t\t<strong>_____________</strong></div>\n\t<div style=\"position: absolute; top: 16.7cm; left: 6cm;\">\n\t\t<strong>A/C Payee</strong></div>\n\t<div style=\"position: absolute; top: 16.7cm; left: 5.9cm;\">\n\t\t<strong>_____________</strong></div>\n\t<div style=\"position: absolute; top: 16.9cm; left: 12cm;\">\n\t\t{{ frappe.utils.formatdate(doc.cheque_date) }}</div>\n\t<div style=\"position: absolute; top: 17.9cm; left: 1cm;\">\n\t\t{{ doc.pay_to_recd_from }}</div>\n\t<div style=\"position: absolute; top: 18.6cm; left: 1cm; width: 7cm;\">\n\t\t{{ doc.total_amount_in_words }}</div>\n\t<div style=\"position: absolute; top: 19.7cm; left: 12cm;\">\n\t\t{{ doc.total_amount }}</div>\n</div>",
"idx": 1, "idx": 1,
"modified": "2014-09-09 03:27:13.708596", "modified": "2015-01-12 11:03:17.032512",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Cheque Printing Format", "name": "Cheque Printing Format",

View File

@ -4,9 +4,9 @@
"doc_type": "Journal Voucher", "doc_type": "Journal Voucher",
"docstatus": 0, "docstatus": 0,
"doctype": "Print Format", "doctype": "Print Format",
"html": "{%- from \"templates/print_formats/standard_macros.html\" import add_header -%}\n\n<div class=\"page-break\">\n {%- if not doc.get(\"print_heading\") and not doc.get(\"select_print_heading\") \n and doc.set(\"select_print_heading\", _(\"Credit Note\")) -%}{%- endif -%}\n {{ add_header(0, 1, doc, letter_head, no_letterhead) }}\n\n {%- for label, value in (\n (_(\"Credit To\"), doc.pay_to_recd_from),\n (_(\"Date\"), frappe.utils.formatdate(doc.voucher_date)),\n (_(\"Amount\"), \"<strong>\" + frappe.utils.cstr(doc.total_amount) + \"</strong><br>\" + (doc.total_amount_in_words or \"\") + \"<br>\"),\n (_(\"Remarks\"), doc.remark)\n ) -%}\n\n <div class=\"row\">\n <div class=\"col-sm-3\"><label class=\"text-right\">{{ label }}</label></div>\n <div class=\"col-sm-9\">{{ value }}</div>\n </div>\n\n {%- endfor -%}\n\n <hr>\n <br>\n <p class=\"strong\">\n {{ _(\"For\") }} {{ doc.company }},<br>\n <br>\n <br>\n <br>\n {{ _(\"Authorized Signatory\") }}\n </p>\n</div>\n\n\n", "html": "{%- from \"templates/print_formats/standard_macros.html\" import add_header -%}\n\n<div class=\"page-break\">\n {%- if not doc.get(\"print_heading\") and not doc.get(\"select_print_heading\") \n and doc.set(\"select_print_heading\", _(\"Credit Note\")) -%}{%- endif -%}\n {{ add_header(0, 1, doc, letter_head, no_letterhead) }}\n\n {%- for label, value in (\n (_(\"Credit To\"), doc.pay_to_recd_from),\n (_(\"Date\"), frappe.utils.formatdate(doc.voucher_date)),\n (_(\"Amount\"), \"<strong>\" + frappe.utils.cstr(doc.total_amount) + \"</strong><br>\" + (doc.total_amount_in_words or \"\") + \"<br>\"),\n (_(\"Remarks\"), doc.remark)\n ) -%}\n\n <div class=\"row\">\n <div class=\"col-xs-3\"><label class=\"text-right\">{{ label }}</label></div>\n <div class=\"col-xs-9\">{{ value }}</div>\n </div>\n\n {%- endfor -%}\n\n <hr>\n <br>\n <p class=\"strong\">\n {{ _(\"For\") }} {{ doc.company }},<br>\n <br>\n <br>\n <br>\n {{ _(\"Authorized Signatory\") }}\n </p>\n</div>\n\n\n",
"idx": 2, "idx": 2,
"modified": "2014-10-17 17:20:02.740340", "modified": "2015-01-12 11:02:25.716825",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Credit Note", "name": "Credit Note",

View File

@ -3,9 +3,9 @@
"doc_type": "Journal Voucher", "doc_type": "Journal Voucher",
"docstatus": 0, "docstatus": 0,
"doctype": "Print Format", "doctype": "Print Format",
"html": "{%- from \"templates/print_formats/standard_macros.html\" import add_header -%}\n<div class=\"page-break\">\n {%- if not doc.get(\"print_heading\") and not doc.get(\"select_print_heading\") \n and doc.set(\"select_print_heading\", _(\"Payment Receipt Note\")) -%}{%- endif -%}\n {{ add_header(0, 1, doc, letter_head, no_letterhead) }}\n\n {%- for label, value in (\n (_(\"Received On\"), frappe.utils.formatdate(doc.voucher_date)),\n (_(\"Received From\"), doc.pay_to_recd_from),\n (_(\"Amount\"), \"<strong>\" + doc.total_amount or 0 + \"</strong><br>\" + (doc.total_amount_in_words or \"\") + \"<br>\"),\n (_(\"Remarks\"), doc.remark)\n ) -%}\n <div class=\"row\">\n <div class=\"col-sm-3\"><label class=\"text-right\">{{ label }}</label></div>\n <div class=\"col-sm-9\">{{ value }}</div>\n </div>\n\n {%- endfor -%}\n\n <hr>\n <br>\n <p class=\"strong\">\n {{ _(\"For\") }} {{ doc.company }},<br>\n <br>\n <br>\n <br>\n {{ _(\"Authorized Signatory\") }}\n </p>\n</div>\n\n", "html": "{%- from \"templates/print_formats/standard_macros.html\" import add_header -%}\n<div class=\"page-break\">\n {%- if not doc.get(\"print_heading\") and not doc.get(\"select_print_heading\") \n and doc.set(\"select_print_heading\", _(\"Payment Receipt Note\")) -%}{%- endif -%}\n {{ add_header(0, 1, doc, letter_head, no_letterhead) }}\n\n {%- for label, value in (\n (_(\"Received On\"), frappe.utils.formatdate(doc.voucher_date)),\n (_(\"Received From\"), doc.pay_to_recd_from),\n (_(\"Amount\"), \"<strong>\" + doc.total_amount or 0 + \"</strong><br>\" + (doc.total_amount_in_words or \"\") + \"<br>\"),\n (_(\"Remarks\"), doc.remark)\n ) -%}\n <div class=\"row\">\n <div class=\"col-xs-3\"><label class=\"text-right\">{{ label }}</label></div>\n <div class=\"col-xs-9\">{{ value }}</div>\n </div>\n\n {%- endfor -%}\n\n <hr>\n <br>\n <p class=\"strong\">\n {{ _(\"For\") }} {{ doc.company }},<br>\n <br>\n <br>\n <br>\n {{ _(\"Authorized Signatory\") }}\n </p>\n</div>\n\n",
"idx": 1, "idx": 1,
"modified": "2014-11-04 11:25:57.560873", "modified": "2015-01-12 11:03:22.893209",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Payment Receipt Voucher", "name": "Payment Receipt Voucher",

View File

@ -149,7 +149,7 @@ class AccountsReceivableReport(object):
if not account_map: if not account_map:
frappe.throw(_("No Customer Accounts found.")) frappe.throw(_("No Customer Accounts found."))
else: else:
accounts_list = ['"{0}"'.format(ac.replace('"', '\"')) for ac in account_map] accounts_list = ["'{0}'".format(frappe.db.escape(ac)) for ac in account_map]
conditions.append("account in ({0})".format(", ".join(accounts_list))) conditions.append("account in ({0})".format(", ".join(accounts_list)))
return " and ".join(conditions), values return " and ".join(conditions), values

View File

@ -245,7 +245,7 @@ def compare_existing_and_expected_gle(existing_gle, expected_gle):
for entry in expected_gle: for entry in expected_gle:
for e in existing_gle: for e in existing_gle:
if entry.account==e.account and entry.against_account==e.against_account \ if entry.account==e.account and entry.against_account==e.against_account \
and entry.cost_center==e.cost_center \ and (not entry.cost_center or not e.cost_center or entry.cost_center==e.cost_center) \
and (entry.debit != e.debit or entry.credit != e.credit): and (entry.debit != e.debit or entry.credit != e.credit):
matched = False matched = False
break break

View File

@ -4,7 +4,7 @@ app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors"
app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations"
app_icon = "icon-th" app_icon = "icon-th"
app_color = "#e74c3c" app_color = "#e74c3c"
app_version = "4.16.0" app_version = "4.17.0"
error_report_email = "support@erpnext.com" error_report_email = "support@erpnext.com"

View File

@ -10,7 +10,7 @@ from erpnext.manufacturing.doctype.production_order.production_order import make
from erpnext.stock.doctype.stock_entry import test_stock_entry from erpnext.stock.doctype.stock_entry import test_stock_entry
class TestProductionOrder(unittest.TestCase): class TestProductionOrder(unittest.TestCase):
def test_planned_qty(self): def check_planned_qty(self):
set_perpetual_inventory(0) set_perpetual_inventory(0)
planned0 = frappe.db.get_value("Bin", {"item_code": "_Test FG Item", "warehouse": "_Test Warehouse 1 - _TC"}, "planned_qty") or 0 planned0 = frappe.db.get_value("Bin", {"item_code": "_Test FG Item", "warehouse": "_Test Warehouse 1 - _TC"}, "planned_qty") or 0
@ -27,11 +27,15 @@ class TestProductionOrder(unittest.TestCase):
s = frappe.get_doc(make_stock_entry(pro_doc.name, "Material Transfer", 4)) s = frappe.get_doc(make_stock_entry(pro_doc.name, "Material Transfer", 4))
for d in s.get("mtn_details"): for d in s.get("mtn_details"):
d.s_warehouse = "Stores - _TC" d.s_warehouse = "Stores - _TC"
s.fiscal_year = "_Test Fiscal Year 2013"
s.posting_date = "2013-01-02"
s.insert() s.insert()
s.submit() s.submit()
# from wip to fg # from wip to fg
s = frappe.get_doc(make_stock_entry(pro_doc.name, "Manufacture", 4)) s = frappe.get_doc(make_stock_entry(pro_doc.name, "Manufacture", 4))
s.fiscal_year = "_Test Fiscal Year 2013"
s.posting_date = "2013-01-03"
s.insert() s.insert()
s.submit() s.submit()
@ -44,12 +48,14 @@ class TestProductionOrder(unittest.TestCase):
def test_over_production(self): def test_over_production(self):
from erpnext.manufacturing.doctype.production_order.production_order import StockOverProductionError from erpnext.manufacturing.doctype.production_order.production_order import StockOverProductionError
pro_doc = self.test_planned_qty() pro_doc = self.check_planned_qty()
test_stock_entry.make_stock_entry("_Test Item", None, "_Test Warehouse - _TC", 100, 100) test_stock_entry.make_stock_entry("_Test Item", None, "_Test Warehouse - _TC", 100, 100)
test_stock_entry.make_stock_entry("_Test Item Home Desktop 100", None, "_Test Warehouse - _TC", 100, 100) test_stock_entry.make_stock_entry("_Test Item Home Desktop 100", None, "_Test Warehouse - _TC", 100, 100)
s = frappe.get_doc(make_stock_entry(pro_doc.name, "Manufacture", 7)) s = frappe.get_doc(make_stock_entry(pro_doc.name, "Manufacture", 7))
s.fiscal_year = "_Test Fiscal Year 2013"
s.posting_date = "2013-01-04"
s.insert() s.insert()
self.assertRaises(StockOverProductionError, s.submit) self.assertRaises(StockOverProductionError, s.submit)

View File

@ -24,6 +24,13 @@ cur_frm.cscript.item_code = function(doc,cdt,cdn) {
} }
} }
cur_frm.cscript.raise_purchase_request = function(doc, cdt, cdn) {
return frappe.call({
method: "raise_purchase_request",
doc:doc
})
}
cur_frm.cscript.download_materials_required = function(doc, cdt, cdn) { cur_frm.cscript.download_materials_required = function(doc, cdt, cdn) {
return $c_obj(doc, 'validate_data', '', function(r, rt) { return $c_obj(doc, 'validate_data', '', function(r, rt) {
if (!r['exc']) if (!r['exc'])

View File

@ -1,5 +1,5 @@
{ {
"creation": "2013-01-21 12:03:47.000000", "creation": "2013-01-21 12:03:47",
"default_print_format": "Standard", "default_print_format": "Standard",
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
@ -20,6 +20,7 @@
{ {
"fieldname": "fg_item", "fieldname": "fg_item",
"fieldtype": "Link", "fieldtype": "Link",
"in_list_view": 1,
"label": "Filter based on item", "label": "Filter based on item",
"options": "Item", "options": "Item",
"permlevel": 0 "permlevel": 0
@ -27,6 +28,7 @@
{ {
"fieldname": "customer", "fieldname": "customer",
"fieldtype": "Link", "fieldtype": "Link",
"in_list_view": 1,
"label": "Filter based on customer", "label": "Filter based on customer",
"options": "Customer", "options": "Customer",
"permlevel": 0 "permlevel": 0
@ -34,6 +36,7 @@
{ {
"fieldname": "company", "fieldname": "company",
"fieldtype": "Link", "fieldtype": "Link",
"in_list_view": 1,
"label": "Company", "label": "Company",
"options": "Company", "options": "Company",
"permlevel": 0, "permlevel": 0,
@ -140,7 +143,7 @@
"fieldname": "raise_purchase_request", "fieldname": "raise_purchase_request",
"fieldtype": "Button", "fieldtype": "Button",
"label": "Create Material Requests", "label": "Create Material Requests",
"options": "raise_purchase_request", "options": "",
"permlevel": 0 "permlevel": 0
}, },
{ {
@ -155,7 +158,7 @@
"idx": 1, "idx": 1,
"in_create": 1, "in_create": 1,
"issingle": 1, "issingle": 1,
"modified": "2013-12-20 19:23:25.000000", "modified": "2015-01-11 21:53:21.253556",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Manufacturing", "module": "Manufacturing",
"name": "Production Planning Tool", "name": "Production Planning Tool",

View File

@ -5,6 +5,8 @@
"enquiry_from": "Lead", "enquiry_from": "Lead",
"enquiry_type": "Sales", "enquiry_type": "Sales",
"lead": "_T-Lead-00001", "lead": "_T-Lead-00001",
"transaction_date": "2013-12-12",
"fiscal_year": "_Test Fiscal Year 2013",
"enquiry_details": [{ "enquiry_details": [{
"item_name": "Test Item", "item_name": "Test Item",
"description": "Some description" "description": "Some description"

View File

@ -936,6 +936,8 @@ def make_stock_entry(item, source, target, qty, incoming_rate=None):
"incoming_rate": incoming_rate, "incoming_rate": incoming_rate,
"conversion_factor": 1.0 "conversion_factor": 1.0
}) })
s.posting_date= "2013-01-01"
s.fiscal_year= "_Test Fiscal Year 2013"
s.insert() s.insert()
s.submit() s.submit()
return s return s

View File

@ -153,8 +153,8 @@ class StockReconciliation(StockController):
if row.valuation_rate in ("", None): if row.valuation_rate in ("", None):
row.valuation_rate = previous_sle.get("valuation_rate") row.valuation_rate = previous_sle.get("valuation_rate")
# if row.qty and not row.valuation_rate: if row.qty and not row.valuation_rate:
# frappe.throw(_("Valuation Rate required for Item {0}").format(row.item_code)) frappe.throw(_("Valuation Rate required for Item {0}").format(row.item_code))
self.insert_entries(row) self.insert_entries(row)

View File

@ -240,7 +240,7 @@ def repost_all_stock_vouchers():
doc.validate() doc.validate()
doc.update_stock_ledger() doc.update_stock_ledger()
doc.make_gl_entries(repost_future_gle=False, allow_negative_stock=True) doc.make_gl_entries(repost_future_gle=False)
frappe.db.commit() frappe.db.commit()
except Exception, e: except Exception, e:
print frappe.get_traceback() print frappe.get_traceback()

View File

@ -1,7 +1,7 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
import os import os
version = "4.16.0" version = "4.17.0"
with open("requirements.txt", "r") as f: with open("requirements.txt", "r") as f:
install_requires = f.readlines() install_requires = f.readlines()