diff --git a/erpnext/__version__.py b/erpnext/__version__.py index 9821e97a0a..e6674df0f0 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1,2 +1,2 @@ from __future__ import unicode_literals -__version__ = '5.0.9' +__version__ = '5.0.10' diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 6317793538..1e2b352d4e 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -76,9 +76,9 @@ class JournalEntry(AccountsController): account_type = frappe.db.get_value("Account", d.account, "account_type") if account_type in ["Receivable", "Payable"]: if not (d.party_type and d.party): - frappe.throw(_("Row{0}: Party Type and Party is required for Receivable / Payable account {1}").format(d.idx, d.account)) + frappe.throw(_("Row {0}: Party Type and Party is required for Receivable / Payable account {1}").format(d.idx, d.account)) elif d.party_type and d.party: - frappe.throw(_("Row{0}: Party Type and Party is only applicable against Receivable / Payable account").format(d.idx)) + frappe.throw(_("Row {0}: Party Type and Party is only applicable against Receivable / Payable account").format(d.idx)) def check_credit_limit(self): customers = list(set([d.party for d in self.get("accounts") if d.party_type=="Customer" and flt(d.debit) > 0])) @@ -438,7 +438,7 @@ class JournalEntry(AccountsController): if self.stock_entry: if frappe.db.get_value("Stock Entry", self.stock_entry, "docstatus") != 1: frappe.throw(_("Stock Entry {0} is not submitted").format(self.stock_entry)) - + if frappe.db.exists({"doctype": "Journal Entry", "stock_entry": self.stock_entry, "docstatus":1}): frappe.msgprint(_("Warning: Another {0} # {1} exists against stock entry {2}".format(self.voucher_type, self.name, self.stock_entry))) diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py index f54b860228..bcb128b972 100644 --- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py +++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals import frappe -from frappe import msgprint, _ +from frappe import _ from frappe.utils import flt def execute(filters=None): @@ -23,7 +23,7 @@ def execute(filters=None): purchase_receipt = d.purchase_receipt elif d.po_detail: purchase_receipt = ", ".join(frappe.db.sql_list("""select distinct parent - from `tabPurchase Receipt Item` where docstatus=1 and po_detail=%s""", d.po_detail)) + from `tabPurchase Receipt Item` where docstatus=1 and prevdoc_detail_docname=%s""", d.po_detail)) expense_account = d.expense_account or aii_account_map.get(d.company) row = [d.item_code, d.item_name, d.item_group, d.parent, d.posting_date, d.supplier, diff --git a/erpnext/accounts/report/purchase_register/purchase_register.py b/erpnext/accounts/report/purchase_register/purchase_register.py index 7d34413347..a104ced598 100644 --- a/erpnext/accounts/report/purchase_register/purchase_register.py +++ b/erpnext/accounts/report/purchase_register/purchase_register.py @@ -144,7 +144,7 @@ def get_invoice_tax_map(invoice_list, invoice_expense_map, expense_accounts): return invoice_expense_map, invoice_tax_map def get_invoice_po_pr_map(invoice_list): - pi_items = frappe.db.sql("""select parent, purchase_order, purchase_receipt, po_detail + pi_items = frappe.db.sql("""select parent, purchase_order, purchase_receipt, po_detail, project_name from `tabPurchase Invoice Item` where parent in (%s) and (ifnull(purchase_order, '') != '' or ifnull(purchase_receipt, '') != '')""" % ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1) @@ -160,7 +160,7 @@ def get_invoice_po_pr_map(invoice_list): pr_list = [d.purchase_receipt] elif d.po_detail: pr_list = frappe.db.sql_list("""select distinct parent from `tabPurchase Receipt Item` - where docstatus=1 and po_detail=%s""", d.pr_detail) + where docstatus=1 and prevdoc_detail_docname=%s""", d.po_detail) if pr_list: invoice_po_pr_map.setdefault(d.parent, frappe._dict()).setdefault("purchase_receipt", pr_list) diff --git a/erpnext/config/manufacturing.py b/erpnext/config/manufacturing.py index f982dffc32..4fa8451f5e 100644 --- a/erpnext/config/manufacturing.py +++ b/erpnext/config/manufacturing.py @@ -55,6 +55,14 @@ def get_data(): "name": "BOM Replace Tool", "description": _("Replace Item / BOM in all BOMs"), }, + { + "type": "page", + "name": "bom-browser", + "icon": "icon-sitemap", + "label": _("BOM Browser"), + "description": _("Tree of Bill of Materials"), + "doctype": "BOM" + } ] }, { diff --git a/erpnext/crm/doctype/newsletter/newsletter.py b/erpnext/crm/doctype/newsletter/newsletter.py index 0bafda6881..30fd101e35 100644 --- a/erpnext/crm/doctype/newsletter/newsletter.py +++ b/erpnext/crm/doctype/newsletter/newsletter.py @@ -8,7 +8,9 @@ import frappe.utils from frappe import throw, _ from frappe.model.document import Document from frappe.email.bulk import check_bulk_limit +from frappe.utils.verified_command import get_signed_params, verify_request import erpnext.tasks +from erpnext.crm.doctype.newsletter_list.newsletter_list import add_subscribers class Newsletter(Document): def onload(self): @@ -87,7 +89,6 @@ def get_lead_options(): @frappe.whitelist(allow_guest=True) def unsubscribe(email, name): - from frappe.utils.verified_command import verify_request if not verify_request(): return @@ -123,3 +124,47 @@ def create_lead(email_id): "source": "Email" }) lead.insert() + + +@frappe.whitelist(allow_guest=True) +def subscribe(email): + url = frappe.utils.get_url("/api/method/erpnext.crm.doctype.newsletter.newsletter.confirm_subscription") +\ + "?" + get_signed_params({"email": email}) + + messages = ( + _("Thank you for your interest in subscribing to our updates"), + _("Please verify your email id"), + url, + _("Click here to verify") + ) + + print url + + content = """ +

