From 7c32770a695c00efcfb7facd16273c98c049db4d Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 2 Apr 2015 22:06:36 +0530 Subject: [PATCH] move opportunity item to CRM --- erpnext/crm/doctype/opportunity/opportunity.json | 4 ++-- erpnext/crm/doctype/opportunity_item/__init__.py | 0 .../doctype/opportunity_item/opportunity_item.json | 4 ++-- .../doctype/opportunity_item/opportunity_item.py | 8 ++++---- erpnext/patches/v5_0/update_opportunity.py | 4 +++- erpnext/selling/doctype/opportunity_item/README.md | 1 - erpnext/selling/doctype/opportunity_item/__init__.py | 1 - erpnext/support/doctype/issue/issue.json | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 erpnext/crm/doctype/opportunity_item/__init__.py rename erpnext/{selling => crm}/doctype/opportunity_item/opportunity_item.json (97%) rename erpnext/{selling => crm}/doctype/opportunity_item/opportunity_item.py (65%) delete mode 100644 erpnext/selling/doctype/opportunity_item/README.md delete mode 100644 erpnext/selling/doctype/opportunity_item/__init__.py diff --git a/erpnext/crm/doctype/opportunity/opportunity.json b/erpnext/crm/doctype/opportunity/opportunity.json index 71b5337c14..0b25ad626a 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.json +++ b/erpnext/crm/doctype/opportunity/opportunity.json @@ -407,8 +407,8 @@ "icon": "icon-info-sign", "idx": 1, "is_submittable": 1, - "modified": "2015-04-02 21:33:55.090127", - "modified_by": "rmehta@gmail.com", + "modified": "2015-04-02 22:03:52.841173", + "modified_by": "Administrator", "module": "CRM", "name": "Opportunity", "owner": "Administrator", diff --git a/erpnext/crm/doctype/opportunity_item/__init__.py b/erpnext/crm/doctype/opportunity_item/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/selling/doctype/opportunity_item/opportunity_item.json b/erpnext/crm/doctype/opportunity_item/opportunity_item.json similarity index 97% rename from erpnext/selling/doctype/opportunity_item/opportunity_item.json rename to erpnext/crm/doctype/opportunity_item/opportunity_item.json index 889b05ff3e..afc6fcb31d 100644 --- a/erpnext/selling/doctype/opportunity_item/opportunity_item.json +++ b/erpnext/crm/doctype/opportunity_item/opportunity_item.json @@ -133,9 +133,9 @@ ], "idx": 1, "istable": 1, - "modified": "2015-02-23 02:09:55.105233", + "modified": "2015-04-02 22:04:26.867653", "modified_by": "Administrator", - "module": "Selling", + "module": "CRM", "name": "Opportunity Item", "owner": "Administrator", "permissions": [] diff --git a/erpnext/selling/doctype/opportunity_item/opportunity_item.py b/erpnext/crm/doctype/opportunity_item/opportunity_item.py similarity index 65% rename from erpnext/selling/doctype/opportunity_item/opportunity_item.py rename to erpnext/crm/doctype/opportunity_item/opportunity_item.py index 7aff5ca80a..7a5ed63f88 100644 --- a/erpnext/selling/doctype/opportunity_item/opportunity_item.py +++ b/erpnext/crm/doctype/opportunity_item/opportunity_item.py @@ -1,10 +1,10 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt +# -*- coding: utf-8 -*- +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors +# For license information, please see license.txt from __future__ import unicode_literals import frappe - from frappe.model.document import Document class OpportunityItem(Document): - pass \ No newline at end of file + pass diff --git a/erpnext/patches/v5_0/update_opportunity.py b/erpnext/patches/v5_0/update_opportunity.py index 8b5e1e023d..8eb45c48e7 100644 --- a/erpnext/patches/v5_0/update_opportunity.py +++ b/erpnext/patches/v5_0/update_opportunity.py @@ -5,8 +5,10 @@ from __future__ import unicode_literals import frappe def execute(): - frappe.reload_doctype("Opportunity") + frappe.reload_doc('crm', 'doctype', 'opportunity') + frappe.reload_doc('crm', 'doctype', 'opportunity_item') # all existing opportunities were with items + frappe.db.sql("update `tabDocType` set module = 'CRM' where name='Opportunity Item'") 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'") diff --git a/erpnext/selling/doctype/opportunity_item/README.md b/erpnext/selling/doctype/opportunity_item/README.md deleted file mode 100644 index 810c10bb69..0000000000 --- a/erpnext/selling/doctype/opportunity_item/README.md +++ /dev/null @@ -1 +0,0 @@ -Items considered in the parent Opportunity. \ No newline at end of file diff --git a/erpnext/selling/doctype/opportunity_item/__init__.py b/erpnext/selling/doctype/opportunity_item/__init__.py deleted file mode 100644 index baffc48825..0000000000 --- a/erpnext/selling/doctype/opportunity_item/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/support/doctype/issue/issue.json b/erpnext/support/doctype/issue/issue.json index 81e2868997..8ba1b5a33c 100644 --- a/erpnext/support/doctype/issue/issue.json +++ b/erpnext/support/doctype/issue/issue.json @@ -218,8 +218,8 @@ ], "icon": "icon-ticket", "idx": 1, - "modified": "2015-04-02 21:27:09.303683", - "modified_by": "rmehta@gmail.com", + "modified": "2015-04-02 22:06:02.684820", + "modified_by": "Administrator", "module": "Support", "name": "Issue", "owner": "Administrator",