delete mapper b4 doctype

This commit is contained in:
nabinhait
2011-07-04 12:18:24 +05:30
parent d4403c3ec8
commit b0c3bfc454
3 changed files with 77 additions and 79 deletions

View File

@@ -150,11 +150,11 @@ def run_patches():
dt_module = {'LC PR Detail':'Stock', 'Landed Cost Detail':'Stock', 'Comment Widget Record': 'Core', 'Tag':'Core', 'Tag Detail': 'Core'} dt_module = {'LC PR Detail':'Stock', 'Landed Cost Detail':'Stock', 'Comment Widget Record': 'Core', 'Tag':'Core', 'Tag Detail': 'Core'}
for d in dt_module.keys(): for d in dt_module.keys():
sql("update `tabDocType` set module = '%s' where name = '%s'" % (dt_module[d], d)) sql("update `tabDocType` set module = '%s' where name = '%s'" % (dt_module[d], d))
delete_unwanted_mappers()
delete_unwanted_doctypes() delete_unwanted_doctypes()
sql("start transaction") sql("start transaction")
delete_unwanted_pages() delete_unwanted_pages()
delete_unwanted_mappers()
delete_unwanted_search_criteria() delete_unwanted_search_criteria()
delete_unwanted_modules() delete_unwanted_modules()

View File

@@ -224,7 +224,8 @@ SetupData = function(cnty){
['Price List',1,'Price List','','Price list master'], ['Price List',1,'Price List','','Price list master'],
['UOM',1,'UOM','','Unit of measure (UOM) master'], ['UOM',1,'UOM','','Unit of measure (UOM) master'],
['Warehouse Type',1,'Warehouse Type','','Warehouse classifications'], ['Warehouse Type',1,'Warehouse Type','','Warehouse classifications'],
['Warehouse',1,'Warehouse','','Warehouse master']]}; ['Warehouse',1,'Warehouse','','Warehouse master'],
['Landed Cost Master', 1, 'Landed Cost Master', '', 'You can create master template for landed cost wizard']]};
this.buying = {'Buying':[['Supplier Type',1,'Supplier Type','','Manage supplier classifications'], this.buying = {'Buying':[['Supplier Type',1,'Supplier Type','','Manage supplier classifications'],
['Supplier',1,'Supplier','id'+NEWLINE+'supplier_type'+NEWLINE+'supplier_status'+NEWLINE+'company','Supplier master']]}; ['Supplier',1,'Supplier','id'+NEWLINE+'supplier_type'+NEWLINE+'supplier_status'+NEWLINE+'company','Supplier master']]};

View File

@@ -22,7 +22,6 @@ class DocType:
self.doc = doc self.doc = doc
self.doclist = doclist self.doclist = doclist
def get_purchase_receipts(self): def get_purchase_receipts(self):
self.doc.clear_table(self.doclist,'lc_pr_details',1) self.doc.clear_table(self.doclist,'lc_pr_details',1)
if not self.doc.from_pr_date or not self.doc.to_pr_date: if not self.doc.from_pr_date or not self.doc.to_pr_date:
@@ -230,11 +229,9 @@ class DocType:
# get details for landed cost table from master # get details for landed cost table from master
# --------------------------------------------- # ---------------------------------------------
def get_landed_cost_master_details(self): def get_landed_cost_master_details(self):
msgprint('fetching details.....' + self.doc.landed_cost)
self.doc.clear_table(self.doclist, 'landed_cost_details') self.doc.clear_table(self.doclist, 'landed_cost_details')
idx = 0 idx = 0
landed_cost = sql("select account_head, description from `tabLanded Cost Master Detail` where parent=%s", (self.doc.landed_cost), as_dict = 1) landed_cost = sql("select account_head, description from `tabLanded Cost Master Detail` where parent=%s", (self.doc.landed_cost), as_dict = 1)
msgprint(landed_cost)
for cost in landed_cost: for cost in landed_cost:
lct = addchild(self.doc, 'landed_cost_details', 'Landed Cost Detail', 1, self.doclist) lct = addchild(self.doc, 'landed_cost_details', 'Landed Cost Detail', 1, self.doclist)
lct.account_head = cost['account_head'] lct.account_head = cost['account_head']