Merge pull request #38366 from frappe/mergify/bp/version-15-hotfix/pr-38360
fix: make parameters of `create_subscription_process` optional (and other minor fixes) (backport #38360)
This commit is contained in:
		
						commit
						8c906b422f
					
				| @ -17,11 +17,10 @@ class ProcessSubscription(Document): | ||||
| 
 | ||||
| 
 | ||||
| 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() | ||||
|  | ||||
| @ -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 | ||||
|  | ||||
| @ -419,7 +419,6 @@ scheduler_events = { | ||||
| 		"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", | ||||
| 	], | ||||
| @ -450,6 +449,7 @@ scheduler_events = { | ||||
| 		"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", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user