Merge branch 'latest' of github.com:webnotes/erpnext into latest

This commit is contained in:
Rushabh Mehta 2012-01-24 15:16:34 +05:30
commit 17a8a3697d
4 changed files with 19 additions and 12 deletions

View File

@ -5,16 +5,18 @@
{ {
'creation': '2010-08-08 17:09:15', 'creation': '2010-08-08 17:09:15',
'docstatus': 0, 'docstatus': 0,
'modified': '2010-09-20 17:30:25', 'modified': '2012-01-24 12:42:18',
'modified_by': 'Administrator', 'modified_by': 'Administrator',
'owner': 'wasim@webnotestech.com' 'owner': 'wasim@webnotestech.com'
}, },
# These values are common for all DocType # These values are common for all DocType
{ {
'_last_update': '1325570646',
'allow_trash': 1, 'allow_trash': 1,
'autoname': 'field:title', 'autoname': 'field:title',
'colour': 'White:FFF', 'colour': 'White:FFF',
'default_print_format': 'Standard',
'doctype': 'DocType', 'doctype': 'DocType',
'document_type': 'Master', 'document_type': 'Master',
'module': 'Buying', 'module': 'Buying',
@ -22,7 +24,7 @@
'section_style': 'Simple', 'section_style': 'Simple',
'server_code_error': ' ', 'server_code_error': ' ',
'show_in_menu': 0, 'show_in_menu': 0,
'version': 16 'version': 18
}, },
# These values are common for all DocField # These values are common for all DocField
@ -54,7 +56,6 @@
# DocPerm # DocPerm
{ {
'doctype': 'DocPerm', 'doctype': 'DocPerm',
'idx': 1,
'permlevel': 1, 'permlevel': 1,
'role': 'All' 'role': 'All'
}, },
@ -65,7 +66,6 @@
'cancel': 0, 'cancel': 0,
'create': 0, 'create': 0,
'doctype': 'DocPerm', 'doctype': 'DocPerm',
'idx': 2,
'permlevel': 0, 'permlevel': 0,
'role': 'Purchase Manager', 'role': 'Purchase Manager',
'submit': 0, 'submit': 0,
@ -77,7 +77,6 @@
'cancel': 1, 'cancel': 1,
'create': 1, 'create': 1,
'doctype': 'DocPerm', 'doctype': 'DocPerm',
'idx': 3,
'permlevel': 0, 'permlevel': 0,
'role': 'System Manager', 'role': 'System Manager',
'write': 1 'write': 1
@ -88,7 +87,6 @@
'cancel': 1, 'cancel': 1,
'create': 1, 'create': 1,
'doctype': 'DocPerm', 'doctype': 'DocPerm',
'idx': 4,
'permlevel': 0, 'permlevel': 0,
'role': 'Purchase Master Manager', 'role': 'Purchase Master Manager',
'submit': 0, 'submit': 0,
@ -100,7 +98,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'title', 'fieldname': 'title',
'fieldtype': 'Data', 'fieldtype': 'Data',
'idx': 1,
'in_filter': 1, 'in_filter': 1,
'label': 'Title', 'label': 'Title',
'oldfieldname': 'title', 'oldfieldname': 'title',
@ -109,12 +106,22 @@
'search_index': 0 'search_index': 0
}, },
# DocField
{
'doctype': 'DocField',
'fieldname': 'company',
'fieldtype': 'Link',
'in_filter': 1,
'label': 'Company',
'options': 'Company',
'reqd': 1
},
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'purchase_tax_details', 'fieldname': 'purchase_tax_details',
'fieldtype': 'Table', 'fieldtype': 'Table',
'idx': 2,
'label': 'Purchase Tax Details', 'label': 'Purchase Tax Details',
'oldfieldname': 'purchase_tax_details', 'oldfieldname': 'purchase_tax_details',
'oldfieldtype': 'Table', 'oldfieldtype': 'Table',

View File

@ -31,7 +31,7 @@ def patch_primary_contact():
GROUP BY sales_partner HAVING SUM(IFNULL(is_primary_contact, 0))=0 GROUP BY sales_partner HAVING SUM(IFNULL(is_primary_contact, 0))=0
) )
""", as_list=1) """, as_list=1)
names = ", ".join(["'" + str(r[0]) + "'" for r in res if r]) names = ", ".join(['"' + str(r[0]) + '"' for r in res if r])
if names: webnotes.conn.sql("UPDATE `tabContact` SET is_primary_contact=1 WHERE name IN (%s)" % names) if names: webnotes.conn.sql("UPDATE `tabContact` SET is_primary_contact=1 WHERE name IN (%s)" % names)
def patch_primary_address(): def patch_primary_address():
@ -54,5 +54,5 @@ def patch_primary_address():
AND SUM(IFNULL(is_shipping_address, 0))=0 AND SUM(IFNULL(is_shipping_address, 0))=0
) )
""", as_list=1) """, as_list=1)
names = ", ".join(["'" + str(r[0]) + "'" for r in res if r]) names = ", ".join(['"' + str(r[0]) + '"' for r in res if r])
if names: webnotes.conn.sql("UPDATE `tabAddress` SET is_primary_address=1 WHERE name IN (%s)" % names) if names: webnotes.conn.sql("UPDATE `tabAddress` SET is_primary_address=1 WHERE name IN (%s)" % names)

View File

@ -37,7 +37,7 @@ patch_list = [
}, },
{ {
'patch_module': 'patches.jan_mar_2012', 'patch_module': 'patches.jan_mar_2012',
'patch_file': 'customer_address_contact', 'patch_file': 'customer_address_contact_patch',
'description': "Install Customer Address Contact report and run patches regarding primary address and contact" 'description': "Install Customer Address Contact report and run patches regarding primary address and contact"
}, },
] ]

View File

@ -19,7 +19,7 @@ class DocType(TransactionBase):
if not self.doc.new_response: if not self.doc.new_response:
webnotes.msgprint("Please write something as a response", raise_exception=1) webnotes.msgprint("Please write something as a response", raise_exception=1)
subject = '[' + self.doc.name + '] ' + self.doc.subject subject = '[' + self.doc.name + '] ' + (self.doc.subject or 'No Subject Specified')
response = self.doc.new_response + '\n\n[Please do not change the subject while responding.]' response = self.doc.new_response + '\n\n[Please do not change the subject while responding.]'