webnotes.model.doctype (new version)

This commit is contained in:
Rushabh Mehta
2012-11-29 11:49:56 +05:30
parent a5d18706b7
commit d7fe2bfe1b
18 changed files with 15 additions and 842 deletions

View File

@@ -14,9 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
wn.require("public/app/js/communication.js");
//--------- ONLOAD -------------
cur_frm.cscript.onload = function(doc, cdt, cdn) {
cur_frm.add_fetch('customer', 'customer_name', 'customer_name');
cur_frm.add_fetch('supplier', 'supplier_name', 'supplier_name');
@@ -26,7 +23,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
}
cur_frm.cscript.refresh = function() {
cur_frm.communication_view = new erpnext.CommunicationView({
cur_frm.communication_view = new wn.views.CommunicationList({
list: wn.model.get("Communication", {"contact": doc.name}),
parent: cur_frm.fields_dict.communication_html.wrapper,
doc: doc,

View File

@@ -20,7 +20,7 @@ wn.doclistviews['Contact'] = wn.views.ListView.extend({
data.fullname = (data.first_name || '') +
(data.last_name ? ' ' + data.last_name : '');
if(!data.fullname) data.fullname = data.name;
data.fullname = repl("<a href='#!Form/Contact/%(name)s'>%(fullname)s\
data.fullname = repl("<a href='#!Form/Contact/%(name)s'>%(name)s\
</a>", data);
// prepare description