mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
[fixes] opportunity, task minor
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -120,6 +120,14 @@ class Opportunity(TransactionBase):
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user