Merge pull request #178 from anandpdoshi/master
Fix: Email digest gets deleted if even one is disabled
diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt
index 497c99f..c194e7c 100644
--- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt
+++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt
@@ -5,7 +5,7 @@
{
'creation': '2010-08-08 17:09:18',
'docstatus': 0,
- 'modified': '2011-12-20 18:23:36',
+ 'modified': '2011-12-22 19:04:07',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
@@ -34,13 +34,12 @@
'server_code_error': ' ',
'show_in_menu': 0,
'subject': 'To %(customer_name)s worth %(currency)s %(grand_total_export)s due on %(due_date)s | %(outstanding_amount)s outstanding',
- 'version': 391
+ 'version': 392
},
# These values are common for all DocFormat
{
'doctype': 'DocFormat',
- 'format': 'POS Invoice',
'name': '__common__',
'parent': 'Receivable Voucher',
'parentfield': 'formats',
@@ -126,7 +125,32 @@
# DocFormat
{
- 'doctype': 'DocFormat'
+ 'doctype': 'DocFormat',
+ 'format': 'POS Invoice'
+ },
+
+ # DocFormat
+ {
+ 'doctype': 'DocFormat',
+ 'format': 'POS Invoice'
+ },
+
+ # DocFormat
+ {
+ 'doctype': 'DocFormat',
+ 'format': 'Sales Invoice Classic'
+ },
+
+ # DocFormat
+ {
+ 'doctype': 'DocFormat',
+ 'format': 'Sales Invoice Modern'
+ },
+
+ # DocFormat
+ {
+ 'doctype': 'DocFormat',
+ 'format': 'Sales Invoice Spartan'
},
# DocField
@@ -477,6 +501,7 @@
'label': 'Price List Currency',
'options': 'link:Currency',
'permlevel': 0,
+ 'print_hide': 1,
'reqd': 1
},
@@ -489,6 +514,7 @@
'fieldtype': 'Currency',
'label': 'Price List Currency Conversion Rate',
'permlevel': 0,
+ 'print_hide': 1,
'reqd': 1
},
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.py b/erpnext/buying/doctype/purchase_common/purchase_common.py
index 7612c19..84bfffb 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.py
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.py
@@ -248,7 +248,7 @@
raise Exception
# list criteria that should not repeat if item is stock item
- e = [d.schedule_date, d.item_code, d.warehouse, d.uom, d.fields.has_key('prevdoc_docname') and d.prevdoc_docname or '', d.fields.has_key('prevdoc_detail_docname') and d.prevdoc_detail_docname or '', d.fields.has_key('batch_no') and d.batch_no or '']
+ e = [d.schedule_date, d.item_code, d.description, d.warehouse, d.uom, d.fields.has_key('prevdoc_docname') and d.prevdoc_docname or '', d.fields.has_key('prevdoc_detail_docname') and d.prevdoc_detail_docname or '', d.fields.has_key('batch_no') and d.batch_no or '']
# if is not stock item
f = [d.schedule_date, d.item_code, d.description]
@@ -258,16 +258,16 @@
if ch and ch[0][0] == 'Yes':
# check for same items
if e in check_list:
- msgprint("Item %s has been entered more than once with same schedule date, warehouse and uom." % d.item_code)
- raise Exception
+ msgprint("""Item %s has been entered more than once with same description, schedule date, warehouse and uom.\n
+ Please change any of the field value to enter the item twice""" % d.item_code, raise_exception = 1)
else:
check_list.append(e)
elif ch and ch[0][0] == 'No':
# check for same items
if f in chk_dupl_itm:
- msgprint("Item %s has been entered more than once." % d.item_code)
- raise Exception
+ msgprint("""Item %s has been entered more than once with same description, schedule date.\n
+ Please change any of the field value to enter the item twice.""" % d.item_code, raise_exception = 1)
else:
chk_dupl_itm.append(f)
diff --git a/erpnext/patches/print_hide_price_list.py b/erpnext/patches/print_hide_price_list.py
new file mode 100644
index 0000000..833ab98
--- /dev/null
+++ b/erpnext/patches/print_hide_price_list.py
@@ -0,0 +1,3 @@
+def execute():
+ import webnotes
+ webnotes.conn.sql("update `tabDocField` set print_hide = 1 where fieldname in ('price_list_currency', 'plc_conversion_rate')")
diff --git a/erpnext/selling/doctype/quotation/quotation.txt b/erpnext/selling/doctype/quotation/quotation.txt
index 86b7b5f..ac58dc4 100644
--- a/erpnext/selling/doctype/quotation/quotation.txt
+++ b/erpnext/selling/doctype/quotation/quotation.txt
@@ -5,11 +5,20 @@
{
'creation': '2010-08-08 17:09:17',
'docstatus': 0,
- 'modified': '2011-12-20 14:01:09',
+ 'modified': '2011-12-22 19:03:04',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
+ # These values are common for all DocField
+ {
+ 'doctype': 'DocField',
+ 'name': '__common__',
+ 'parent': 'Quotation',
+ 'parentfield': 'fields',
+ 'parenttype': 'DocType'
+ },
+
# These values are common for all DocType
{
'_last_update': '1322549700',
@@ -32,15 +41,15 @@
'show_in_menu': 0,
'subject': 'To %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s',
'tag_fields': 'status',
- 'version': 597
+ 'version': 598
},
- # These values are common for all DocField
+ # These values are common for all DocFormat
{
- 'doctype': 'DocField',
+ 'doctype': 'DocFormat',
'name': '__common__',
'parent': 'Quotation',
- 'parentfield': 'fields',
+ 'parentfield': 'formats',
'parenttype': 'DocType'
},
@@ -169,6 +178,24 @@
'role': 'Maintenance User'
},
+ # DocFormat
+ {
+ 'doctype': 'DocFormat',
+ 'format': 'Quotation Classic'
+ },
+
+ # DocFormat
+ {
+ 'doctype': 'DocFormat',
+ 'format': 'Quotation Modern'
+ },
+
+ # DocFormat
+ {
+ 'doctype': 'DocFormat',
+ 'format': 'Quotation Spartan'
+ },
+
# DocField
{
'colour': 'White:FFF',
@@ -568,6 +595,7 @@
'label': 'Price List Currency',
'options': 'link:Currency',
'permlevel': 0,
+ 'print_hide': 1,
'reqd': 1
},
@@ -580,6 +608,7 @@
'fieldtype': 'Currency',
'label': 'Price List Currency Conversion Rate',
'permlevel': 0,
+ 'print_hide': 1,
'reqd': 1
},
diff --git a/erpnext/selling/doctype/sales_order/sales_order.txt b/erpnext/selling/doctype/sales_order/sales_order.txt
index d59f236..2e6ea99 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.txt
+++ b/erpnext/selling/doctype/sales_order/sales_order.txt
@@ -5,11 +5,20 @@
{
'creation': '2010-08-08 17:09:21',
'docstatus': 0,
- 'modified': '2011-12-20 12:55:02',
+ 'modified': '2011-12-22 19:03:25',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
+ # These values are common for all DocField
+ {
+ 'doctype': 'DocField',
+ 'name': '__common__',
+ 'parent': 'Sales Order',
+ 'parentfield': 'fields',
+ 'parenttype': 'DocType'
+ },
+
# These values are common for all DocType
{
'_last_update': '1324295218',
@@ -29,15 +38,15 @@
'show_in_menu': 0,
'subject': 'From %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s | %(per_delivered)s% delivered | %(per_billed)s% billed',
'tag_fields': 'delivery_status,billing_status',
- 'version': 608
+ 'version': 609
},
- # These values are common for all DocField
+ # These values are common for all DocFormat
{
- 'doctype': 'DocField',
+ 'doctype': 'DocFormat',
'name': '__common__',
'parent': 'Sales Order',
- 'parentfield': 'fields',
+ 'parentfield': 'formats',
'parenttype': 'DocType'
},
@@ -166,6 +175,24 @@
'role': 'Maintenance User'
},
+ # DocFormat
+ {
+ 'doctype': 'DocFormat',
+ 'format': 'Sales Order Classic'
+ },
+
+ # DocFormat
+ {
+ 'doctype': 'DocFormat',
+ 'format': 'Sales Order Modern'
+ },
+
+ # DocFormat
+ {
+ 'doctype': 'DocFormat',
+ 'format': 'Sales Order Spartan'
+ },
+
# DocField
{
'colour': 'White:FFF',
@@ -581,6 +608,7 @@
'label': 'Price List Currency',
'options': 'link:Currency',
'permlevel': 0,
+ 'print_hide': 1,
'reqd': 1
},
@@ -593,6 +621,7 @@
'fieldtype': 'Currency',
'label': 'Price List Currency Conversion Rate',
'permlevel': 0,
+ 'print_hide': 1,
'reqd': 1
},
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.txt b/erpnext/stock/doctype/delivery_note/delivery_note.txt
index dc905f5..5340955 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.txt
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.txt
@@ -5,7 +5,7 @@
{
'creation': '2011-04-18 15:58:20',
'docstatus': 0,
- 'modified': '2011-12-20 13:23:33',
+ 'modified': '2011-12-22 19:03:44',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
@@ -37,13 +37,12 @@
'show_in_menu': 0,
'subject': 'To %(customer_name)s on %(transaction_date)s | %(per_billed)s% billed',
'tag_fields': 'billing_status',
- 'version': 459
+ 'version': 460
},
# These values are common for all DocFormat
{
'doctype': 'DocFormat',
- 'format': 'Delivery Note Packing List Wise',
'name': '__common__',
'parent': 'Delivery Note',
'parentfield': 'formats',
@@ -143,7 +142,26 @@
# DocFormat
{
- 'doctype': 'DocFormat'
+ 'doctype': 'DocFormat',
+ 'format': 'Delivery Note Packing List Wise'
+ },
+
+ # DocFormat
+ {
+ 'doctype': 'DocFormat',
+ 'format': 'Delivery Note Classic'
+ },
+
+ # DocFormat
+ {
+ 'doctype': 'DocFormat',
+ 'format': 'Delivery Note Modern'
+ },
+
+ # DocFormat
+ {
+ 'doctype': 'DocFormat',
+ 'format': 'Delivery Note Spartan'
},
# DocField
@@ -567,6 +585,7 @@
'label': 'Price List Currency',
'options': 'link:Currency',
'permlevel': 0,
+ 'print_hide': 1,
'reqd': 1
},
@@ -579,6 +598,7 @@
'fieldtype': 'Currency',
'label': 'Price List Currency Conversion Rate',
'permlevel': 0,
+ 'print_hide': 1,
'reqd': 1
},