working on merging sales purchase return into stock entry

This commit is contained in:
Anand Doshi
2013-03-13 12:57:04 +05:30
parent f55922e962
commit 71bed3116f
14 changed files with 365 additions and 48 deletions

View 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")

View File

@@ -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",
]