Merge branch 'develop'

This commit is contained in:
mbauskar 2017-06-28 13:32:29 +05:30
commit 0018db344c
5 changed files with 28 additions and 5 deletions

View File

@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
__version__ = '8.1.5'
__version__ = '8.1.6'
def get_default_company(user=None):

View File

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

View File

@ -4,7 +4,7 @@ You can send email reminders to your Customers and Suppliers so that they can di
To send GSTIN Reminders, you can either open the Customer / Supplier record or **GST Settings**
<img class="screenshot" alt="GST Settings" src="{{docs_base_url}}/assets/img/regional/india/gstin-settings.png">
<img class="screenshot" alt="GST Settings" src="{{docs_base_url}}/assets/img/regional/india/gst-settings.png">
Here you can click on the "Send GSTIN Update Reminders" button to send email reminders to all your customers

View File

@ -7,9 +7,25 @@ import frappe
def execute():
""" delete deprecated reports """
reports = ["Monthly Salary Register", "Customer Addresses And Contacts",
"Supplier Addresses And Contacts"]
reports = [
"Monthly Salary Register", "Customer Addresses And Contacts",
"Supplier Addresses And Contacts"
]
for report in reports:
if frappe.db.exists("Report", report):
frappe.delete_doc("Report", report, ignore_permissions=True)
check_and_update_desktop_icon_for_report(report)
frappe.delete_doc("Report", report, ignore_permissions=True)
def check_and_update_desktop_icon_for_report(report):
""" delete desktop icon for deprecated desktop icon and update the _report for Addresses And Contacts"""
if report == "Monthly Salary Register":
frappe.delete_doc("Desktop Icon", report)
elif report in ["Customer Addresses And Contacts", "Supplier Addresses And Contacts"]:
name = frappe.db.get_value("Desktop Icon", {"_report": report})
if name:
frappe.db.set_value("Desktop Icon", name, "_report", "Addresses And Contacts")
frappe.db.commit()

View File

@ -12,9 +12,16 @@ def execute():
if frappe.db.get_single_value('System Settings', 'country')=='India':
from erpnext.regional.india.setup import setup
delete_custom_field_tax_id_if_exists()
setup(patch=True)
send_gst_update_email()
def delete_custom_field_tax_id_if_exists():
for field in frappe.db.sql_list("""select name from `tabCustom Field` where fieldname='tax_id'
and dt in ('Sales Order', 'Salse Invoice', 'Delivery Note')"""):
frappe.delete_doc("Custom Field", field, ignore_permissions=True)
frappe.db.commit()
def send_gst_update_email():
message = """Hello,