[mappers] cleanup, remove dt_map, map_doclist and other such functions

This commit is contained in:
Rushabh Mehta
2013-07-08 11:08:27 +05:30
parent ed23cca9d3
commit a2a1ec765b
25 changed files with 75 additions and 213 deletions

View File

@@ -65,7 +65,6 @@ class DocType(BuyingController):
self.check_conversion_rate()
self.validate_bill_no_date()
self.validate_bill_no()
self.validate_reference_value()
self.validate_credit_acc()
self.clear_unallocated_advances("Purchase Invoice Advance", "advance_allocation_details")
self.check_for_acc_head_of_supplier()
@@ -244,12 +243,9 @@ class DocType(BuyingController):
msgprint("Supplier name %s do not match with supplier name of %s %s." %(self.doc.supplier,cstr(d.purchase_receipt)))
raise Exception , " Validation Error "
# Validate values with reference document
#----------------------------------------
def validate_reference_value(self):
get_obj('DocType Mapper', 'Purchase Order-Purchase Invoice', with_children = 1).validate_reference_value(self, self.doc.name)
# pass
# Validate PO and PR
# -------------------
def validate_po_pr(self, d):

View File

@@ -212,19 +212,10 @@ cur_frm.cscript.get_items = function(doc, dt, dn) {
//-----------------------------
cur_frm.cscript['Make Delivery Note'] = function() {
var doc = cur_frm.doc
n = wn.model.make_new_doc_and_get_name('Delivery Note');
$c('dt_map', args={
'docs':wn.model.compress([locals['Delivery Note'][n]]),
'from_doctype':doc.doctype,
'to_doctype':'Delivery Note',
'from_docname':doc.name,
'from_to_list':"[['Sales Invoice','Delivery Note'],['Sales Invoice Item','Delivery Note Item'],['Sales Taxes and Charges','Sales Taxes and Charges'],['Sales Team','Sales Team']]"
}, function(r,rt) {
loaddoc('Delivery Note', n);
}
);
wn.model.open_mapped_doc({
method: "accounts.doctype.sales_invoice.sales_invoice.make_delivery_note",
source_name: cur_frm.doc.name
})
}
cur_frm.cscript.make_bank_voucher = function() {