brotherton-erpnext/erpnext/patches/v5_0/update_opportunity.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
614 B
Python
Raw Normal View History

2015-04-02 16:30:34 +00:00
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
2015-04-02 16:36:36 +00:00
frappe.reload_doc('crm', 'doctype', 'opportunity')
frappe.reload_doc('crm', 'doctype', 'opportunity_item')
2015-04-02 16:30:34 +00:00
# all existing opportunities were with items
2015-04-02 16:36:36 +00:00
frappe.db.sql("update `tabDocType` set module = 'CRM' where name='Opportunity Item'")
2015-04-02 16:30:34 +00:00
frappe.db.sql("update tabOpportunity set with_items=1, title=customer_name")
frappe.db.sql("update `tabEmail Account` set append_to='Opportunity' where append_to='Lead'")