{0}. {1}.

+

{3}

+ """ + + frappe.sendmail(email, subject=_("Confirm Your Email"), content=content.format(*messages), bulk=True) + +@frappe.whitelist(allow_guest=True) +def confirm_subscription(email): + if not verify_request(): + return + + if not frappe.db.exists("Newsletter List", _("Website")): + frappe.get_doc({ + "doctype": "Newsletter List", + "title": _("Website") + }).insert(ignore_permissions=True) + + + frappe.flags.ignore_permissions = True + + add_subscribers(_("Website"), email) + frappe.db.commit() + + frappe.respond_as_web_page(_("Confirmed"), _("{0} has been successfully added to our Newsletter list.").format(email)) + + + diff --git a/erpnext/crm/doctype/newsletter_list/newsletter_list.py b/erpnext/crm/doctype/newsletter_list/newsletter_list.py index e4ba6b1ad4..1eb95eac17 100644 --- a/erpnext/crm/doctype/newsletter_list/newsletter_list.py +++ b/erpnext/crm/doctype/newsletter_list/newsletter_list.py @@ -5,7 +5,7 @@ from __future__ import unicode_literals import frappe from frappe.model.document import Document -from frappe.utils import validate_email_add, strip +from frappe.utils import validate_email_add from frappe import _ from email.utils import parseaddr @@ -75,7 +75,7 @@ def add_subscribers(name, email_list): "doctype": "Newsletter List Subscriber", "newsletter_list": name, "email": email - }).insert() + }).insert(ignore_permissions = frappe.flags.ignore_permissions) count += 1 else: diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 74631d170a..54e2d0332f 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -5,7 +5,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd. and Contributors" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "5.0.9" +app_version = "5.0.10" error_report_email = "support@erpnext.com" @@ -96,8 +96,8 @@ scheduler_events = { ] } -default_mail_footer = """
- +default_mail_footer = """
+ Sent via ERPNext
""" diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index c6e5bf0a3e..65ecfd8b90 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -1,27 +1,36 @@ // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt -// On REFRESH frappe.provide("erpnext.bom"); -cur_frm.cscript.refresh = function(doc,dt,dn){ - cur_frm.toggle_enable("item", doc.__islocal); - toggle_operations(cur_frm); - if (!doc.__islocal && doc.docstatus<2) { - cur_frm.add_custom_button(__("Update Cost"), cur_frm.cscript.update_cost); - } -} +frappe.ui.form.on("BOM", { + onload_post_render: function(frm) { + frm.get_field("items").grid.set_multiple_add("item_code", "qty"); + }, + refresh: function(frm) { + frm.toggle_enable("item", frm.doc.__islocal); + toggle_operations(frm); -cur_frm.cscript.update_cost = function() { - return frappe.call({ - doc: cur_frm.doc, - method: "update_cost", - freeze: true, - callback: function(r) { - if(!r.exc) cur_frm.refresh_fields(); + if (!frm.doc.__islocal && frm.doc.docstatus<2) { + frm.add_custom_button(__("Update Cost"), function() { + frm.events.update_cost(frm); + }); + frm.add_custom_button(__("Browse BOM"), function() { + frappe.set_route("bom-browser", frm.doc.name); + }); } - }) -} + }, + update_cost: function(frm) { + return frappe.call({ + doc: frm.doc, + method: "update_cost", + freeze: true, + callback: function(r) { + if(!r.exc) frm.refresh_fields(); + } + }) + } +}); cur_frm.add_fetch("item", "description", "description"); cur_frm.add_fetch("item", "image", "image"); diff --git a/erpnext/manufacturing/page/__init__.py b/erpnext/manufacturing/page/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/manufacturing/page/bom_browser/__init__.py b/erpnext/manufacturing/page/bom_browser/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/manufacturing/page/bom_browser/bom_browser.js b/erpnext/manufacturing/page/bom_browser/bom_browser.js new file mode 100644 index 0000000000..453d8c57a9 --- /dev/null +++ b/erpnext/manufacturing/page/bom_browser/bom_browser.js @@ -0,0 +1,90 @@ +// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +// License: GNU General Public License v3. See license.txt + +frappe.pages['bom-browser'].on_page_load = function(wrapper) { + var page = frappe.ui.make_app_page({ + parent: wrapper, + title: 'BOM Browser', + single_column: true + }); + + page.main.css({ + "min-height": "300px", + "padding-bottom": "25px" + }); + + page.tree_area = $('

