field renaming

This commit is contained in:
Nabin Hait 2014-12-26 11:41:15 +05:30
parent 4b8185db19
commit 79f091e2fe
13 changed files with 1169 additions and 1169 deletions

View File

@ -24,7 +24,7 @@ frappe.ui.form.on("Payment Tool", "onload", function(frm) {
} }
}); });
frm.set_query("against_voucher_type", "against_vouchers", function() { frm.set_query("against_voucher_type", "vouchers", function() {
return { return {
filters: {"name": ["in", ["Sales Invoice", "Purchase Invoice", "Journal Entry", "Sales Order", "Purchase Order"]]} filters: {"name": ["in", ["Sales Invoice", "Purchase Invoice", "Journal Entry", "Sales Order", "Purchase Order"]]}
}; };
@ -75,7 +75,7 @@ erpnext.payment_tool.check_mandatory_to_set_button = function(frm) {
frappe.ui.form.on("Payment Tool", "get_outstanding_vouchers", function(frm) { frappe.ui.form.on("Payment Tool", "get_outstanding_vouchers", function(frm) {
erpnext.payment_tool.check_mandatory_to_fetch(frm.doc); erpnext.payment_tool.check_mandatory_to_fetch(frm.doc);
frm.set_value("against_vouchers", []); frm.set_value("vouchers", []);
return frappe.call({ return frappe.call({
method: 'erpnext.accounts.doctype.payment_tool.payment_tool.get_outstanding_vouchers', method: 'erpnext.accounts.doctype.payment_tool.payment_tool.get_outstanding_vouchers',
@ -93,16 +93,16 @@ frappe.ui.form.on("Payment Tool", "get_outstanding_vouchers", function(frm) {
frm.fields_dict.get_outstanding_vouchers.$input.removeClass("btn-primary"); frm.fields_dict.get_outstanding_vouchers.$input.removeClass("btn-primary");
frm.fields_dict.make_journal_entry.$input.addClass("btn-primary"); frm.fields_dict.make_journal_entry.$input.addClass("btn-primary");
frappe.model.clear_table(frm.doc, "against_vouchers"); frappe.model.clear_table(frm.doc, "vouchers");
$.each(r.message, function(i, d) { $.each(r.message, function(i, d) {
var invoice_detail = frappe.model.add_child(frm.doc, "Payment Tool Detail", "against_vouchers"); var invoice_detail = frappe.model.add_child(frm.doc, "Payment Tool Detail", "vouchers");
invoice_detail.against_voucher_type = d.voucher_type; invoice_detail.against_voucher_type = d.voucher_type;
invoice_detail.against_voucher_no = d.voucher_no; invoice_detail.against_voucher_no = d.voucher_no;
invoice_detail.total_amount = d.invoice_amount; invoice_detail.total_amount = d.invoice_amount;
invoice_detail.outstanding_amount = d.outstanding_amount; invoice_detail.outstanding_amount = d.outstanding_amount;
}); });
} }
refresh_field("against_vouchers"); refresh_field("vouchers");
erpnext.payment_tool.set_total_payment_amount(frm); erpnext.payment_tool.set_total_payment_amount(frm);
} }
}); });
@ -114,7 +114,7 @@ frappe.ui.form.on("Payment Tool Detail", "against_voucher_type", function(frm) {
}); });
erpnext.payment_tool.validate_against_voucher = function(frm) { erpnext.payment_tool.validate_against_voucher = function(frm) {
$.each(frm.doc.against_vouchers || [], function(i, row) { $.each(frm.doc.vouchers || [], function(i, row) {
if(frm.doc.party_type=="Customer" if(frm.doc.party_type=="Customer"
&& !in_list(["Sales Order", "Sales Invoice", "Journal Entry"], row.against_voucher_type)) { && !in_list(["Sales Order", "Sales Invoice", "Journal Entry"], row.against_voucher_type)) {
frappe.model.set_value(row.doctype, row.name, "against_voucher_type", ""); frappe.model.set_value(row.doctype, row.name, "against_voucher_type", "");
@ -154,13 +154,13 @@ frappe.ui.form.on("Payment Tool Detail", "payment_amount", function(frm) {
erpnext.payment_tool.set_total_payment_amount(frm); erpnext.payment_tool.set_total_payment_amount(frm);
}); });
frappe.ui.form.on("Payment Tool Detail", "against_vouchers_remove", function(frm) { frappe.ui.form.on("Payment Tool Detail", "vouchers_remove", function(frm) {
erpnext.payment_tool.set_total_payment_amount(frm); erpnext.payment_tool.set_total_payment_amount(frm);
}); });
erpnext.payment_tool.set_total_payment_amount = function(frm) { erpnext.payment_tool.set_total_payment_amount = function(frm) {
var total_amount = 0.00; var total_amount = 0.00;
$.each(frm.doc.against_vouchers || [], function(i, row) { $.each(frm.doc.vouchers || [], function(i, row) {
if (row.payment_amount && (row.payment_amount <= row.outstanding_amount)) { if (row.payment_amount && (row.payment_amount <= row.outstanding_amount)) {
total_amount = total_amount + row.payment_amount; total_amount = total_amount + row.payment_amount;
} else { } else {

View File

@ -1,361 +1,361 @@
{ {
"allow_copy": 0, "allow_copy": 0,
"allow_import": 0, "allow_import": 0,
"allow_rename": 0, "allow_rename": 0,
"creation": "2014-07-23 15:12:27.746665", "creation": "2014-07-23 15:12:27.746665",
"custom": 0, "custom": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": "", "document_type": "",
"fields": [ "fields": [
{ {
"fieldname": "sec_break1", "fieldname": "sec_break1",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Party Details", "label": "Party Details",
"permlevel": 0 "permlevel": 0
}, },
{ {
"fieldname": "company", "fieldname": "company",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Company", "label": "Company",
"options": "Company", "options": "Company",
"permlevel": 0, "permlevel": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"default": "Customer", "default": "Customer",
"fieldname": "party_type", "fieldname": "party_type",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Party Type", "label": "Party Type",
"no_copy": 0, "no_copy": 0,
"options": "DocType", "options": "DocType",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 0, "search_index": 0,
"set_only_once": 0 "set_only_once": 0
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"depends_on": "", "depends_on": "",
"fieldname": "party", "fieldname": "party",
"fieldtype": "Dynamic Link", "fieldtype": "Dynamic Link",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Party", "label": "Party",
"no_copy": 0, "no_copy": 0,
"options": "party_type", "options": "party_type",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 0, "search_index": 0,
"set_only_once": 0 "set_only_once": 0
}, },
{ {
"fieldname": "party_account", "fieldname": "party_account",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
"label": "Party Account", "label": "Party Account",
"no_copy": 1, "no_copy": 1,
"options": "Account", "options": "Account",
"permlevel": 0, "permlevel": 0,
"read_only": 0 "read_only": 0
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "received_or_paid", "fieldname": "received_or_paid",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Received Or Paid", "label": "Received Or Paid",
"no_copy": 0, "no_copy": 0,
"options": "Received\nPaid", "options": "Received\nPaid",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 1, "reqd": 1,
"search_index": 0, "search_index": 0,
"set_only_once": 0 "set_only_once": 0
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "get_outstanding_vouchers", "fieldname": "get_outstanding_vouchers",
"fieldtype": "Button", "fieldtype": "Button",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Get Outstanding Vouchers", "label": "Get Outstanding Vouchers",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
"set_only_once": 0 "set_only_once": 0
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "col_break1", "fieldname": "col_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Column Break 1", "label": "Column Break 1",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
"set_only_once": 0 "set_only_once": 0
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "payment_mode", "fieldname": "payment_mode",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Payment Mode", "label": "Payment Mode",
"no_copy": 0, "no_copy": 0,
"options": "Mode of Payment", "options": "Mode of Payment",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
"set_only_once": 0 "set_only_once": 0
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "payment_account", "fieldname": "payment_account",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Payment Account", "label": "Payment Account",
"no_copy": 0, "no_copy": 0,
"options": "Account", "options": "Account",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
"set_only_once": 0 "set_only_once": 0
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "reference_no", "fieldname": "reference_no",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Reference No", "label": "Reference No",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
"set_only_once": 0 "set_only_once": 0
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "reference_date", "fieldname": "reference_date",
"fieldtype": "Date", "fieldtype": "Date",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Reference Date", "label": "Reference Date",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
"set_only_once": 0 "set_only_once": 0
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && (doc.customer || doc.supplier))", "depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && (doc.customer || doc.supplier))",
"fieldname": "sec_break3", "fieldname": "sec_break3",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Against Voucher", "label": "Against Voucher",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
"set_only_once": 0 "set_only_once": 0
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "against_vouchers", "fieldname": "vouchers",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Against Vouchers", "label": "Against Vouchers",
"no_copy": 0, "no_copy": 0,
"options": "Payment Tool Detail", "options": "Payment Tool Detail",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
"set_only_once": 0 "set_only_once": 0
}, },
{ {
"depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && (doc.customer || doc.supplier))", "depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && (doc.customer || doc.supplier))",
"fieldname": "section_break_19", "fieldname": "section_break_19",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"permlevel": 0, "permlevel": 0,
"precision": "" "precision": ""
}, },
{ {
"fieldname": "total_payment_amount", "fieldname": "total_payment_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Total Payment Amount", "label": "Total Payment Amount",
"permlevel": 0, "permlevel": 0,
"read_only": 1 "read_only": 1
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "make_journal_entry", "fieldname": "make_journal_entry",
"fieldtype": "Button", "fieldtype": "Button",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"label": "Make Journal Entry", "label": "Make Journal Entry",
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
"set_only_once": 0 "set_only_once": 0
}, },
{ {
"fieldname": "data_22", "fieldname": "data_22",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0, "permlevel": 0,
"precision": "" "precision": ""
}, },
{ {
"depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && (doc.customer || doc.supplier))", "depends_on": "eval:(doc.company && doc.party_type && doc.received_or_paid && (doc.customer || doc.supplier))",
"fieldname": "section_break_21", "fieldname": "section_break_21",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"permlevel": 0, "permlevel": 0,
"precision": "" "precision": ""
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"fieldname": "make_jv_help", "fieldname": "make_jv_help",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 0, "in_list_view": 0,
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"read_only": 1, "read_only": 1,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
"set_only_once": 0 "set_only_once": 0
} }
], ],
"hide_heading": 0, "hide_heading": 0,
"hide_toolbar": 1, "hide_toolbar": 1,
"icon": "icon-magic", "icon": "icon-magic",
"in_create": 0, "in_create": 0,
"in_dialog": 0, "in_dialog": 0,
"is_submittable": 0, "is_submittable": 0,
"issingle": 1, "issingle": 1,
"istable": 0, "istable": 0,
"modified": "2014-12-25 16:28:30.612640", "modified": "2014-12-26 16:28:30.612640",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Payment Tool", "name": "Payment Tool",
"name_case": "", "name_case": "",
"owner": "Administrator", "owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 0, "amend": 0,
"apply_user_permissions": 0, "apply_user_permissions": 0,
"cancel": 0, "cancel": 0,
"create": 1, "create": 1,
"delete": 0, "delete": 0,
"email": 0, "email": 0,
"export": 0, "export": 0,
"import": 0, "import": 0,
"permlevel": 0, "permlevel": 0,
"print": 0, "print": 0,
"read": 1, "read": 1,
"report": 0, "report": 0,
"role": "Accounts Manager", "role": "Accounts Manager",
"set_user_permissions": 0, "set_user_permissions": 0,
"submit": 0, "submit": 0,
"write": 1 "write": 1
}, },
{ {
"amend": 0, "amend": 0,
"apply_user_permissions": 0, "apply_user_permissions": 0,
"cancel": 0, "cancel": 0,
"create": 1, "create": 1,
"delete": 0, "delete": 0,
"email": 0, "email": 0,
"export": 0, "export": 0,
"import": 0, "import": 0,
"permlevel": 0, "permlevel": 0,
"print": 0, "print": 0,
"read": 1, "read": 1,
"report": 0, "report": 0,
"role": "Accounts User", "role": "Accounts User",
"set_user_permissions": 0, "set_user_permissions": 0,
"submit": 0, "submit": 0,
"write": 1 "write": 1
} }
], ],
"read_only": 0, "read_only": 0,
"read_only_onload": 0, "read_only_onload": 0,
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC" "sort_order": "DESC"
} }

View File

@ -29,7 +29,7 @@ class PaymentTool(Document):
if not self.total_payment_amount: if not self.total_payment_amount:
frappe.throw(_("Please enter Payment Amount in atleast one row")) frappe.throw(_("Please enter Payment Amount in atleast one row"))
for v in self.get("against_vouchers"): for v in self.get("vouchers"):
if not frappe.db.get_value(v.against_voucher_type, {"name": v.against_voucher_no}): if not frappe.db.get_value(v.against_voucher_type, {"name": v.against_voucher_no}):
frappe.throw(_("Row {0}: {1} is not a valid {2}").format(v.idx, v.against_voucher_no, frappe.throw(_("Row {0}: {1} is not a valid {2}").format(v.idx, v.against_voucher_no,
v.against_voucher_type)) v.against_voucher_type))

View File

@ -154,7 +154,7 @@ class TestPaymentTool(unittest.TestCase):
def check_jv_entries(self, paytool, outstanding_entries, expected_outstanding): def check_jv_entries(self, paytool, outstanding_entries, expected_outstanding):
for e in outstanding_entries: for e in outstanding_entries:
d1 = paytool.append("against_vouchers") d1 = paytool.append("vouchers")
d1.against_voucher_type = e.get("voucher_type") d1.against_voucher_type = e.get("voucher_type")
d1.against_voucher_no = e.get("voucher_no") d1.against_voucher_no = e.get("voucher_no")
d1.total_amount = e.get("invoice_amount") d1.total_amount = e.get("invoice_amount")

View File

@ -539,9 +539,9 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"fieldname": "educational_qualifications", "fieldname": "education",
"fieldtype": "Table", "fieldtype": "Table",
"label": "Educational Qualifications", "label": "Education",
"options": "Employee Education", "options": "Employee Education",
"permlevel": 0 "permlevel": 0
}, },
@ -553,9 +553,9 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"fieldname": "external_work_experiences", "fieldname": "external_work_history",
"fieldtype": "Table", "fieldtype": "Table",
"label": "External Work Experiences", "label": "External Work History",
"options": "Employee External Work History", "options": "Employee External Work History",
"permlevel": 0 "permlevel": 0
}, },
@ -567,9 +567,9 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"fieldname": "internal_work_experiences", "fieldname": "internal_work_history",
"fieldtype": "Table", "fieldtype": "Table",
"label": "Internal Work Experiences", "label": "Internal Work History",
"options": "Employee Internal Work History", "options": "Employee Internal Work History",
"permlevel": 0 "permlevel": 0
}, },
@ -673,7 +673,7 @@
], ],
"icon": "icon-user", "icon": "icon-user",
"idx": 1, "idx": 1,
"modified": "2014-12-24 15:28:06.576523", "modified": "2014-12-26 11:12:57.631617",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Employee", "name": "Employee",

View File

@ -100,9 +100,9 @@ rename_map = {
], ],
"Employee": [ "Employee": [
["employee_leave_approvers", "leave_approvers"], ["employee_leave_approvers", "leave_approvers"],
# ["educational_qualification_details", "educational_qualifications"], ["educational_qualification_details", "education"],
# ["previous_experience_details", "external_work_experiences"], work_history ["previous_experience_details", "external_work_history"],
# ["experience_in_company_details", "internal_work_experiences"], internal_work_history ["experience_in_company_details", "internal_work_history"]
], ],
"Event": [ "Event": [
["event_individuals", "users"], ["event_individuals", "users"],
@ -124,8 +124,8 @@ rename_map = {
["item_variants", "variants"], ["item_variants", "variants"],
["item_reorder", "reorder_levels"], ["item_reorder", "reorder_levels"],
["uom_conversion_details", "uoms"], ["uom_conversion_details", "uoms"],
# ["item_supplier_details", "supplier_item_codes"], ["item_supplier_details", "supplier_items"],
# ["item_customer_details", "customer_item_codes"], ["item_customer_details", "customer_items"],
["item_tax", "taxes"], ["item_tax", "taxes"],
["item_specification_details", "quality_parameters"], ["item_specification_details", "quality_parameters"],
["item_website_specifications", "website_specifications"] ["item_website_specifications", "website_specifications"]
@ -161,7 +161,7 @@ rename_map = {
["party_accounts", "accounts"] ["party_accounts", "accounts"]
], ],
"Payment Tool": [ "Payment Tool": [
# ["payment_tool_details", "against_vouchers"] ["payment_tool_details", "vouchers"]
], ],
"Production Planning Tool": [ "Production Planning Tool": [
["pp_so_details", "sales_orders"], ["pp_so_details", "sales_orders"],
@ -185,7 +185,7 @@ rename_map = {
["sales_bom_items", "items"] ["sales_bom_items", "items"]
], ],
"SMS Settings": [ "SMS Settings": [
# ["static_parameter_details", "static_parameters"] ["static_parameter_details", "parameters"]
], ],
"Stock Entry": [ "Stock Entry": [
["mtn_details", "items"] ["mtn_details", "items"]
@ -203,7 +203,7 @@ rename_map = {
["time_log_batch_details", "time_logs"] ["time_log_batch_details", "time_logs"]
], ],
"Workflow": [ "Workflow": [
# ["workflow_document_states", "document_states"], ["workflow_document_states", "states"],
["workflow_transitions", "transitions"] ["workflow_transitions", "transitions"]
], ],
"Workstation": [ "Workstation": [

View File

@ -142,14 +142,14 @@ pscript.feature_dict = {
}, },
'fs_item_advanced': { 'fs_item_advanced': {
'Item': {'fields':['customer_item_codes']} 'Item': {'fields':['customer_items']}
}, },
'fs_sales_extras': { 'fs_sales_extras': {
'Address': {'fields':['sales_partner']}, 'Address': {'fields':['sales_partner']},
'Contact': {'fields':['sales_partner']}, 'Contact': {'fields':['sales_partner']},
'Customer': {'fields':['sales_team']}, 'Customer': {'fields':['sales_team']},
'Delivery Note': {'fields':['sales_team']}, 'Delivery Note': {'fields':['sales_team']},
'Item': {'fields':['customer_item_codes']}, 'Item': {'fields':['customer_items']},
'Sales Invoice': {'fields':['sales_team']}, 'Sales Invoice': {'fields':['sales_team']},
'Sales Order': {'fields':['sales_team']} 'Sales Order': {'fields':['sales_team']}
}, },

View File

@ -1,78 +1,78 @@
{ {
"allow_copy": 1, "allow_copy": 1,
"allow_email": 1, "allow_email": 1,
"allow_print": 1, "allow_print": 1,
"creation": "2013-01-10 16:34:24", "creation": "2013-01-10 16:34:24",
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"fields": [ "fields": [
{ {
"fieldname": "column_break0", "fieldname": "column_break0",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0, "permlevel": 0,
"width": "50%" "width": "50%"
}, },
{ {
"description": "Eg. smsgateway.com/api/send_sms.cgi", "description": "Eg. smsgateway.com/api/send_sms.cgi",
"fieldname": "sms_gateway_url", "fieldname": "sms_gateway_url",
"fieldtype": "Data", "fieldtype": "Data",
"in_list_view": 1, "in_list_view": 1,
"label": "SMS Gateway URL", "label": "SMS Gateway URL",
"permlevel": 0, "permlevel": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"description": "Enter url parameter for message", "description": "Enter url parameter for message",
"fieldname": "message_parameter", "fieldname": "message_parameter",
"fieldtype": "Data", "fieldtype": "Data",
"in_list_view": 1, "in_list_view": 1,
"label": "Message Parameter", "label": "Message Parameter",
"permlevel": 0, "permlevel": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"description": "Enter url parameter for receiver nos", "description": "Enter url parameter for receiver nos",
"fieldname": "receiver_parameter", "fieldname": "receiver_parameter",
"fieldtype": "Data", "fieldtype": "Data",
"in_list_view": 1, "in_list_view": 1,
"label": "Receiver Parameter", "label": "Receiver Parameter",
"permlevel": 0, "permlevel": 0,
"reqd": 1 "reqd": 1
}, },
{ {
"fieldname": "static_parameters_section", "fieldname": "static_parameters_section",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0, "permlevel": 0,
"width": "50%" "width": "50%"
}, },
{ {
"description": "Enter static url parameters here (Eg. sender=ERPNext, username=ERPNext, password=1234 etc.)", "description": "Enter static url parameters here (Eg. sender=ERPNext, username=ERPNext, password=1234 etc.)",
"fieldname": "static_parameters", "fieldname": "parameters",
"fieldtype": "Table", "fieldtype": "Table",
"label": "Static Parameters", "label": "Static Parameters",
"options": "SMS Parameter", "options": "SMS Parameter",
"permlevel": 0 "permlevel": 0
} }
], ],
"icon": "icon-cog", "icon": "icon-cog",
"idx": 1, "idx": 1,
"in_create": 0, "in_create": 0,
"issingle": 1, "issingle": 1,
"modified": "2014-12-24 16:42:57.956544", "modified": "2014-12-26 16:42:57.956544",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Setup", "module": "Setup",
"name": "SMS Settings", "name": "SMS Settings",
"owner": "Administrator", "owner": "Administrator",
"permissions": [ "permissions": [
{ {
"create": 1, "create": 1,
"permlevel": 0, "permlevel": 0,
"read": 1, "read": 1,
"report": 0, "report": 0,
"role": "System Manager", "role": "System Manager",
"submit": 0, "submit": 0,
"write": 1 "write": 1
} }
], ],
"read_only": 0 "read_only": 0
} }

View File

@ -71,7 +71,7 @@ def send_sms(receiver_list, msg, sender_name = ''):
def send_via_gateway(arg): def send_via_gateway(arg):
ss = frappe.get_doc('SMS Settings', 'SMS Settings') ss = frappe.get_doc('SMS Settings', 'SMS Settings')
args = {ss.message_parameter : arg.get('message')} args = {ss.message_parameter : arg.get('message')}
for d in ss.get("static_parameters"): for d in ss.get("parameters"):
args[d.parameter] = d.value args[d.parameter] = d.value
resp = [] resp = []

View File

@ -178,11 +178,11 @@ cur_frm.cscript.validate = function(doc, cdt, cdn){
cur_frm.cscript.weight_to_validate(doc, cdt, cdn); cur_frm.cscript.weight_to_validate(doc, cdt, cdn);
} }
cur_frm.fields_dict.customer_item_codes.grid.get_field("customer_name").get_query = function(doc, cdt, cdn) { cur_frm.fields_dict.customer_items.grid.get_field("customer_name").get_query = function(doc, cdt, cdn) {
return { query: "erpnext.controllers.queries.customer_query" } return { query: "erpnext.controllers.queries.customer_query" }
} }
cur_frm.fields_dict.supplier_item_codes.grid.get_field("supplier").get_query = function(doc, cdt, cdn) { cur_frm.fields_dict.supplier_items.grid.get_field("supplier").get_query = function(doc, cdt, cdn) {
return { query: "erpnext.controllers.queries.supplier_query" } return { query: "erpnext.controllers.queries.supplier_query" }
} }

File diff suppressed because it is too large Load Diff

View File

@ -302,7 +302,7 @@ class Item(WebsiteGenerator):
def fill_customer_code(self): def fill_customer_code(self):
""" Append all the customer codes and insert into "customer_code" field of item table """ """ Append all the customer codes and insert into "customer_code" field of item table """
cust_code=[] cust_code=[]
for d in self.get('customer_item_codes'): for d in self.get('customer_items'):
cust_code.append(d.ref_code) cust_code.append(d.ref_code)
self.customer_code=','.join(cust_code) self.customer_code=','.join(cust_code)

View File

@ -251,10 +251,10 @@ def validate_conversion_rate(args, meta):
def get_party_item_code(args, item_doc, out): def get_party_item_code(args, item_doc, out):
if args.transaction_type == "selling": if args.transaction_type == "selling":
customer_item_code = item_doc.get("customer_item_codes", {"customer_name": args.customer}) customer_item_code = item_doc.get("customer_items", {"customer_name": args.customer})
out.customer_item_code = customer_item_code[0].ref_code if customer_item_code else None out.customer_item_code = customer_item_code[0].ref_code if customer_item_code else None
else: else:
item_supplier = item_doc.get("supplier_item_codes", {"supplier": args.supplier}) item_supplier = item_doc.get("supplier_items", {"supplier": args.supplier})
out.supplier_part_no = item_supplier[0].supplier_part_no if item_supplier else None out.supplier_part_no = item_supplier[0].supplier_part_no if item_supplier else None
def get_pos_settings_item_details(company, args, pos_settings=None): def get_pos_settings_item_details(company, args, pos_settings=None):