[fix] [minor] set send_print_in_body_and_attachment in email settings

This commit is contained in:
Akhilesh Darjee
2013-12-06 18:49:48 +05:30
parent afc44cf54e
commit d9255abd46
7 changed files with 26 additions and 16 deletions

View File

@@ -5,6 +5,13 @@ from __future__ import unicode_literals
import webnotes
def execute():
doctype = webnotes.conn.sql("""select doctype from `tabSingles`
where doctype = 'Email Settings'""")
if not doctype:
email_settings = webnotes.bean("Email Settings", "Email Settings")
email_settings.doc.send_print_in_body_and_attachment = 1
email_settings.save()
webnotes.conn.sql("""update `tabSingles` set value = 1
where doctype = 'Email Settings' and field = 'send_print_in_body_and_attachment' and
ifnull(value,'')=''""")