mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-04 22:18:27 +00:00
[mappers] cleanup, remove dt_map, map_doclist and other such functions
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user