Skip to content

Commit

Permalink
Merge pull request #38366 from frappe/mergify/bp/version-15-hotfix/pr…
Browse files Browse the repository at this point in the history
…-38360

fix: make parameters of `create_subscription_process` optional (and other minor fixes) (backport #38360)
  • Loading branch information
sagarvora committed Nov 27, 2023
2 parents 7385db0 + 721b429 commit 8c906b4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ def on_submit(self):


def create_subscription_process(
subscription: str | None, posting_date: Union[str, datetime.date] | None
subscription: str | None = None, posting_date: Union[str, datetime.date] | None = None
):
"""Create a new Process Subscription document"""
doc = frappe.new_doc("Process Subscription")
doc.subscription = subscription
doc.posting_date = getdate(posting_date)
doc.insert(ignore_permissions=True)
doc.submit()
2 changes: 1 addition & 1 deletion erpnext/accounts/doctype/subscription/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ def get_prorata_factor(


def process_all(
subscription: str | None, posting_date: Optional["DateTimeLikeObject"] = None
subscription: str | None = None, posting_date: Optional["DateTimeLikeObject"] = None
) -> None:
"""
Task to updates the status of all `Subscription` apart from those that are cancelled
Expand Down
2 changes: 1 addition & 1 deletion erpnext/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,6 @@
"erpnext.projects.doctype.project.project.collect_project_status",
],
"hourly_long": [
"erpnext.accounts.doctype.process_subscription.process_subscription.create_subscription_process",
"erpnext.stock.doctype.repost_item_valuation.repost_item_valuation.repost_entries",
"erpnext.utilities.bulk_transaction.retry",
],
Expand Down Expand Up @@ -450,6 +449,7 @@
"erpnext.accounts.utils.auto_create_exchange_rate_revaluation_weekly",
],
"daily_long": [
"erpnext.accounts.doctype.process_subscription.process_subscription.create_subscription_process",
"erpnext.setup.doctype.email_digest.email_digest.send",
"erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool.auto_update_latest_price_in_all_boms",
"erpnext.crm.utils.open_leads_opportunities_based_on_todays_event",
Expand Down

0 comments on commit 8c906b4

Please sign in to comment.