mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 07:02:54 +00:00
Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
9
patches/february_2013/p09_remove_cancelled_warehouses.py
Normal file
9
patches/february_2013/p09_remove_cancelled_warehouses.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import webnotes
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
for w in webnotes.conn.sql("""select name from `tabWarehouse` where docstatus=2"""):
|
||||||
|
try:
|
||||||
|
webnotes.delete_doc("Warehouse", w[0])
|
||||||
|
except webnotes.ValidationError:
|
||||||
|
pass
|
||||||
|
|
||||||
@@ -200,4 +200,5 @@ patch_list = [
|
|||||||
'execute:webnotes.reload_doc("accounts", "Print Format", "Sales Invoice Modern") # 2013-02-26',
|
'execute:webnotes.reload_doc("accounts", "Print Format", "Sales Invoice Modern") # 2013-02-26',
|
||||||
'execute:webnotes.reload_doc("accounts", "Print Format", "Sales Invoice Spartan") # 2013-02-26',
|
'execute:webnotes.reload_doc("accounts", "Print Format", "Sales Invoice Spartan") # 2013-02-26',
|
||||||
"execute:(not webnotes.conn.exists('Role', 'Projects Manager')) and webnotes.doc({'doctype':'Role', 'role_name':'Projects Manager'}).insert()",
|
"execute:(not webnotes.conn.exists('Role', 'Projects Manager')) and webnotes.doc({'doctype':'Role', 'role_name':'Projects Manager'}).insert()",
|
||||||
|
"patches.february_2013.p09_remove_cancelled_warehouses",
|
||||||
]
|
]
|
||||||
@@ -293,7 +293,7 @@ class DocType(BuyingController):
|
|||||||
webnotes.msgprint(_("""Please enter whether Purchase Recipt is made for subcontracting
|
webnotes.msgprint(_("""Please enter whether Purchase Recipt is made for subcontracting
|
||||||
or purchasing, in 'Is Subcontracted' field"""), raise_exception=1)
|
or purchasing, in 'Is Subcontracted' field"""), raise_exception=1)
|
||||||
|
|
||||||
if self.doc.is_subcontracted and not self.doc.supplier_warehouse:
|
if self.doc.is_subcontracted=="Yes" and not self.doc.supplier_warehouse:
|
||||||
webnotes.msgprint(_("Please Enter Supplier Warehouse for subcontracted Items"),
|
webnotes.msgprint(_("Please Enter Supplier Warehouse for subcontracted Items"),
|
||||||
raise_exception=1)
|
raise_exception=1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user