mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
refactor: move allowed doctypes to accounts settings
- dropped 'allowed' field
(cherry picked from commit d5c58277cb)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
if allowed := frappe.get_hooks("repost_allowed_doctypes"):
|
||||
accounts_settings = frappe.get_doc("Accounts Settings")
|
||||
for x in allowed:
|
||||
if x not in [t.document_type for t in accounts_settings.repost_allowed_types]:
|
||||
accounts_settings.append("repost_allowed_types", {"document_type": x})
|
||||
accounts_settings.save()
|
||||
Reference in New Issue
Block a user