Second Level Override Issue

Problem Statement:

I am attempting to implement a 2nd level override in Frappe, where the function custom_stripe_app.api.accept_custom should replace the standard accept method in frappe.website.doctype.web_form.web_form. However, this override is not functioning as expected, and the custom method is not being invoked when the web form is submitted.

Current Configuration:

The following setup is being used to override the accept method in two steps:

  1. "frappe.website.doctype.web_form.web_form.accept": "payments.overrides.payment_webform.accept"
  2. "payments.overrides.payment_webform.accept": "custom_stripe_app.api.accept_custom"

The goal is for the second level of overriding to allow custom_stripe_app.api.accept_custom to handle the form submission logic instead of the default.

Expected Behavior:

  • The method frappe.website.doctype.web_form.web_form.accept should call payments.overrides.payment_webform.accept, which should further call custom_stripe_app.api.accept_custom.
  • This chain of overrides should lead to the custom function being executed instead of the default one when the web form is submitted.

Actual Behavior:

The 2nd level override is not working as intended. Instead of invoking custom_stripe_app.api.accept_custom, the web form submission still invokes the default accept method defined in frappe.website.doctype.web_form.web_form.