Skip to content

Commit

Permalink
[fix] [minor] set send_print_in_body_and_attachment in email settings
Browse files Browse the repository at this point in the history
  • Loading branch information
akhileshdarjee committed Dec 6, 2013
1 parent afc44cf commit d9255ab
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 16 deletions.
4 changes: 2 additions & 2 deletions hr/doctype/earning_type/earning_type.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"creation": "2013-01-24 11:03:32",
"docstatus": 0,
"modified": "2013-07-22 15:25:26",
"modified": "2013-12-06 15:16:11",
"modified_by": "Administrator",
"owner": "Administrator"
},
Expand Down Expand Up @@ -85,7 +85,7 @@
"doctype": "DocField",
"fieldname": "exemption_limit",
"fieldtype": "Float",
"hidden": 1,
"hidden": 0,
"label": "Exemption Limit",
"oldfieldname": "exemption_limit",
"oldfieldtype": "Currency"
Expand Down
10 changes: 6 additions & 4 deletions manufacturing/doctype/bom/bom.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"creation": "2013-01-22 15:11:38",
"docstatus": 0,
"modified": "2013-12-04 11:51:36",
"modified": "2013-12-06 18:48:23",
"modified_by": "Administrator",
"owner": "Administrator"
},
Expand Down Expand Up @@ -120,18 +120,20 @@
"options": "Price List"
},
{
"depends_on": "with_operations",
"description": "Specify the operations, operating cost and give a unique Operation no to your operations.",
"doctype": "DocField",
"fieldname": "operations",
"fieldtype": "Section Break",
"hidden": 0,
"label": "Operations",
"oldfieldtype": "Section Break",
"options": "Specify the operations, operating cost and give a unique Operation no to your operations."
"oldfieldtype": "Section Break"
},
{
"depends_on": "with_operations",
"doctype": "DocField",
"fieldname": "bom_operations",
"fieldtype": "Table",
"hidden": 0,
"label": "BOM Operations",
"oldfieldname": "bom_operations",
"oldfieldtype": "Table",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
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,'')=''""")
3 changes: 2 additions & 1 deletion setup/doctype/email_settings/email_settings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"creation": "2013-03-25 17:53:21",
"docstatus": 0,
"modified": "2013-11-28 11:54:42",
"modified": "2013-12-06 13:12:25",
"modified_by": "Administrator",
"owner": "Administrator"
},
Expand Down Expand Up @@ -103,6 +103,7 @@
"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.",
"doctype": "DocField",
"fieldname": "send_print_in_body_and_attachment",
Expand Down
4 changes: 2 additions & 2 deletions stock/doctype/delivery_note/delivery_note.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:09",
"docstatus": 0,
"modified": "2013-11-03 14:20:19",
"modified": "2013-12-06 15:15:49",
"modified_by": "Administrator",
"owner": "Administrator"
},
Expand Down Expand Up @@ -229,7 +229,7 @@
"doctype": "DocField",
"fieldname": "po_date",
"fieldtype": "Date",
"hidden": 1,
"hidden": 0,
"label": "Customer's Purchase Order Date",
"no_copy": 0,
"oldfieldname": "po_date",
Expand Down
4 changes: 2 additions & 2 deletions stock/doctype/stock_entry/stock_entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ cur_frm.script_manager.make(erpnext.stock.StockEntry);

cur_frm.cscript.toggle_related_fields = function(doc) {
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("to_warehouse", !disable_to_warehouse);
Expand Down Expand Up @@ -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.toggle_related_fields(doc, cdt, cdn);
cur_frm.cscript.toggle_related_fields(doc);
}

// Overloaded query for link batch_no
Expand Down
10 changes: 5 additions & 5 deletions stock/doctype/stock_entry/stock_entry.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"creation": "2013-04-09 11:43:55",
"docstatus": 0,
"modified": "2013-11-03 14:11:42",
"modified": "2013-12-06 15:15:25",
"modified_by": "Administrator",
"owner": "Administrator"
},
Expand Down Expand Up @@ -108,7 +108,7 @@
"doctype": "DocField",
"fieldname": "delivery_note_no",
"fieldtype": "Link",
"hidden": 1,
"hidden": 0,
"in_filter": 0,
"label": "Delivery Note No",
"no_copy": 1,
Expand All @@ -126,7 +126,7 @@
"doctype": "DocField",
"fieldname": "sales_invoice_no",
"fieldtype": "Link",
"hidden": 1,
"hidden": 0,
"label": "Sales Invoice No",
"no_copy": 1,
"options": "Sales Invoice",
Expand All @@ -139,7 +139,7 @@
"doctype": "DocField",
"fieldname": "purchase_receipt_no",
"fieldtype": "Link",
"hidden": 1,
"hidden": 0,
"in_filter": 0,
"label": "Purchase Receipt No",
"no_copy": 1,
Expand Down Expand Up @@ -299,7 +299,7 @@
"doctype": "DocField",
"fieldname": "production_order",
"fieldtype": "Link",
"hidden": 1,
"hidden": 0,
"in_filter": 1,
"label": "Production Order",
"no_copy": 0,
Expand Down

0 comments on commit d9255ab

Please sign in to comment.