removed project related doctype mapper
This commit is contained in:
parent
e05a5b6043
commit
562de92070
@ -1,49 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"owner": "ashwini@webnotestech.com",
|
|
||||||
"docstatus": 0,
|
|
||||||
"creation": "2010-09-01 15:47:59",
|
|
||||||
"modified_by": "Administrator",
|
|
||||||
"modified": "2012-04-03 12:49:50"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"match_id": 0,
|
|
||||||
"parent": "Project-Sales Invoice",
|
|
||||||
"name": "__common__",
|
|
||||||
"doctype": "Table Mapper Detail",
|
|
||||||
"parenttype": "DocType Mapper",
|
|
||||||
"from_table": "Project",
|
|
||||||
"to_table": "Sales Invoice",
|
|
||||||
"validation_logic": "name is not null",
|
|
||||||
"parentfield": "table_mapper_details"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"map": "Yes",
|
|
||||||
"match_id": 0,
|
|
||||||
"parent": "Project-Sales Invoice",
|
|
||||||
"name": "__common__",
|
|
||||||
"to_field": "customer",
|
|
||||||
"doctype": "Field Mapper Detail",
|
|
||||||
"parenttype": "DocType Mapper",
|
|
||||||
"checking_operator": "=",
|
|
||||||
"from_field": "customer",
|
|
||||||
"parentfield": "field_mapper_details"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "__common__",
|
|
||||||
"to_doctype": "Sales Invoice",
|
|
||||||
"module": "Accounts",
|
|
||||||
"doctype": "DocType Mapper",
|
|
||||||
"from_doctype": "Project"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Project-Sales Invoice",
|
|
||||||
"doctype": "DocType Mapper"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"doctype": "Field Mapper Detail"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"doctype": "Table Mapper Detail"
|
|
||||||
}
|
|
||||||
]
|
|
@ -264,13 +264,6 @@ cur_frm.cscript.write_off_amount = function(doc) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//---- get customer details ----------------------------
|
|
||||||
cur_frm.cscript.project_name = function(doc,cdt,cdn){
|
|
||||||
$c_obj(make_doclist(doc.doctype, doc.name),'pull_project_customer','', function(r,rt){
|
|
||||||
refresh_many(['customer', 'customer_name','customer_address', 'territory']);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//Set debit and credit to zero on adding new row
|
//Set debit and credit to zero on adding new row
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
cur_frm.fields_dict['entries'].grid.onrowadd = function(doc, cdt, cdn){
|
cur_frm.fields_dict['entries'].grid.onrowadd = function(doc, cdt, cdn){
|
||||||
|
@ -320,13 +320,6 @@ class DocType(TransactionBase):
|
|||||||
def get_advances(self):
|
def get_advances(self):
|
||||||
self.doclist = get_obj('GL Control').get_advances(self, self.doc.debit_to, 'Sales Invoice Advance', 'advance_adjustment_details', 'credit')
|
self.doclist = get_obj('GL Control').get_advances(self, self.doc.debit_to, 'Sales Invoice Advance', 'advance_adjustment_details', 'credit')
|
||||||
|
|
||||||
|
|
||||||
def pull_project_customer(self):
|
|
||||||
res = webnotes.conn.sql("select customer from `tabProject` where name = '%s'" %
|
|
||||||
self.doc.project_name)
|
|
||||||
if res and res[0][0]:
|
|
||||||
get_obj('DocType Mapper', 'Project-Sales Invoice').dt_map('Project', 'Sales Invoice', self.doc.project_name, self.doc, self.doclist, "[['Project', 'Sales Invoice']]")
|
|
||||||
|
|
||||||
def get_company_abbr(self):
|
def get_company_abbr(self):
|
||||||
return webnotes.conn.sql("select abbr from tabCompany where name=%s", self.doc.company)[0][0]
|
return webnotes.conn.sql("select abbr from tabCompany where name=%s", self.doc.company)[0][0]
|
||||||
|
|
||||||
|
6
patches/december_2012/remove_project_mapper.py
Normal file
6
patches/december_2012/remove_project_mapper.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import webnotes
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
from webnotes.model import delete_doc
|
||||||
|
for d in ["Project-Sales Order", "Project-Delivery Note", "Project-Sales Invoice"]:
|
||||||
|
delete_doc("DocType Mapper", d)
|
@ -562,4 +562,8 @@ patch_list = [
|
|||||||
'patch_module': 'patches.december_2012',
|
'patch_module': 'patches.december_2012',
|
||||||
'patch_file': 'delete_form16_print_format',
|
'patch_file': 'delete_form16_print_format',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'patch_module': 'patches.december_2012',
|
||||||
|
'patch_file': 'remove_project_mapper',
|
||||||
|
},
|
||||||
]
|
]
|
@ -1,49 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"owner": "ashwini@webnotestech.com",
|
|
||||||
"docstatus": 0,
|
|
||||||
"creation": "2010-09-01 15:47:59",
|
|
||||||
"modified_by": "Administrator",
|
|
||||||
"modified": "2011-09-15 15:04:43"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"match_id": 0,
|
|
||||||
"parent": "Project-Sales Order",
|
|
||||||
"name": "__common__",
|
|
||||||
"doctype": "Table Mapper Detail",
|
|
||||||
"parenttype": "DocType Mapper",
|
|
||||||
"from_table": "Project",
|
|
||||||
"to_table": "Sales Order",
|
|
||||||
"validation_logic": "name is not null",
|
|
||||||
"parentfield": "table_mapper_details"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"map": "Yes",
|
|
||||||
"match_id": 0,
|
|
||||||
"parent": "Project-Sales Order",
|
|
||||||
"name": "__common__",
|
|
||||||
"to_field": "customer",
|
|
||||||
"doctype": "Field Mapper Detail",
|
|
||||||
"parenttype": "DocType Mapper",
|
|
||||||
"checking_operator": "=",
|
|
||||||
"from_field": "customer",
|
|
||||||
"parentfield": "field_mapper_details"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "__common__",
|
|
||||||
"to_doctype": "Sales Order",
|
|
||||||
"module": "Selling",
|
|
||||||
"doctype": "DocType Mapper",
|
|
||||||
"from_doctype": "Project"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Project-Sales Order",
|
|
||||||
"doctype": "DocType Mapper"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"doctype": "Field Mapper Detail"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"doctype": "Table Mapper Detail"
|
|
||||||
}
|
|
||||||
]
|
|
@ -1,49 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"owner": "harshada@webnotestech.com",
|
|
||||||
"docstatus": 0,
|
|
||||||
"creation": "2010-09-01 15:47:59",
|
|
||||||
"modified_by": "Administrator",
|
|
||||||
"modified": "2011-09-15 15:04:43"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"match_id": 0,
|
|
||||||
"parent": "Project-Delivery Note",
|
|
||||||
"name": "__common__",
|
|
||||||
"doctype": "Table Mapper Detail",
|
|
||||||
"parenttype": "DocType Mapper",
|
|
||||||
"from_table": "Project",
|
|
||||||
"to_table": "Delivery Note",
|
|
||||||
"validation_logic": "name is not null",
|
|
||||||
"parentfield": "table_mapper_details"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"map": "Yes",
|
|
||||||
"match_id": 0,
|
|
||||||
"parent": "Project-Delivery Note",
|
|
||||||
"name": "__common__",
|
|
||||||
"to_field": "customer",
|
|
||||||
"doctype": "Field Mapper Detail",
|
|
||||||
"parenttype": "DocType Mapper",
|
|
||||||
"checking_operator": "=",
|
|
||||||
"from_field": "customer",
|
|
||||||
"parentfield": "field_mapper_details"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "__common__",
|
|
||||||
"to_doctype": "Delivery Note",
|
|
||||||
"module": "Stock",
|
|
||||||
"doctype": "DocType Mapper",
|
|
||||||
"from_doctype": "Project"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Project-Delivery Note",
|
|
||||||
"doctype": "DocType Mapper"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"doctype": "Field Mapper Detail"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"doctype": "Table Mapper Detail"
|
|
||||||
}
|
|
||||||
]
|
|
@ -78,13 +78,6 @@ class DocType(TransactionBase):
|
|||||||
def get_tc_details(self):
|
def get_tc_details(self):
|
||||||
return get_obj('Sales Common').get_tc_details(self)
|
return get_obj('Sales Common').get_tc_details(self)
|
||||||
|
|
||||||
|
|
||||||
def pull_project_customer(self):
|
|
||||||
res = sql("select customer from `tabProject` where name = '%s'" % self.doc.project_name)
|
|
||||||
if res and res[0][0]:
|
|
||||||
get_obj('DocType Mapper', 'Project-Delivery Note').dt_map('Project', 'Delivery Note', self.doc.project_name, self.doc, self.doclist, "[['Project', 'Delivery Note']]")
|
|
||||||
|
|
||||||
|
|
||||||
def get_item_details(self, args=None):
|
def get_item_details(self, args=None):
|
||||||
import json
|
import json
|
||||||
args = args and json.loads(args) or {}
|
args = args and json.loads(args) or {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user