New Party Type Member Added
diff --git a/erpnext/non_profit/doctype/member/member.py b/erpnext/non_profit/doctype/member/member.py
index 52cb096..083d698 100644
--- a/erpnext/non_profit/doctype/member/member.py
+++ b/erpnext/non_profit/doctype/member/member.py
@@ -5,6 +5,9 @@
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
+from frappe.contacts.address_and_contact import load_address_and_contact, delete_contact_and_address
class Member(Document):
- pass
+ def onload(self):
+ """Load address and contacts in `__onload`"""
+ load_address_and_contact(self)
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 54f4dfd..487bc35 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -449,7 +449,8 @@
erpnext.patches.v8_9.delete_gst_doctypes_for_outside_india_accounts
erpnext.patches.v8_9.set_default_fields_in_variant_settings
erpnext.patches.v8_9.update_billing_gstin_for_indian_account
-erpnext.patches.v9_0.add_user_to_child_table_in_pos_profile #2017-11-28
+erpnext.patches.v8_9.set_member_party_type
+erpnext.patches.v9_0.add_user_to_child_table_in_pos_profile
erpnext.patches.v9_0.set_schedule_date_for_material_request_and_purchase_order
erpnext.patches.v9_0.student_admission_childtable_migrate
erpnext.patches.v9_0.fix_subscription_next_date #2017-10-23
diff --git a/erpnext/patches/v8_9/set_member_party_type.py b/erpnext/patches/v8_9/set_member_party_type.py
new file mode 100644
index 0000000..f4664cc
--- /dev/null
+++ b/erpnext/patches/v8_9/set_member_party_type.py
@@ -0,0 +1,7 @@
+import frappe
+
+def execute():
+ if not frappe.db.exists("Party Type", "Member"):
+ party = frappe.new_doc("Party Type")
+ party.party_type = "Member"
+ party.save()
diff --git a/erpnext/setup/setup_wizard/install_fixtures.py b/erpnext/setup/setup_wizard/install_fixtures.py
index ed89568..7e9ba49 100644
--- a/erpnext/setup/setup_wizard/install_fixtures.py
+++ b/erpnext/setup/setup_wizard/install_fixtures.py
@@ -213,6 +213,7 @@
{'doctype': "Party Type", "party_type": "Customer"},
{'doctype': "Party Type", "party_type": "Supplier"},
{'doctype': "Party Type", "party_type": "Employee"},
+ {'doctype': "Party Type", "party_type": "Member"},
{'doctype': "Opportunity Type", "name": "Hub"},
{'doctype': "Opportunity Type", "name": _("Sales")},