Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta 2012-11-14 07:54:07 +01:00
commit ee746256eb
2 changed files with 109 additions and 104 deletions

View File

@ -93,7 +93,12 @@ class DocType:
return self.get_msg_html(out) return self.get_msg_html(out)
def get_msg_html(self, out): def get_msg_html(self, out):
with_value = "\n".join([o[1] for o in out if o[0]]) with_value = [o[1] for o in out if o[0]
if with_value:
with_value = "\n".join(with_value)
else:
with_value = "<p>There were no updates in the items selected for this digest.</p>"
# seperate out no value items # seperate out no value items
no_value = [o[1] for o in out if not o[0]] no_value = [o[1] for o in out if not o[0]]
@ -351,7 +356,7 @@ class DocType:
"".join(["<p>%(name)s: %(subject)s <br>by %(raised_by)s on %(modified)s</p>" % \ "".join(["<p>%(name)s: %(subject)s <br>by %(raised_by)s on %(modified)s</p>" % \
t for t in open_tickets]) t for t in open_tickets])
else: else:
return 0, "" return 0, "No Open Tickets!"
def onload(self): def onload(self):
self.get_next_sending() self.get_next_sending()

View File

@ -3,29 +3,29 @@
# These values are common in all dictionaries # These values are common in all dictionaries
{ {
'creation': '2012-06-26 11:58:13', u'creation': '2012-08-31 17:14:18',
'docstatus': 0, u'docstatus': 0,
'modified': '2012-08-31 16:44:13', u'modified': '2012-11-14 12:15:56',
'modified_by': u'Administrator', u'modified_by': u'Administrator',
'owner': u'Administrator' u'owner': u'Administrator'
}, },
# These values are common for all DocType # These values are common for all DocType
{ {
'allow_attach': 1, 'allow_attach': 1,
'description': u'Keep a track of all communications', 'description': u'Keep a track of all communications',
'doctype': 'DocType', u'doctype': u'DocType',
'document_type': u'Master', 'document_type': u'Master',
'in_dialog': 1, 'in_dialog': 1,
'module': u'Support', 'module': u'Support',
'name': '__common__', u'name': u'__common__',
'version': 1 'version': 1
}, },
# These values are common for all DocField # These values are common for all DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'name': '__common__', u'name': u'__common__',
'parent': u'Communication', 'parent': u'Communication',
'parentfield': u'fields', 'parentfield': u'fields',
'parenttype': u'DocType' 'parenttype': u'DocType'
@ -33,80 +33,24 @@
# These values are common for all DocPerm # These values are common for all DocPerm
{ {
'amend': 0, u'doctype': u'DocPerm',
'doctype': u'DocPerm', u'name': u'__common__',
'name': '__common__',
'parent': u'Communication', 'parent': u'Communication',
'parentfield': u'permissions', 'parentfield': u'permissions',
'parenttype': u'DocType', 'parenttype': u'DocType',
'read': 1, 'read': 1,
'submit': 0,
'write': 1 'write': 1
}, },
# DocType, Communication # DocType, Communication
{ {
'doctype': 'DocType', u'doctype': u'DocType',
'name': u'Communication' u'name': u'Communication'
},
# DocPerm
{
'cancel': 0,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Support Team'
},
# DocPerm
{
'cancel': 0,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Sales Manager'
},
# DocPerm
{
'cancel': 0,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Sales User'
},
# DocPerm
{
'cancel': 0,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Sales Manager'
},
# DocPerm
{
'cancel': 1,
'create': 0,
'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Support Manager'
},
# DocPerm
{
'cancel': 1,
'create': 1,
'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Support Manager'
}, },
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'basic_info', 'fieldname': u'basic_info',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'label': u'Basic Info', 'label': u'Basic Info',
@ -117,7 +61,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'default': u'COMM-', 'default': u'COMM-',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'naming_series', 'fieldname': u'naming_series',
'fieldtype': u'Select', 'fieldtype': u'Select',
'hidden': 1, 'hidden': 1,
@ -128,7 +72,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'category', 'fieldname': u'category',
'fieldtype': u'Select', 'fieldtype': u'Select',
'label': u'Category', 'label': u'Category',
@ -139,7 +83,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'action', 'fieldname': u'action',
'fieldtype': u'Select', 'fieldtype': u'Select',
'label': u'Action', 'label': u'Action',
@ -150,7 +94,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'next_communication_date', 'fieldname': u'next_communication_date',
'fieldtype': u'Date', 'fieldtype': u'Date',
'label': u'Next Communcation On', 'label': u'Next Communcation On',
@ -159,7 +103,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'column_break2', 'fieldname': u'column_break2',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'permlevel': 0 'permlevel': 0
@ -167,7 +111,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'subject', 'fieldname': u'subject',
'fieldtype': u'Small Text', 'fieldtype': u'Small Text',
'label': u'Subject', 'label': u'Subject',
@ -177,7 +121,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'section_break1', 'fieldname': u'section_break1',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'options': u'simple', 'options': u'simple',
@ -186,7 +130,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'content', 'fieldname': u'content',
'fieldtype': u'Text', 'fieldtype': u'Text',
'label': u'Content', 'label': u'Content',
@ -196,7 +140,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'additional_info', 'fieldname': u'additional_info',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'label': u'Additional Info', 'label': u'Additional Info',
@ -206,16 +150,16 @@
# DocField # DocField
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'column_break3', 'fieldname': u'column_break3',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'label': u'Communication With / Related To', 'label': u'Related To',
'permlevel': 0 'permlevel': 0
}, },
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'lead', 'fieldname': u'lead',
'fieldtype': u'Link', 'fieldtype': u'Link',
'hidden': 0, 'hidden': 0,
@ -226,7 +170,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'contact', 'fieldname': u'contact',
'fieldtype': u'Link', 'fieldtype': u'Link',
'label': u'Contact', 'label': u'Contact',
@ -236,7 +180,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'customer', 'fieldname': u'customer',
'fieldtype': u'Link', 'fieldtype': u'Link',
'label': u'Customer', 'label': u'Customer',
@ -246,7 +190,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'supplier', 'fieldname': u'supplier',
'fieldtype': u'Link', 'fieldtype': u'Link',
'label': u'Supplier', 'label': u'Supplier',
@ -256,7 +200,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'opportunity', 'fieldname': u'opportunity',
'fieldtype': u'Link', 'fieldtype': u'Link',
'label': u'Opportunity', 'label': u'Opportunity',
@ -266,7 +210,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'quotation', 'fieldname': u'quotation',
'fieldtype': u'Link', 'fieldtype': u'Link',
'label': u'Quotation', 'label': u'Quotation',
@ -276,7 +220,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'support_ticket', 'fieldname': u'support_ticket',
'fieldtype': u'Link', 'fieldtype': u'Link',
'label': u'Support Ticket', 'label': u'Support Ticket',
@ -286,7 +230,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'column_break1', 'fieldname': u'column_break1',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'permlevel': 0 'permlevel': 0
@ -294,7 +238,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'communication_medium', 'fieldname': u'communication_medium',
'fieldtype': u'Select', 'fieldtype': u'Select',
'label': u'Communication Medium', 'label': u'Communication Medium',
@ -304,7 +248,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'phone_no', 'fieldname': u'phone_no',
'fieldtype': u'Data', 'fieldtype': u'Data',
'label': u'Phone No.', 'label': u'Phone No.',
@ -313,7 +257,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'email_address', 'fieldname': u'email_address',
'fieldtype': u'Data', 'fieldtype': u'Data',
'label': u'Email Address', 'label': u'Email Address',
@ -322,7 +266,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'section_break2', 'fieldname': u'section_break2',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'options': u'simple', 'options': u'simple',
@ -331,10 +275,10 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'column_break4', 'fieldname': u'column_break4',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'label': u'Communication Carried Out By', 'label': u'By',
'permlevel': 0 'permlevel': 0
}, },
@ -342,7 +286,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'default': u'__user', 'default': u'__user',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'user', 'fieldname': u'user',
'fieldtype': u'Link', 'fieldtype': u'Link',
'label': u'User', 'label': u'User',
@ -352,7 +296,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'sales_person', 'fieldname': u'sales_person',
'fieldtype': u'Link', 'fieldtype': u'Link',
'label': u'Sales Person', 'label': u'Sales Person',
@ -362,10 +306,10 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'column_break5', 'fieldname': u'column_break5',
'fieldtype': u'Column Break', 'fieldtype': u'Column Break',
'label': u'Communication Carried Out On', 'label': u'On',
'permlevel': 0 'permlevel': 0
}, },
@ -373,7 +317,7 @@
{ {
'colour': u'White:FFF', 'colour': u'White:FFF',
'default': u'Today', 'default': u'Today',
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'communication_date', 'fieldname': u'communication_date',
'fieldtype': u'Date', 'fieldtype': u'Date',
'label': u'Date', 'label': u'Date',
@ -382,7 +326,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'file_list', 'fieldname': u'file_list',
'fieldtype': u'Text', 'fieldtype': u'Text',
'hidden': 1, 'hidden': 1,
@ -394,7 +338,7 @@
# DocField # DocField
{ {
'doctype': u'DocField', u'doctype': u'DocField',
'fieldname': u'_user_tags', 'fieldname': u'_user_tags',
'fieldtype': u'Data', 'fieldtype': u'Data',
'hidden': 1, 'hidden': 1,
@ -402,5 +346,61 @@
'no_copy': 1, 'no_copy': 1,
'permlevel': 0, 'permlevel': 0,
'print_hide': 1 'print_hide': 1
},
# DocPerm
{
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Support Team'
},
# DocPerm
{
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Sales Manager'
},
# DocPerm
{
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Sales User'
},
# DocPerm
{
u'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Sales Manager'
},
# DocPerm
{
u'doctype': u'DocPerm',
'permlevel': 1,
'role': u'Support Manager'
},
# DocPerm
{
'cancel': 1,
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'Support Manager'
},
# DocPerm
{
'cancel': 1,
'create': 1,
u'doctype': u'DocPerm',
'permlevel': 0,
'role': u'System Manager'
} }
] ]