mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 04:39:11 +00:00
help link fixes in lead, opportunity; delete cancelled sles for item
This commit is contained in:
@@ -31,6 +31,11 @@ cur_frm.cscript.refresh = function(doc) {
|
||||
cur_frm.cscript.hide_website_fields(doc);
|
||||
}
|
||||
|
||||
cur_frm.cscript.item_code = function(doc) {
|
||||
if(!doc.item_name) cur_frm.set_value("item_name", doc.item_code);
|
||||
if(!doc.description) cur_frm.set_value("description", doc.item_code);
|
||||
}
|
||||
|
||||
cur_frm.cscript.hide_website_fields = function(doc) {
|
||||
var website_fields_list = ['page_name', 'website_image', 'web_short_description',
|
||||
'web_long_description'];
|
||||
|
||||
@@ -85,7 +85,9 @@ class DocType:
|
||||
|
||||
# On delete 1. Delete BIN (if none of the corrosponding transactions present, it gets deleted. if present, rolled back due to exception)
|
||||
def on_trash(self):
|
||||
sql("delete from tabBin where item_code='%s'"%(self.doc.item_code))
|
||||
sql("""delete from tabBin where item_code=%s""", self.doc.item_code)
|
||||
sql("""delete from `tabStock Ledger Entry`
|
||||
where item_code=%s and is_cancelled='Yes' """, self.doc.item_code)
|
||||
|
||||
self.delete_web_cache(self.doc.page_name)
|
||||
|
||||
@@ -164,7 +166,7 @@ class DocType:
|
||||
msgprint("As Production Order can be made for this Item, then Is Stock Item Should be 'Yes' as we maintain it's stock. Refer Manufacturing and Inventory section.", raise_exception=1)
|
||||
|
||||
if self.doc.is_stock_item == "Yes" and not self.doc.default_warehouse:
|
||||
msgprint("As we maintain stock of this item, its better to maintain default warehouse. To add default warehouse please go to 'Inventory' section. It will be fetched automatically while making Sales Order, Delivery Note, etc.. ", 1)
|
||||
msgprint("Please set Default Warehouse for Stock Item", raise_exception=1)
|
||||
|
||||
if self.doc.has_serial_no == 'Yes' and self.doc.is_stock_item == 'No':
|
||||
msgprint("'Has Serial No' can not be 'Yes' for non-stock item", raise_exception=1)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{
|
||||
u'creation': '2012-10-26 16:49:39',
|
||||
u'docstatus': 0,
|
||||
u'modified': '2012-11-12 18:15:45',
|
||||
u'modified': '2012-11-16 12:35:02',
|
||||
u'modified_by': u'Administrator',
|
||||
u'owner': u'Administrator'
|
||||
},
|
||||
@@ -202,21 +202,6 @@
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'description': u'Enter unit of measurement in which stock of this item is maintained in your warehouse.',
|
||||
u'doctype': u'DocField',
|
||||
'fieldname': u'stock_uom',
|
||||
'fieldtype': u'Link',
|
||||
'label': u'Default UoM',
|
||||
'oldfieldname': u'stock_uom',
|
||||
'oldfieldtype': u'Link',
|
||||
'options': u'UOM',
|
||||
'permlevel': 0,
|
||||
'reqd': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
@@ -235,6 +220,8 @@
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'description': u'Mandatory if Stock Item is "Yes"',
|
||||
u'doctype': u'DocField',
|
||||
'fieldname': u'default_warehouse',
|
||||
'fieldtype': u'Link',
|
||||
@@ -245,6 +232,21 @@
|
||||
'permlevel': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'description': u'Enter unit of measurement in which stock of this item is maintained in your warehouse.',
|
||||
u'doctype': u'DocField',
|
||||
'fieldname': u'stock_uom',
|
||||
'fieldtype': u'Link',
|
||||
'label': u'Default UoM',
|
||||
'oldfieldname': u'stock_uom',
|
||||
'oldfieldtype': u'Link',
|
||||
'options': u'UOM',
|
||||
'permlevel': 0,
|
||||
'reqd': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
|
||||
Reference in New Issue
Block a user