'+ + __("Select BOM to start") + +'

').appendTo(page.main); + + frappe.breadcrumbs.add(frappe.breadcrumbs.last_module || "Manufacturing"); + + var make_tree = function() { + erpnext.bom_tree = new erpnext.BOMTree(page.$bom_select.val(), page, page.tree_area); + } + + page.$bom_select = wrapper.page.add_field({fieldname: "bom", + fieldtype:"Link", options: "BOM", label: __("BOM")}).$input + .change(function() { + make_tree(); + }); + + page.set_secondary_action(__('Refresh'), function() { + make_tree(); + }); +} + + +frappe.pages['bom-browser'].on_page_show = function(wrapper){ + // set from route + var bom = null; + if(frappe.get_route()[1]) { + var bom = frappe.get_route().splice(1).join("/"); + } + if(frappe.route_options && frappe.route_options.bom) { + var bom = frappe.route_options.bom; + } + if(bom) { + wrapper.page.$bom_select.val(bom).trigger("change"); + } +}; + +erpnext.BOMTree = Class.extend({ + init: function(root, page, parent) { + $(parent).empty(); + var me = this; + me.page = page; + me.bom = page.$bom_select.val(); + me.can_read = frappe.model.can_read("BOM"); + me.can_create = frappe.boot.user.can_create.indexOf("BOM") !== -1 || + frappe.boot.user.in_create.indexOf("BOM") !== -1; + me.can_write = frappe.model.can_write("BOM"); + me.can_delete = frappe.model.can_delete("BOM"); + + this.tree = new frappe.ui.Tree({ + parent: $(parent), + label: me.bom, + args: {parent: me.bom}, + method: 'erpnext.manufacturing.page.bom_browser.bom_browser.get_children', + toolbar: [ + {toggle_btn: true}, + { + label:__("Edit"), + condition: function(node) { + return node.expandable; + }, + click: function(node) { + frappe.set_route("Form", "BOM", node.data.parent); + } + } + ], + get_label: function(node) { + if(node.data.qty) { + return node.data.qty + " x " + node.data.value; + } else { + return node.data.value; + } + } + }); + } +}); diff --git a/erpnext/manufacturing/page/bom_browser/bom_browser.json b/erpnext/manufacturing/page/bom_browser/bom_browser.json new file mode 100644 index 0000000000..5b75463457 --- /dev/null +++ b/erpnext/manufacturing/page/bom_browser/bom_browser.json @@ -0,0 +1,21 @@ +{ + "content": null, + "creation": "2015-05-25 02:57:33.472044", + "docstatus": 0, + "doctype": "Page", + "modified": "2015-05-25 02:57:33.472044", + "modified_by": "Administrator", + "module": "Manufacturing", + "name": "bom-browser", + "owner": "Administrator", + "page_name": "bom-browser", + "roles": [ + { + "role": "Manufacturing User" + } + ], + "script": null, + "standard": "Yes", + "style": null, + "title": "BOM Browser" +} \ No newline at end of file diff --git a/erpnext/manufacturing/page/bom_browser/bom_browser.py b/erpnext/manufacturing/page/bom_browser/bom_browser.py new file mode 100644 index 0000000000..8051e69b9d --- /dev/null +++ b/erpnext/manufacturing/page/bom_browser/bom_browser.py @@ -0,0 +1,15 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +@frappe.whitelist() +def get_children(parent): + return frappe.db.sql("""select item_code as value, + bom_no as parent, qty, + if(ifnull(bom_no, "")!="", 1, 0) as expandable + from `tabBOM Item` + where parent=%s + order by idx + """, parent, as_dict=True) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 65a6de4348..fcf0ea7d69 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -156,4 +156,5 @@ erpnext.patches.v5_0.repost_requested_qty erpnext.patches.v5_0.fix_taxes_and_totals_in_party_currency erpnext.patches.v5_0.update_tax_amount_after_discount_in_purchase_cycle erpnext.patches.v5_0.rename_pos_setting -erpnext.patches.v5_0.update_operation_description \ No newline at end of file +erpnext.patches.v5_0.update_operation_description +erpnext.patches.v5_0.set_footer_address diff --git a/erpnext/patches/v5_0/set_footer_address.py b/erpnext/patches/v5_0/set_footer_address.py new file mode 100644 index 0000000000..2779e48c59 --- /dev/null +++ b/erpnext/patches/v5_0/set_footer_address.py @@ -0,0 +1,7 @@ +import frappe + +def execute(): + frappe.reload_doctype("System Settings") + ss = frappe.get_doc("System Settings", "System Settings") + ss.email_footer_address = frappe.db.get_default("company") + ss.save() diff --git a/erpnext/patches/v5_0/update_projects.py b/erpnext/patches/v5_0/update_projects.py index 71a84a13cc..e234246623 100644 --- a/erpnext/patches/v5_0/update_projects.py +++ b/erpnext/patches/v5_0/update_projects.py @@ -10,13 +10,15 @@ def execute(): for m in frappe.get_all("Project Milestone", "*"): if (m.milestone and m.milestone_date and frappe.db.exists("Project", m.parent)): - frappe.get_doc({ + task = frappe.get_doc({ "doctype": "Task", "subject": m.milestone, "expected_start_date": m.milestone_date, "status": "Open" if m.status=="Pending" else "Closed", "project": m.parent, - }).insert(ignore_permissions=True) + }) + task.flags.ignore_mandatory = True + task.insert(ignore_permissions=True) # remove project milestone frappe.delete_doc("DocType", "Project Milestone") diff --git a/erpnext/public/images/erpnext-fade.png b/erpnext/public/images/erpnext-fade.png deleted file mode 100644 index 81cc41036a..0000000000 Binary files a/erpnext/public/images/erpnext-fade.png and /dev/null differ diff --git a/erpnext/public/images/erpnext-footer.png b/erpnext/public/images/erpnext-footer.png new file mode 100644 index 0000000000..4b36fa120c Binary files /dev/null and b/erpnext/public/images/erpnext-footer.png differ diff --git a/erpnext/public/images/erpnext-logo-white.svg b/erpnext/public/images/erpnext-logo-white.svg deleted file mode 100644 index fb72c1743a..0000000000 --- a/erpnext/public/images/erpnext-logo-white.svg +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/erpnext/public/images/erpnext1.png b/erpnext/public/images/erpnext1.png deleted file mode 100644 index cfc3d84d24..0000000000 Binary files a/erpnext/public/images/erpnext1.png and /dev/null differ diff --git a/erpnext/public/images/feed.png b/erpnext/public/images/feed.png deleted file mode 100755 index 315c4f4fa6..0000000000 Binary files a/erpnext/public/images/feed.png and /dev/null differ diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 7e5dc32139..9f1a8eb161 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -98,7 +98,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ }, hide_currency_and_price_list: function() { - if(this.frm.doc.docstatus > 0) { + if(this.frm.doc.conversion_rate == 1 && this.frm.doc.docstatus > 0) { hide_field("currency_and_price_list"); } else { unhide_field("currency_and_price_list"); diff --git a/erpnext/public/js/website_utils.js b/erpnext/public/js/website_utils.js index 2ca9cf894e..b0fc557f40 100644 --- a/erpnext/public/js/website_utils.js +++ b/erpnext/public/js/website_utils.js @@ -15,5 +15,15 @@ frappe.send_message = function(opts, btn) { }); }; +erpnext.subscribe_to_newsletter = function(opts, btn) { + return frappe.call({ + type: "POST", + method: "erpnext.crm.doctype.newsletter.newsletter.subscribe", + btn: btn, + args: {"email": opts.email}, + callback: opts.callback + }); +} + // for backward compatibility -erpnext.send_message = frappe.send_message; \ No newline at end of file +erpnext.send_message = frappe.send_message; diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py index e102f0d768..65b0c08680 100644 --- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py +++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py @@ -50,10 +50,14 @@ def get_conditions(filters, date_field): conditions = [""] values = [] - for field in ["company", "customer", "territory", "sales_person"]: + for field in ["company", "customer", "territory"]: if filters.get(field): conditions.append("dt.{0}=%s".format(field)) values.append(filters[field]) + + if filters.get("sales_person"): + conditions.append("st.sales_person=%s") + values.append(filters["sales_person"]) if filters.get("from_date"): conditions.append("dt.{0}>=%s".format(date_field)) diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js index 817fdb629a..8f28310aa3 100644 --- a/erpnext/setup/doctype/company/company.js +++ b/erpnext/setup/doctype/company/company.js @@ -11,31 +11,37 @@ frappe.ui.form.on("Company", { erpnext.company.set_chart_of_accounts_options(frm.doc); }, delete_company_transactions: function(frm) { - var d = frappe.prompt({ - fieldtype:"Data", - fieldname: "company_name", - label: __("Please re-type company name to confirm"), - reqd: 1, - description: __("Please make sure you really want to delete all the transactions for this company. Your master data will remain as it is. This action cannot be undone.")}, - function(data) { - if(data.company_name !== frm.doc.name) { - frappe.msgprint("Company name not same"); - return; - } - frappe.call({ - method: "erpnext.setup.doctype.company.delete_company_transactions.delete_company_transactions", - args: { - company_name: data.company_name - }, - freeze: true, - callback: function(r, rt) { - if(!r.exc) - frappe.msgprint(__("Successfully deleted all transactions related to this company!")); + frappe.verify_password(function() { + var d = frappe.prompt({ + fieldtype:"Data", + fieldname: "company_name", + label: __("Please re-type company name to confirm"), + reqd: 1, + description: __("Please make sure you really want to delete all the transactions for this company. Your master data will remain as it is. This action cannot be undone.")}, + function(data) { + if(data.company_name !== frm.doc.name) { + frappe.msgprint("Company name not same"); + return; } - }); - }, __("Delete all the Transactions for this Company"), __("Delete")); - - d.get_primary_btn().addClass("btn-danger"); + frappe.call({ + method: "erpnext.setup.doctype.company.delete_company_transactions.delete_company_transactions", + args: { + company_name: data.company_name + }, + freeze: true, + callback: function(r, rt) { + if(!r.exc) + frappe.msgprint(__("Successfully deleted all transactions related to this company!")); + }, + onerror: function() { + frappe.msgprint(__("Wrong Password")); + } + }); + }, __("Delete all the Transactions for this Company"), __("Delete") + ); + d.get_primary_btn().addClass("btn-danger"); + } + ); } }); diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.py b/erpnext/setup/page/setup_wizard/setup_wizard.py index 819e244d48..a9774faeab 100644 --- a/erpnext/setup/page/setup_wizard/setup_wizard.py +++ b/erpnext/setup/page/setup_wizard/setup_wizard.py @@ -197,6 +197,7 @@ def set_defaults(args): "language": args.get("language"), "time_zone": args.get("timezone"), "float_precision": 3, + "email_footer_address": args.get("company"), 'date_format': frappe.db.get_value("Country", args.get("country"), "date_format"), 'number_format': number_format, 'enable_scheduler': 1 if not frappe.flags.in_test else 0 diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index 282d1829c3..6659da58a0 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -575,6 +575,7 @@ "description": "Publish Item to hub.erpnext.com", "fieldname": "publish_in_hub", "fieldtype": "Check", + "hidden": 1, "label": "Publish in Hub", "permlevel": 0, "precision": "" @@ -878,7 +879,7 @@ "icon": "icon-tag", "idx": 1, "max_attachments": 1, - "modified": "2015-05-04 18:44:46.090445", + "modified": "2015-05-22 02:16:57.435105", "modified_by": "Administrator", "module": "Stock", "name": "Item", diff --git a/erpnext/stock/doctype/item_price/item_price.js b/erpnext/stock/doctype/item_price/item_price.js index 1807cc84a5..56bd185c0c 100644 --- a/erpnext/stock/doctype/item_price/item_price.js +++ b/erpnext/stock/doctype/item_price/item_price.js @@ -1,15 +1,18 @@ // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt -$.extend(cur_frm.cscript, { - onload: function () { +frappe.ui.form.on("Item Price", { + onload: function (frm) { // Fetch price list details - cur_frm.add_fetch("price_list", "buying", "buying"); - cur_frm.add_fetch("price_list", "selling", "selling"); - cur_frm.add_fetch("price_list", "currency", "currency"); + frm.add_fetch("price_list", "buying", "buying"); + frm.add_fetch("price_list", "selling", "selling"); + frm.add_fetch("price_list", "currency", "currency"); // Fetch item details - cur_frm.add_fetch("item_code", "item_name", "item_name"); - cur_frm.add_fetch("item_code", "description", "item_description"); + frm.add_fetch("item_code", "item_name", "item_name"); + frm.add_fetch("item_code", "description", "item_description"); + + frm.set_df_property("bulk_import_help", "options", + '' + __("Import in Bulk") + ''); } -}); \ No newline at end of file +}); diff --git a/erpnext/stock/doctype/item_price/item_price.json b/erpnext/stock/doctype/item_price/item_price.json index b8194d9cac..b4e84f174e 100644 --- a/erpnext/stock/doctype/item_price/item_price.json +++ b/erpnext/stock/doctype/item_price/item_price.json @@ -100,13 +100,26 @@ "label": "Item Description", "permlevel": 0, "read_only": 1 + }, + { + "fieldname": "section_break_12", + "fieldtype": "Section Break", + "permlevel": 0, + "precision": "" + }, + { + "fieldname": "bulk_import_help", + "fieldtype": "HTML", + "label": "Bulk Import Help", + "permlevel": 0, + "precision": "" } ], "icon": "icon-flag", "idx": 1, "in_create": 0, "istable": 0, - "modified": "2015-03-03 01:05:09.876025", + "modified": "2015-05-26 03:15:02.324161", "modified_by": "Administrator", "module": "Stock", "name": "Item Price", diff --git a/erpnext/templates/includes/footer/footer_extension.html b/erpnext/templates/includes/footer/footer_extension.html new file mode 100644 index 0000000000..400043edbf --- /dev/null +++ b/erpnext/templates/includes/footer/footer_extension.html @@ -0,0 +1,42 @@ +{% if not hide_footer_signup %} +
+
+
+ + +
+
+ +
+ +{% endif %} diff --git a/erpnext/templates/includes/footer/footer_powered.html b/erpnext/templates/includes/footer/footer_powered.html new file mode 100644 index 0000000000..c44c34202c --- /dev/null +++ b/erpnext/templates/includes/footer/footer_powered.html @@ -0,0 +1 @@ + diff --git a/erpnext/templates/includes/footer_extension.html b/erpnext/templates/includes/footer_extension.html deleted file mode 100644 index e40825d576..0000000000 --- a/erpnext/templates/includes/footer_extension.html +++ /dev/null @@ -1,41 +0,0 @@ -
-
-
-
- - - - -
-
-
-
- diff --git a/erpnext/templates/includes/footer_powered.html b/erpnext/templates/includes/footer_powered.html deleted file mode 100644 index 96611813a7..0000000000 --- a/erpnext/templates/includes/footer_powered.html +++ /dev/null @@ -1 +0,0 @@ -ERPNext Powered diff --git a/erpnext/templates/print_formats/includes/item_table_description.html b/erpnext/templates/print_formats/includes/item_table_description.html index f4c3d2c639..e0824a20f9 100644 --- a/erpnext/templates/print_formats/includes/item_table_description.html +++ b/erpnext/templates/print_formats/includes/item_table_description.html @@ -4,11 +4,12 @@
{%- endif %}
- {% if doc.in_format_data("item_code") -%} + {% if doc.in_format_data("item_code") and not doc.is_print_hide("item_code") -%}
{{ doc.item_code }}
{%- endif %} {% if (doc.in_format_data("item_name") and - (not doc.in_format_data("item_code") or doc.item_code != doc.item_name)) -%} + (not doc.in_format_data("item_code") or doc.is_print_hide("item_code") + or doc.item_code != doc.item_name)) -%}
{{ doc.get_formatted("item_name") }}
{%- endif %} {% if (doc.in_format_data("description") and doc.description and diff --git a/setup.py b/setup.py index 44d7bdeefe..111ec641e0 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -version = "5.0.9" +version = "5.0.10" with open("requirements.txt", "r") as f: install_requires = f.readlines()