diff --git a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_settings.js b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_settings.js index f5ea8047c6a..a15558bc2b6 100644 --- a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_settings.js +++ b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_settings.js @@ -1,2 +1,10 @@ // Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt + + +frappe.ui.form.on('Amazon MWS Settings', { + refresh: function (frm) { + let app_link = "Ecommerce Integrations" + frm.dashboard.add_comment(__("Amazon MWS Integration will be removed from ERPNext in Version 14. Please install {0} app to continue using it.", [app_link]), "yellow", true); + } +}); diff --git a/erpnext/patches.txt b/erpnext/patches.txt index f4a6e089637..b3366f3cba7 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -348,4 +348,5 @@ erpnext.patches.v13_0.delete_bank_reconciliation_detail erpnext.patches.v13_0.update_sane_transfer_against erpnext.patches.v13_0.enable_provisional_accounting erpnext.patches.v13_0.update_disbursement_account -erpnext.patches.v13_0.update_reserved_qty_closed_wo \ No newline at end of file +erpnext.patches.v13_0.update_reserved_qty_closed_wo +erpnext.patches.v13_0.amazon_mws_deprecation_warning \ No newline at end of file diff --git a/erpnext/patches/v13_0/amazon_mws_deprecation_warning.py b/erpnext/patches/v13_0/amazon_mws_deprecation_warning.py new file mode 100644 index 00000000000..5eb6ff44702 --- /dev/null +++ b/erpnext/patches/v13_0/amazon_mws_deprecation_warning.py @@ -0,0 +1,15 @@ +import click +import frappe + + +def execute(): + + frappe.reload_doc("erpnext_integrations", "doctype", "amazon_mws_settings") + if not frappe.db.get_single_value("Amazon MWS Settings", "enable_amazon"): + return + + click.secho( + "Amazon MWS Integration is moved to a separate app and will be removed from ERPNext in version-14.\n" + "Please install the app to continue using the integration: https://github.com/frappe/ecommerce_integrations", + fg="yellow", + ) \ No newline at end of file