Merge branch 'master' into develop

This commit is contained in:
Nabin Hait 2017-11-14 17:48:43 +05:30
commit 50616da905
4 changed files with 18 additions and 1 deletions

View File

@ -4,7 +4,7 @@ import inspect
import frappe import frappe
from erpnext.hooks import regional_overrides from erpnext.hooks import regional_overrides
__version__ = '9.2.11' __version__ = '9.2.12'
def get_default_company(user=None): def get_default_company(user=None):
'''Get default company for user''' '''Get default company for user'''

View File

@ -460,3 +460,4 @@ execute:frappe.delete_doc_if_exists("DocType", "Program Fee")
erpnext.patches.v9_0.set_pos_profile_name erpnext.patches.v9_0.set_pos_profile_name
erpnext.patches.v9_0.remove_non_existing_warehouse_from_stock_settings erpnext.patches.v9_0.remove_non_existing_warehouse_from_stock_settings
execute:frappe.delete_doc_if_exists("DocType", "Program Fee") execute:frappe.delete_doc_if_exists("DocType", "Program Fee")
erpnext.patches.v9_2.delete_healthcare_domain_default_items

View File

View File

@ -0,0 +1,16 @@
import frappe
from frappe.utils import getdate
def execute():
domain_settings = frappe.get_doc('Domain Settings')
active_domains = [d.domain for d in domain_settings.active_domains]
if "Healthcare" not in active_domains:
items = ["TTT", "MCH", "LDL", "GTT", "HDL", "BILT", "BILD", "BP", "BS"]
for item_code in items:
try:
item = frappe.db.get_value("Item", {"item_code": item_code}, ["name", "creation"], as_dict=1)
if item and getdate(item.creation) >= getdate("2017-11-10"):
frappe.delete_doc("Item", item.name)
except:
pass