chore: warning for Amazon MWS integration deprecation (#29792)

* chore: warning for amazon mws integration deprecation

* style: spaces to tabs

[skip ci]
This commit is contained in:
Sagar Sharma
2022-02-15 11:37:29 +05:30
committed by GitHub
parent 321cbd5982
commit 83ab63ba81
3 changed files with 25 additions and 1 deletions

View File

@@ -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 = "<a href='https://github.com/frappe/ecommerce_integrations' target='_blank'>Ecommerce Integrations</a>"
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);
}
});

View File

@@ -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
erpnext.patches.v13_0.update_reserved_qty_closed_wo
erpnext.patches.v13_0.amazon_mws_deprecation_warning

View File

@@ -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",
)