diff --git a/.github/helper/install.sh b/.github/helper/install.sh index efd2f5c5b3..2bb950fcfc 100644 --- a/.github/helper/install.sh +++ b/.github/helper/install.sh @@ -56,6 +56,7 @@ sed -i 's/schedule:/# schedule:/g' Procfile sed -i 's/socketio:/# socketio:/g' Procfile sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile +bench get-app payments bench get-app erpnext "${GITHUB_WORKSPACE}" if [ "$TYPE" == "server" ]; then bench setup requirements --dev; fi diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index ecbb7c6a0a..4d2dc58677 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -113,7 +113,6 @@ jobs: echo "Updating to v$version" branch_name="version-$version-hotfix" - git -C "apps/frappe" fetch --depth 1 upstream $branch_name:$branch_name git -C "apps/erpnext" fetch --depth 1 upstream $branch_name:$branch_name @@ -122,6 +121,7 @@ jobs: rm -rf ~/frappe-bench/env bench setup env + bench pip install -e ./apps/payments bench pip install -e ./apps/erpnext bench --site test_site migrate @@ -135,6 +135,8 @@ jobs: pyenv global $(pyenv versions | grep '3.10') rm -rf ~/frappe-bench/env bench -v setup env + bench pip install -e ./apps/payments bench pip install -e ./apps/erpnext bench --site test_site migrate + bench --site test_site install-app payments diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 5264987acf..29c497854c 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -6,10 +6,10 @@ import json import frappe from frappe import _ -from frappe.integrations.utils import get_payment_gateway_controller from frappe.model.document import Document from frappe.utils import flt, get_url, nowdate from frappe.utils.background_jobs import enqueue +from payments.utils import get_payment_gateway_controller from erpnext.accounts.doctype.payment_entry.payment_entry import ( get_company_defaults, diff --git a/erpnext/erpnext_integrations/doctype/gocardless_settings/gocardless_settings.py b/erpnext/erpnext_integrations/doctype/gocardless_settings/gocardless_settings.py index 55517e4828..f9a293fc30 100644 --- a/erpnext/erpnext_integrations/doctype/gocardless_settings/gocardless_settings.py +++ b/erpnext/erpnext_integrations/doctype/gocardless_settings/gocardless_settings.py @@ -7,9 +7,10 @@ from urllib.parse import urlencode import frappe import gocardless_pro from frappe import _ -from frappe.integrations.utils import create_payment_gateway, create_request_log +from frappe.integrations.utils import create_request_log from frappe.model.document import Document from frappe.utils import call_hook_method, cint, flt, get_url +from payments.utils import create_payment_gateway class GoCardlessSettings(Document): diff --git a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py index e389980726..b534783864 100644 --- a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py +++ b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py @@ -6,9 +6,10 @@ from json import dumps, loads import frappe from frappe import _ -from frappe.integrations.utils import create_payment_gateway, create_request_log +from frappe.integrations.utils import create_request_log from frappe.model.document import Document from frappe.utils import call_hook_method, fmt_money, get_request_site_address +from payments.utils import create_payment_gateway from erpnext.erpnext_integrations.doctype.mpesa_settings.mpesa_connector import MpesaConnector from erpnext.erpnext_integrations.doctype.mpesa_settings.mpesa_custom_fields import ( diff --git a/erpnext/hooks.py b/erpnext/hooks.py index d7cd8b957c..aa10e31744 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -10,6 +10,7 @@ app_email = "info@erpnext.com" app_license = "GNU General Public License (v3)" source_link = "https://github.com/frappe/erpnext" app_logo_url = "/assets/erpnext/images/erpnext-logo.svg" +required_apps = ["payments"] develop_version = "14.x.x-develop"