From 4ad0963ee8ddb238785e73d61b77913fedcbb59a Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 8 Dec 2015 16:50:20 +0530 Subject: [PATCH 1/3] [patch][fix] Fixed drop ship status and tax rule patch --- erpnext/patches.txt | 2 +- erpnext/patches/v5_8/tax_rule.py | 4 ++-- .../v6_10/fix_delivery_status_of_drop_ship_item.py | 14 +++----------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index f522b18de6..ac5e5ca5eb 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -237,5 +237,5 @@ erpnext.patches.v6_10.fix_ordered_received_billed erpnext.patches.v6_10.fix_jv_total_amount #2015-11-30 erpnext.patches.v6_10.email_digest_default_quote erpnext.patches.v6_10.fix_billed_amount_in_drop_ship_po -erpnext.patches.v6_10.fix_delivery_status_of_drop_ship_item +erpnext.patches.v6_10.fix_delivery_status_of_drop_ship_item #2015-12-08 erpnext.patches.v5_8.tax_rule #2015-12-08 diff --git a/erpnext/patches/v5_8/tax_rule.py b/erpnext/patches/v5_8/tax_rule.py index 4a62501d09..8da28ba4c9 100644 --- a/erpnext/patches/v5_8/tax_rule.py +++ b/erpnext/patches/v5_8/tax_rule.py @@ -11,7 +11,7 @@ def execute(): ifnull(default_taxes_and_charges, '') != '' """, as_dict=1) for d in customers: - if not frappe.db.exists({"doctype": "Tax Rule", "customer": d.name}): + if not frappe.db.sql("select name from `tabTax Rule` where customer=%s", d.name): tr = frappe.new_doc("Tax Rule") tr.tax_type = "Sales" tr.customer = d.name @@ -23,7 +23,7 @@ def execute(): ifnull(default_taxes_and_charges, '') != '' """, as_dict=1) for d in suppliers: - if not frappe.db.exists({"doctype": "Tax Rule", "supplier": d.name}): + if not frappe.db.sql("select name from `tabTax Rule` where supplier=%s", d.name): tr = frappe.new_doc("Tax Rule") tr.tax_type = "Purchase" tr.supplier = d.name diff --git a/erpnext/patches/v6_10/fix_delivery_status_of_drop_ship_item.py b/erpnext/patches/v6_10/fix_delivery_status_of_drop_ship_item.py index a54d0ab389..23de9d0520 100644 --- a/erpnext/patches/v6_10/fix_delivery_status_of_drop_ship_item.py +++ b/erpnext/patches/v6_10/fix_delivery_status_of_drop_ship_item.py @@ -2,16 +2,8 @@ from __future__ import unicode_literals import frappe def execute(): - sales_orders_to_update = [] - - for item in frappe.get_all("Purchase Order Item", filters={"delivered_by_supplier": 1}, - fields=["prevdoc_doctype", "prevdoc_docname"]): - - if item.prevdoc_doctype == "Sales Order": - if item.prevdoc_docname not in sales_orders_to_update: - sales_orders_to_update.append(item.prevdoc_docname) - - for so_name in sales_orders_to_update: - so = frappe.get_doc("Sales Order", so_name) + for so_name in frappe.db.sql("""select distinct parent from `tabSales Order Item` + where delivered_by_supplier=1 and docstatus=1"""): + so = frappe.get_doc("Sales Order", so_name[0]) so.update_delivery_status() so.set_status(update=True, update_modified=False) \ No newline at end of file From 61c65524340349ab1ce44d4537e078c3cfde64f8 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 8 Dec 2015 18:03:23 +0530 Subject: [PATCH 2/3] [fix] Hungary translation for chart of accounts --- erpnext/translations/hu.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/translations/hu.csv b/erpnext/translations/hu.csv index 8e6ad03320..bf2abe3f6c 100644 --- a/erpnext/translations/hu.csv +++ b/erpnext/translations/hu.csv @@ -579,7 +579,7 @@ DocType: Lead,Campaign Name,Kampány neve ,Reserved,Fenntartott DocType: Purchase Order,Supply Raw Materials,Supply nyersanyagok DocType: Purchase Invoice,The date on which next invoice will be generated. It is generated on submit.,"Az időpont, amikor a következő számlán kerül előállításra. Úgy keletkezett benyújtani." -apps/erpnext/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py +10,Current Assets,Befektetett eszközök +apps/erpnext/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py +10,Current Assets,Jelenlegi eszközök apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py +92,{0} is not a stock Item,{0} nem Stock tétel DocType: Mode of Payment Account,Default Account,Alapértelmezett számla apps/erpnext/erpnext/crm/doctype/opportunity/opportunity.py +157,Lead must be set if Opportunity is made from Lead,"Lead kell állítani, ha Opportunity készült Lead" From 3931a35e276d28f0b9f33fa965311886bc08093f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 8 Dec 2015 18:36:25 +0600 Subject: [PATCH 3/3] bumped to version 6.12.6 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index b9ede7a74b..5d7abf5ec8 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1,2 +1,2 @@ from __future__ import unicode_literals -__version__ = '6.12.5' +__version__ = '6.12.6' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 1d3e659a92..4d7eefbc8f 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -7,7 +7,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd." app_description = """ERP made simple""" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "6.12.5" +app_version = "6.12.6" app_email = "info@erpnext.com" app_license = "GNU General Public License (v3)" source_link = "https://github.com/frappe/erpnext" diff --git a/setup.py b/setup.py index 7bf702727d..0cca10682d 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -version = "6.12.5" +version = "6.12.6" with open("requirements.txt", "r") as f: install_requires = f.readlines()