[fixes] opportunity, task minor
diff --git a/erpnext/crm/doctype/opportunity/opportunity.json b/erpnext/crm/doctype/opportunity/opportunity.json
index 9517e5d..186e866 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.json
+++ b/erpnext/crm/doctype/opportunity/opportunity.json
@@ -48,7 +48,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Customer",
- "no_copy": 1,
+ "no_copy": 0,
"oldfieldname": "customer",
"oldfieldtype": "Link",
"options": "Customer",
@@ -391,7 +391,7 @@
"icon": "icon-info-sign",
"idx": 1,
"is_submittable": 1,
- "modified": "2015-02-21 06:18:43.345191",
+ "modified": "2015-02-23 02:19:39.853388",
"modified_by": "Administrator",
"module": "CRM",
"name": "Opportunity",
diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py
index f368998..c2378a7 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.py
+++ b/erpnext/crm/doctype/opportunity/opportunity.py
@@ -120,6 +120,14 @@
if not self.get('items'):
frappe.throw(_("Items required"))
+ # set missing values
+ item_fields = ("item_name", "description", "item_group", "brand")
+
+ for d in self.items:
+ item = frappe.db.get_value("Item", d.item_code, item_fields, as_dict=True)
+ for key in item_fields:
+ if not d.get(key): d.set(key, item.get(key))
+
def validate_lead_cust(self):
if self.enquiry_from == 'Lead':
if not self.lead:
diff --git a/erpnext/projects/doctype/project_task/project_task.json b/erpnext/projects/doctype/project_task/project_task.json
index 25bf1eb..c29dcc0 100644
--- a/erpnext/projects/doctype/project_task/project_task.json
+++ b/erpnext/projects/doctype/project_task/project_task.json
@@ -38,7 +38,7 @@
"in_list_view": 1,
"label": "Status",
"no_copy": 0,
- "options": "Open\nClosed",
+ "options": "Open\nWorking\nPending Review\nClosed\nCancelled",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -143,7 +143,7 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
- "modified": "2015-02-22 11:53:23.317993",
+ "modified": "2015-02-23 01:55:18.865117",
"modified_by": "Administrator",
"module": "Projects",
"name": "Project Task",
diff --git a/erpnext/selling/doctype/opportunity_item/opportunity_item.json b/erpnext/selling/doctype/opportunity_item/opportunity_item.json
index e9342dc..889b05f 100644
--- a/erpnext/selling/doctype/opportunity_item/opportunity_item.json
+++ b/erpnext/selling/doctype/opportunity_item/opportunity_item.json
@@ -20,14 +20,13 @@
"permlevel": 0
},
{
- "fieldname": "item_name",
- "fieldtype": "Data",
+ "fieldname": "qty",
+ "fieldtype": "Float",
"in_list_view": 1,
- "label": "Item Name",
- "oldfieldname": "item_name",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "reqd": 1
+ "label": "Qty",
+ "oldfieldname": "qty",
+ "oldfieldtype": "Currency",
+ "permlevel": 0
},
{
"description": "",
@@ -63,6 +62,27 @@
"precision": ""
},
{
+ "fieldname": "uom",
+ "fieldtype": "Link",
+ "in_list_view": 0,
+ "label": "UOM",
+ "oldfieldname": "uom",
+ "oldfieldtype": "Link",
+ "options": "UOM",
+ "permlevel": 0,
+ "search_index": 0
+ },
+ {
+ "fieldname": "item_name",
+ "fieldtype": "Data",
+ "in_list_view": 1,
+ "label": "Item Name",
+ "oldfieldname": "item_name",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "reqd": 0
+ },
+ {
"fieldname": "description",
"fieldtype": "Text",
"in_list_view": 1,
@@ -71,7 +91,7 @@
"oldfieldtype": "Text",
"permlevel": 0,
"print_width": "300px",
- "reqd": 1,
+ "reqd": 0,
"width": "300px"
},
{
@@ -99,22 +119,6 @@
"precision": ""
},
{
- "fieldname": "quantity_and_rate",
- "fieldtype": "Section Break",
- "in_list_view": 0,
- "label": "Quantity and Rate",
- "permlevel": 0
- },
- {
- "fieldname": "qty",
- "fieldtype": "Float",
- "in_list_view": 1,
- "label": "Qty",
- "oldfieldname": "qty",
- "oldfieldtype": "Currency",
- "permlevel": 0
- },
- {
"fieldname": "basic_rate",
"fieldtype": "Currency",
"hidden": 1,
@@ -125,27 +129,11 @@
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1
- },
- {
- "fieldname": "col_break2",
- "fieldtype": "Column Break",
- "permlevel": 0
- },
- {
- "fieldname": "uom",
- "fieldtype": "Link",
- "in_list_view": 0,
- "label": "UOM",
- "oldfieldname": "uom",
- "oldfieldtype": "Link",
- "options": "UOM",
- "permlevel": 0,
- "search_index": 0
}
],
"idx": 1,
"istable": 1,
- "modified": "2015-02-12 15:18:08.997193",
+ "modified": "2015-02-23 02:09:55.105233",
"modified_by": "Administrator",
"module": "Selling",
"name": "Opportunity Item",