added status to Contact and fix bug in communication pull

This commit is contained in:
Rushabh Mehta
2013-02-11 14:54:30 +05:30
parent af222dc6b2
commit 176829e53c
7 changed files with 55 additions and 45 deletions

View File

@@ -22,7 +22,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query;
}
cur_frm.cscript.refresh = function() {
cur_frm.cscript.refresh = function(doc) {
cur_frm.communication_view = new wn.views.CommunicationList({
list: wn.model.get("Communication", {"contact": doc.name}),
parent: cur_frm.fields_dict.communication_html.wrapper,

View File

@@ -28,6 +28,9 @@ class DocType(TransactionBase):
def onload(self):
self.add_communication_list()
def on_communication_sent(self, comm):
webnotes.conn.set(self.doc, 'status', 'Replied')
def autoname(self):
if self.doc.customer:
self.doc.name = self.doc.first_name + (self.doc.last_name and ' ' + self.doc.last_name or '') + '-' + self.doc.customer

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:32",
"docstatus": 0,
"modified": "2013-01-29 13:26:39",
"modified": "2013-02-11 14:32:13",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -61,6 +61,13 @@
"fieldname": "cb00",
"fieldtype": "Column Break"
},
{
"doctype": "DocField",
"fieldname": "status",
"fieldtype": "Select",
"label": "Status",
"options": "\nOpen\nReplied"
},
{
"doctype": "DocField",
"fieldname": "email_id",