mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
Merge branch 'edge' of github.com:webnotes/erpnext into webshop
Conflicts: accounts/doctype/sales_invoice_item/sales_invoice_item.txt selling/doctype/quotation/quotation.txt selling/doctype/quotation_item/quotation_item.txt selling/doctype/sales_order_item/sales_order_item.txt stock/doctype/delivery_note_item/delivery_note_item.txt stock/doctype/item/item.txt
This commit is contained in:
@@ -51,6 +51,7 @@ class DocType(DocListController):
|
||||
self.validate_barcode()
|
||||
self.check_non_asset_warehouse()
|
||||
self.cant_change()
|
||||
self.validate_item_type_for_reorder()
|
||||
|
||||
if self.doc.name:
|
||||
self.old_page_name = webnotes.conn.get_value('Item', self.doc.name, 'page_name')
|
||||
@@ -201,6 +202,13 @@ class DocType(DocListController):
|
||||
webnotes.msgprint(_("As there are existing stock transactions for this \
|
||||
item, you can not change the values of 'Has Serial No', \
|
||||
'Is Stock Item' and 'Valuation Method'"), raise_exception=1)
|
||||
|
||||
def validate_item_type_for_reorder(self):
|
||||
if self.doc.re_order_level or len(self.doclist.get({"parentfield": "item_reorder",
|
||||
"material_request_type": "Purchase"})):
|
||||
if not self.doc.is_purchase_item:
|
||||
webnotes.msgprint(_("""To set reorder level, item must be Purchase Item"""),
|
||||
raise_exception=1)
|
||||
|
||||
def check_if_sle_exists(self):
|
||||
sle = webnotes.conn.sql("""select name from `tabStock Ledger Entry`
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-05-03 10:45:46",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-05-07 16:00:00",
|
||||
"modified": "2013-05-22 15:49:27",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -363,21 +363,6 @@
|
||||
"label": "Re-Order Qty",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break_31",
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.is_stock_item==\"Yes\"",
|
||||
"description": "Send an email to users of role \"Material Manager\" and \"Purchase Manager\" when re-order level is crossed.",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "email_notify",
|
||||
"fieldtype": "Check",
|
||||
"label": "Notify by Email on Re-order",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "section_break_31",
|
||||
|
||||
Reference in New Issue
Block a user