mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 20:29:09 +00:00
[mapper] removed old mapper from files and database
This commit is contained in:
@@ -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