mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
[mapper] removed old mapper from files and database
This commit is contained in:
@@ -1,118 +0,0 @@
|
||||
[
|
||||
{
|
||||
"owner": "Administrator",
|
||||
"docstatus": 0,
|
||||
"creation": "2010-08-08 17:09:34",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2011-09-15 15:04:42"
|
||||
},
|
||||
{
|
||||
"name": "__common__",
|
||||
"parent": "Delivery Note-Installation Note",
|
||||
"doctype": "Table Mapper Detail",
|
||||
"parenttype": "DocType Mapper",
|
||||
"parentfield": "table_mapper_details"
|
||||
},
|
||||
{
|
||||
"map": "Yes",
|
||||
"name": "__common__",
|
||||
"parent": "Delivery Note-Installation Note",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"parenttype": "DocType Mapper",
|
||||
"parentfield": "field_mapper_details"
|
||||
},
|
||||
{
|
||||
"name": "__common__",
|
||||
"to_doctype": "Installation Note",
|
||||
"module": "Selling",
|
||||
"doctype": "DocType Mapper",
|
||||
"ref_doc_submitted": 1,
|
||||
"from_doctype": "Delivery Note"
|
||||
},
|
||||
{
|
||||
"name": "Delivery Note-Installation Note",
|
||||
"doctype": "DocType Mapper"
|
||||
},
|
||||
{
|
||||
"match_id": 0,
|
||||
"to_field": "company",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"from_field": "company",
|
||||
"checking_operator": "="
|
||||
},
|
||||
{
|
||||
"match_id": 0,
|
||||
"to_field": "customer",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"from_field": "customer",
|
||||
"checking_operator": "="
|
||||
},
|
||||
{
|
||||
"to_field": "delivery_note_no",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"match_id": 0,
|
||||
"from_field": "name"
|
||||
},
|
||||
{
|
||||
"to_field": "prevdoc_detail_docname",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"match_id": 1,
|
||||
"from_field": "name"
|
||||
},
|
||||
{
|
||||
"to_field": "prevdoc_docname",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"match_id": 1,
|
||||
"from_field": "parent"
|
||||
},
|
||||
{
|
||||
"to_field": "prevdoc_doctype",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"match_id": 1,
|
||||
"from_field": "parenttype"
|
||||
},
|
||||
{
|
||||
"to_field": "qty",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"match_id": 1,
|
||||
"from_field": "eval: flt(obj.qty) - flt(obj.installed_qty)"
|
||||
},
|
||||
{
|
||||
"to_field": "prevdoc_date",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"match_id": 2,
|
||||
"from_field": "posting_date"
|
||||
},
|
||||
{
|
||||
"to_field": "serial_no",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"match_id": 1,
|
||||
"from_field": "serial_no"
|
||||
},
|
||||
{
|
||||
"match_id": 1,
|
||||
"to_field": "installed_item_details",
|
||||
"doctype": "Table Mapper Detail",
|
||||
"from_field": "delivery_note_details",
|
||||
"from_table": "Delivery Note Item",
|
||||
"to_table": "Installation Note Item",
|
||||
"validation_logic": "qty > ifnull(installed_qty,0) and docstatus = 1"
|
||||
},
|
||||
{
|
||||
"match_id": 0,
|
||||
"doctype": "Table Mapper Detail",
|
||||
"from_table": "Delivery Note",
|
||||
"to_table": "Installation Note",
|
||||
"validation_logic": "docstatus = 1"
|
||||
},
|
||||
{
|
||||
"reference_key": "prevdoc_docname",
|
||||
"match_id": 2,
|
||||
"reference_doctype_key": "prevdoc_doctype",
|
||||
"to_field": "installed_item_details",
|
||||
"doctype": "Table Mapper Detail",
|
||||
"from_table": "Delivery Note",
|
||||
"to_table": "Installation Note Item",
|
||||
"validation_logic": "docstatus = 1"
|
||||
}
|
||||
]
|
||||
@@ -1,113 +0,0 @@
|
||||
[
|
||||
{
|
||||
"owner": "Administrator",
|
||||
"docstatus": 0,
|
||||
"creation": "2010-08-08 17:09:34",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2012-04-03 12:49:50"
|
||||
},
|
||||
{
|
||||
"name": "__common__",
|
||||
"parent": "Opportunity-Quotation",
|
||||
"doctype": "Table Mapper Detail",
|
||||
"parenttype": "DocType Mapper",
|
||||
"validation_logic": "docstatus=1",
|
||||
"parentfield": "table_mapper_details"
|
||||
},
|
||||
{
|
||||
"name": "__common__",
|
||||
"parent": "Opportunity-Quotation",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"parenttype": "DocType Mapper",
|
||||
"parentfield": "field_mapper_details"
|
||||
},
|
||||
{
|
||||
"name": "__common__",
|
||||
"to_doctype": "Quotation",
|
||||
"module": "Selling",
|
||||
"doctype": "DocType Mapper",
|
||||
"ref_doc_submitted": 1,
|
||||
"from_doctype": "Opportunity"
|
||||
},
|
||||
{
|
||||
"name": "Opportunity-Quotation",
|
||||
"doctype": "DocType Mapper"
|
||||
},
|
||||
{
|
||||
"map": "Yes",
|
||||
"match_id": 1,
|
||||
"to_field": "stock_uom",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"from_field": "uom"
|
||||
},
|
||||
{
|
||||
"map": "Yes",
|
||||
"match_id": 0,
|
||||
"to_field": "enq_no",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"from_field": "name"
|
||||
},
|
||||
{
|
||||
"map": "Yes",
|
||||
"match_id": 1,
|
||||
"to_field": "prevdoc_docname",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"from_field": "parent"
|
||||
},
|
||||
{
|
||||
"map": "Yes",
|
||||
"match_id": 1,
|
||||
"to_field": "prevdoc_doctype",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"from_field": "parenttype"
|
||||
},
|
||||
{
|
||||
"map": "Yes",
|
||||
"match_id": 0,
|
||||
"to_field": "quotation_to",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"from_field": "enquiry_from"
|
||||
},
|
||||
{
|
||||
"map": "Yes",
|
||||
"match_id": 0,
|
||||
"to_field": "order_type",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"from_field": "enquiry_type"
|
||||
},
|
||||
{
|
||||
"map": "No",
|
||||
"match_id": 0,
|
||||
"to_field": "transaction_date",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"from_field": "transaction_date"
|
||||
},
|
||||
{
|
||||
"map": "No",
|
||||
"match_id": 0,
|
||||
"to_field": "status",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"from_field": "status"
|
||||
},
|
||||
{
|
||||
"map": "No",
|
||||
"match_id": 0,
|
||||
"to_field": "naming_series",
|
||||
"doctype": "Field Mapper Detail",
|
||||
"from_field": "naming_series"
|
||||
},
|
||||
{
|
||||
"to_table": "Quotation",
|
||||
"doctype": "Table Mapper Detail",
|
||||
"match_id": 0,
|
||||
"from_table": "Opportunity"
|
||||
},
|
||||
{
|
||||
"match_id": 1,
|
||||
"to_field": "quotation_details",
|
||||
"doctype": "Table Mapper Detail",
|
||||
"from_field": "enq_details",
|
||||
"from_table": "Opportunity Item",
|
||||
"to_table": "Quotation Item"
|
||||
}
|
||||
]
|
||||
@@ -36,6 +36,14 @@ erpnext.selling.InstallationNote = wn.ui.form.Controller.extend({
|
||||
'address_display', 'contact_display', 'contact_mobile', 'contact_email',
|
||||
'territory', 'customer_group']);
|
||||
}
|
||||
},
|
||||
get_items: function() {
|
||||
wn.model.map_current_doc({
|
||||
method: "stock.doctype.delivery_note.delivery_note.make_installation_note",
|
||||
source_name: cur_frm.doc.delivery_note_no,
|
||||
})
|
||||
unhide_field(['customer_address', 'contact_person', 'customer_name', 'address_display',
|
||||
'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -66,14 +74,6 @@ cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
|
||||
return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50';
|
||||
}
|
||||
|
||||
cur_frm.cscript.get_items = function(doc, dt, dn) {
|
||||
var callback = function(r,rt) {
|
||||
unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
||||
cur_frm.refresh();
|
||||
}
|
||||
get_server_fields('pull_delivery_note_details','','',doc, dt, dn,1,callback);
|
||||
}
|
||||
|
||||
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
|
||||
if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1);
|
||||
}
|
||||
|
||||
@@ -53,14 +53,7 @@ class DocType(TransactionBase):
|
||||
sales_com_obj.check_active_sales_items(self)
|
||||
sales_com_obj.get_prevdoc_date(self)
|
||||
self.validate_reference_value()
|
||||
|
||||
def pull_delivery_note_details(self):
|
||||
self.validate_prev_docname()
|
||||
self.doclist = get_obj('DocType Mapper', 'Delivery Note-Installation Note').dt_map(
|
||||
'Delivery Note', 'Installation Note', self.doc.delivery_note_no,
|
||||
self.doc, self.doclist, "[['Delivery Note', 'Installation Note'], \
|
||||
['Delivery Note Item', 'Installation Note Item']]")
|
||||
|
||||
|
||||
def validate_prev_docname(self):
|
||||
for d in getlist(self.doclist, 'installed_item_details'):
|
||||
if self.doc.delivery_note_no == d.prevdoc_docname:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-04-30 13:13:06",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-05 14:40:56",
|
||||
"modified": "2013-07-07 18:10:24",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -23,20 +23,13 @@
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"amend": 1,
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"name": "__common__",
|
||||
"parent": "Installation Note",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Sales User",
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
"report": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocType",
|
||||
@@ -267,7 +260,6 @@
|
||||
"hidden": 0,
|
||||
"label": "Get Items",
|
||||
"oldfieldtype": "Button",
|
||||
"options": "pull_delivery_note_details",
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
@@ -280,6 +272,60 @@
|
||||
"options": "Installation Note Item"
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm"
|
||||
"amend": 1,
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"role": "System Manager",
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 1,
|
||||
"role": "System Manager",
|
||||
"submit": 0
|
||||
},
|
||||
{
|
||||
"amend": 1,
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"role": "Sales User",
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 1,
|
||||
"role": "Sales User",
|
||||
"submit": 0
|
||||
},
|
||||
{
|
||||
"amend": 1,
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"role": "Sales Manager",
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 1,
|
||||
"role": "Sales Manager",
|
||||
"submit": 0
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user