mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-18 12:39:18 +00:00
working on merging sales purchase return into stock entry
This commit is contained in:
18
patches/march_2013/p04_pos_update_stock_check.py
Normal file
18
patches/march_2013/p04_pos_update_stock_check.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
from webnotes.utils import cint
|
||||
webnotes.reload_doc("setup", "doctype", "global_defaults")
|
||||
|
||||
doctype_list = webnotes.get_doctype("Sales Invoice")
|
||||
update_stock_df = doctype_list.get_field("update_stock")
|
||||
|
||||
global_defaults = webnotes.bean("Global Defaults", "Global Defaults")
|
||||
global_defaults.doc.update_stock = cint(update_stock_df.default)
|
||||
global_defaults.save()
|
||||
|
||||
webnotes.conn.sql("""delete from `tabProperty Setter`
|
||||
where doc_type='Sales Invoice' and doctype_or_field='DocField'
|
||||
and field_name='update_stock' and property='default'""")
|
||||
|
||||
webnotes.reload_doc("accounts", "doctype", "sales_invoice")
|
||||
@@ -213,4 +213,5 @@ patch_list = [
|
||||
"patches.march_2013.p03_rename_blog_to_blog_post",
|
||||
"execute:webnotes.bean('Style Settings', 'Style Settings').save()",
|
||||
"execute:webnotes.reload_doc('hr', 'search_criteria', 'monthly_attendance_details')",
|
||||
"patches.march_2013.p04_pos_update_stock_check",
|
||||
]
|
||||
Reference in New Issue
Block a user