[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

@ -2,7 +2,7 @@
{ {
"creation": "2013-01-24 11:03:32", "creation": "2013-01-24 11:03:32",
"docstatus": 0, "docstatus": 0,
"modified": "2013-07-22 15:25:26", "modified": "2013-12-06 15:16:11",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -85,7 +85,7 @@
"doctype": "DocField", "doctype": "DocField",
"fieldname": "exemption_limit", "fieldname": "exemption_limit",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 1, "hidden": 0,
"label": "Exemption Limit", "label": "Exemption Limit",
"oldfieldname": "exemption_limit", "oldfieldname": "exemption_limit",
"oldfieldtype": "Currency" "oldfieldtype": "Currency"

View File

@ -2,7 +2,7 @@
{ {
"creation": "2013-01-22 15:11:38", "creation": "2013-01-22 15:11:38",
"docstatus": 0, "docstatus": 0,
"modified": "2013-12-04 11:51:36", "modified": "2013-12-06 18:48:23",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -120,18 +120,20 @@
"options": "Price List" "options": "Price List"
}, },
{ {
"depends_on": "with_operations", "description": "Specify the operations, operating cost and give a unique Operation no to your operations.",
"doctype": "DocField", "doctype": "DocField",
"fieldname": "operations", "fieldname": "operations",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0,
"label": "Operations", "label": "Operations",
"oldfieldtype": "Section Break", "oldfieldtype": "Section Break"
"options": "Specify the operations, operating cost and give a unique Operation no to your operations."
}, },
{ {
"depends_on": "with_operations",
"doctype": "DocField", "doctype": "DocField",
"fieldname": "bom_operations", "fieldname": "bom_operations",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0,
"label": "BOM Operations", "label": "BOM Operations",
"oldfieldname": "bom_operations", "oldfieldname": "bom_operations",
"oldfieldtype": "Table", "oldfieldtype": "Table",

View File

@ -5,6 +5,13 @@ from __future__ import unicode_literals
import webnotes import webnotes
def execute(): 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 webnotes.conn.sql("""update `tabSingles` set value = 1
where doctype = 'Email Settings' and field = 'send_print_in_body_and_attachment' and where doctype = 'Email Settings' and field = 'send_print_in_body_and_attachment' and
ifnull(value,'')=''""") ifnull(value,'')=''""")

View File

@ -2,7 +2,7 @@
{ {
"creation": "2013-03-25 17:53:21", "creation": "2013-03-25 17:53:21",
"docstatus": 0, "docstatus": 0,
"modified": "2013-11-28 11:54:42", "modified": "2013-12-06 13:12:25",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -103,6 +103,7 @@
"label": "Auto Email Id" "label": "Auto Email Id"
}, },
{ {
"default": "1",
"description": "If checked, an email with an attached HTML format will be added to part of the EMail body as well as attachment. To only send as attachment, uncheck this.", "description": "If checked, an email with an attached HTML format will be added to part of the EMail body as well as attachment. To only send as attachment, uncheck this.",
"doctype": "DocField", "doctype": "DocField",
"fieldname": "send_print_in_body_and_attachment", "fieldname": "send_print_in_body_and_attachment",

View File

@ -2,7 +2,7 @@
{ {
"creation": "2013-05-24 19:29:09", "creation": "2013-05-24 19:29:09",
"docstatus": 0, "docstatus": 0,
"modified": "2013-11-03 14:20:19", "modified": "2013-12-06 15:15:49",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -229,7 +229,7 @@
"doctype": "DocField", "doctype": "DocField",
"fieldname": "po_date", "fieldname": "po_date",
"fieldtype": "Date", "fieldtype": "Date",
"hidden": 1, "hidden": 0,
"label": "Customer's Purchase Order Date", "label": "Customer's Purchase Order Date",
"no_copy": 0, "no_copy": 0,
"oldfieldname": "po_date", "oldfieldname": "po_date",

View File

@ -244,7 +244,7 @@ cur_frm.script_manager.make(erpnext.stock.StockEntry);
cur_frm.cscript.toggle_related_fields = function(doc) { cur_frm.cscript.toggle_related_fields = function(doc) {
disable_from_warehouse = inList(["Material Receipt", "Sales Return"], doc.purpose); disable_from_warehouse = inList(["Material Receipt", "Sales Return"], doc.purpose);
disable_to_warehouse = inList(["Material Issue", "Purchase Return"], doc.purpose) disable_to_warehouse = inList(["Material Issue", "Purchase Return"], doc.purpose);
cur_frm.toggle_enable("from_warehouse", !disable_from_warehouse); cur_frm.toggle_enable("from_warehouse", !disable_from_warehouse);
cur_frm.toggle_enable("to_warehouse", !disable_to_warehouse); cur_frm.toggle_enable("to_warehouse", !disable_to_warehouse);
@ -302,7 +302,7 @@ cur_frm.fields_dict['production_order'].get_query = function(doc) {
} }
cur_frm.cscript.purpose = function(doc, cdt, cdn) { cur_frm.cscript.purpose = function(doc, cdt, cdn) {
cur_frm.cscript.toggle_related_fields(doc, cdt, cdn); cur_frm.cscript.toggle_related_fields(doc);
} }
// Overloaded query for link batch_no // Overloaded query for link batch_no

View File

@ -2,7 +2,7 @@
{ {
"creation": "2013-04-09 11:43:55", "creation": "2013-04-09 11:43:55",
"docstatus": 0, "docstatus": 0,
"modified": "2013-11-03 14:11:42", "modified": "2013-12-06 15:15:25",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@ -108,7 +108,7 @@
"doctype": "DocField", "doctype": "DocField",
"fieldname": "delivery_note_no", "fieldname": "delivery_note_no",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1, "hidden": 0,
"in_filter": 0, "in_filter": 0,
"label": "Delivery Note No", "label": "Delivery Note No",
"no_copy": 1, "no_copy": 1,
@ -126,7 +126,7 @@
"doctype": "DocField", "doctype": "DocField",
"fieldname": "sales_invoice_no", "fieldname": "sales_invoice_no",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1, "hidden": 0,
"label": "Sales Invoice No", "label": "Sales Invoice No",
"no_copy": 1, "no_copy": 1,
"options": "Sales Invoice", "options": "Sales Invoice",
@ -139,7 +139,7 @@
"doctype": "DocField", "doctype": "DocField",
"fieldname": "purchase_receipt_no", "fieldname": "purchase_receipt_no",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1, "hidden": 0,
"in_filter": 0, "in_filter": 0,
"label": "Purchase Receipt No", "label": "Purchase Receipt No",
"no_copy": 1, "no_copy": 1,
@ -299,7 +299,7 @@
"doctype": "DocField", "doctype": "DocField",
"fieldname": "production_order", "fieldname": "production_order",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 1, "hidden": 0,
"in_filter": 1, "in_filter": 1,
"label": "Production Order", "label": "Production Order",
"no_copy": 0, "no_copy": 0,