Make email account patch
This commit is contained in:
parent
4cd60d7d61
commit
a6a70a5f35
@ -89,6 +89,7 @@ erpnext.patches.v4_2.recalculate_bom_cost
|
|||||||
erpnext.patches.v4_2.fix_gl_entries_for_stock_transactions
|
erpnext.patches.v4_2.fix_gl_entries_for_stock_transactions
|
||||||
erpnext.patches.v4_2.update_requested_and_ordered_qty
|
erpnext.patches.v4_2.update_requested_and_ordered_qty
|
||||||
erpnext.patches.v4_2.party_model
|
erpnext.patches.v4_2.party_model
|
||||||
|
erpnext.patches.v4_4.make_email_accounts
|
||||||
erpnext.patches.v5_0.update_frozen_accounts_permission_role
|
erpnext.patches.v5_0.update_frozen_accounts_permission_role
|
||||||
erpnext.patches.v5_0.update_dn_against_doc_fields
|
erpnext.patches.v5_0.update_dn_against_doc_fields
|
||||||
execute:frappe.db.sql("update `tabMaterial Request` set material_request_type = 'Material Transfer' where material_request_type = 'Transfer'")
|
execute:frappe.db.sql("update `tabMaterial Request` set material_request_type = 'Material Transfer' where material_request_type = 'Transfer'")
|
@ -4,7 +4,8 @@ def execute():
|
|||||||
frappe.reload_doc("email", "doctype", "email_account")
|
frappe.reload_doc("email", "doctype", "email_account")
|
||||||
|
|
||||||
# outgoing
|
# outgoing
|
||||||
outgoing = frappe.get_doc("Outgoing Email Settings")
|
if frappe.db.exists("DocType", "Outgoing Email Settings"):
|
||||||
|
outgoing = dict(frappe.db.sql("select field, value from tabSingles where doctype='Outgoing Email Settings'"))
|
||||||
account = frappe.new_doc("Email Account")
|
account = frappe.new_doc("Email Account")
|
||||||
mapping = {
|
mapping = {
|
||||||
"email_id": "mail_login",
|
"email_id": "mail_login",
|
||||||
@ -25,7 +26,8 @@ def execute():
|
|||||||
account.insert()
|
account.insert()
|
||||||
|
|
||||||
# support
|
# support
|
||||||
support = frappe.get_doc("Support Email Settings")
|
if frappe.db.exists("DocType", "Support Email Settings"):
|
||||||
|
support = dict(frappe.db.sql("select field, value from tabSingles where doctype='Support Email Settings'"))
|
||||||
account = frappe.new_doc("Email Account")
|
account = frappe.new_doc("Email Account")
|
||||||
mapping = {
|
mapping = {
|
||||||
"enable_incoming": "sync_support_mails",
|
"enable_incoming": "sync_support_mails",
|
||||||
@ -48,7 +50,8 @@ def execute():
|
|||||||
|
|
||||||
# sales, jobs
|
# sales, jobs
|
||||||
for doctype in ("Sales Email Settings", "Jobs Email Settings"):
|
for doctype in ("Sales Email Settings", "Jobs Email Settings"):
|
||||||
source = frappe.get_doc(doctype)
|
if frappe.db.exists("DocType", doctype):
|
||||||
|
source = dict(frappe.db.sql("select field, value from tabSingles where doctype=%s", doctype))
|
||||||
account = frappe.new_doc("Email Account")
|
account = frappe.new_doc("Email Account")
|
||||||
mapping = {
|
mapping = {
|
||||||
"enable_incoming": "extract_emails",
|
"enable_incoming": "extract_emails",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user