libracore / erpnextswiss

ERPNext application for Switzerland-specific use cases
GNU Affero General Public License v3.0
77 stars 63 forks source link

Module import failed for EDI File, the DocType you're trying to open might be deleted. #133

Closed jabertech closed 4 months ago

jabertech commented 5 months ago

Expected behvauour

(fill in)

Actual behaviour

frappe@b2be2f4c07fc:~/frappe-bench$ bench install-app erpnextswiss --force

Installing erpnextswiss... Updating DocTypes for erpnextswiss : [== ] 5%An error occurred while installing erpnextswiss: Module import failed for EDI File, the DocType you're trying to open might be deleted.
Error: cannot import name 'create_new_folder' from 'frappe.core.doctype.file.file' (/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/file/file.py) Traceback with variables (most recent call last): File "apps/frappe/frappe/commands/site.py", line 445, in install_app _install_app(app, verbose=context.verbose, force=force) context = {'sites': ['site1.localhost'], 'force': False, 'verbose': False, 'profile': False} apps = ('erpnextswiss',) force = True _install_app = <function install_app at 0x7fe98dd84220> filelock = <function filelock at 0x7fe98dd75440> exit_code = 0 site = 'site1.localhost' app = 'erpnextswiss' err = ImportError("Module import failed for EDI File, the DocType you're trying to open might be deleted.
Error: cannot import name 'create_new_folder' from 'frappe.core.doctype.file.file' (apps/frappe/frappe/core/doctype/file/file.py)") File "apps/frappe/frappe/installer.py", line 301, in install_app sync_for(name, force=force, reset_permissions=True) name = 'erpnextswiss' verbose = False set_as_patched = True force = True sync_jobs = <function sync_jobs at 0x7fe98d11a660> sync_for = <function sync_for at 0x7fe98d11b4c0> sync_customizations = <function sync_customizations at 0x7fe98dd39c60> sync_fixtures = <function sync_fixtures at 0x7fe98d11b7e0> app_hooks = {'after_install': ['erpnextswiss.setup.install.after_install'], 'app_color': ['#92d050'], 'app_description': ['ERPNext application for Switzerland-specific use cases'], 'app_email': ['info@libracore.com'], 'app_icon': ['fa fa-diamond'], 'app_include_js': ['/assets/erpnextswiss/js/swiss_common.js', '/assets/erpnextswiss/js/iban.js', '/assets/erpnextswiss/js/email.js'], 'app_license': ['AGPL'], 'app_name': ['erpnextswiss'], 'app_publisher': ['libracore (https://www.libracore.com)'], 'app_title': ['ERPNextSwiss'], 'app_version': ['1.23.2'], 'doc_events': {'Contact': {'on_update': ['erpnextswiss.erpnextswiss.nextcloud.contacts.send_contact_to_nextcloud'], 'on_trash': ['erpnextswiss.erpnextswiss.nextcloud.contacts.delete_contact_from_nextcloud']}}, 'doctype_js': {'Item': ['public/js/item.js'], 'Quotation': ['public/js/quotation.js'], 'Sales Order': ['public/js/sales_order.js'], 'Sales Invoice': ['public/js/sales_invoice.js'], 'Purchase Invoice': ['public/js/purchase_invoice.js'], 'Fiscal Ye... installed_apps = ['frappe', 'erpnext'] File "apps/frappe/frappe/model/sync.py", line 111, in sync_for import_file_by_path( app_name = 'erpnextswiss' force = True reset_permissions = True files = ['apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/inspection_equipment_transaction/inspection_equipment_transaction.json', 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/public_holiday_list/public_holiday_list.json', 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/hlk_settings/hlk_settings.json', 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/payment_proposal_expense/payment_proposal_expense.json', 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/contract_service/contract_service.json', 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/payment_reminder/payment_reminder.json', 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/edi_file/edi_file.json', 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/edi_sales_report/edi_sales_report.json', '/home/fr... module_name = 'scripts' folder = 'apps/erpnextswiss/erpnextswiss/scripts' l = 101 i = 6 doc_path = 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/edi_file/edi_file.json' File "apps/frappe/frappe/modules/import_file.py", line 146, in import_file_by_path import_doc( path = 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/edi_file/edi_file.json' force = True data_import = False pre_process = None ignore_version = True reset_permissions = True docs = [{'autoname': 'naming_series:', 'creation': '2022-05-08 20:33:33.615799', 'doctype': 'DocType', 'editable_grid': 1, 'engine': 'InnoDB', 'fields': [{'fieldname': 'edi_connection', 'fieldtype': 'Link', 'label': 'EDI Connection', 'options': 'EDI Connection', 'read_only': 1, 'doctype': 'DocField'}, {'fetch_from': 'edi_connection.edi_type', 'fieldname': 'edi_type', 'fieldtype': 'Data', 'in_list_view': 1, 'label': 'EDI Type', 'read_only': 1, 'doctype': 'DocField'}, {'default': 'ME.######', 'fieldname': 'naming_series', 'fieldtype': 'Select', 'label': 'Naming Series', 'options': 'ME.######', 'doctype': 'DocField'}, {'fieldname': 'column_head', 'fieldtype': 'Column Break', 'doctype': 'DocField'}, {'fieldname': 'date', 'fieldtype': 'Datetime', 'in_list_view': 1, 'label': 'Date', 'doctype': 'DocField'}, {'fieldname': 'title', 'fieldtype': 'Data', 'label': 'Title', 'doctype': 'DocField'}, {'fieldname': 'amended_from', 'fieldtype': 'Link', 'label': 'Amended From', 'no_copy': 1, 'options': 'EDI Fil... calculated_hash = '8539097b26cd75f111468d02c7e62b1d' doc = {'autoname': 'naming_series:', 'creation': '2022-05-08 20:33:33.615799', 'doctype': 'DocType', 'editable_grid': 1, 'engine': 'InnoDB', 'fields': [{'fieldname': 'edi_connection', 'fieldtype': 'Link', 'label': 'EDI Connection', 'options': 'EDI Connection', 'read_only': 1, 'doctype': 'DocField'}, {'fetch_from': 'edi_connection.edi_type', 'fieldname': 'edi_type', 'fieldtype': 'Data', 'in_list_view': 1, 'label': 'EDI Type', 'read_only': 1, 'doctype': 'DocField'}, {'default': 'ME.######', 'fieldname': 'naming_series', 'fieldtype': 'Select', 'label': 'Naming Series', 'options': 'ME.######', 'doctype': 'DocField'}, {'fieldname': 'column_head', 'fieldtype': 'Column Break', 'doctype': 'DocField'}, {'fieldname': 'date', 'fieldtype': 'Datetime', 'in_list_view': 1, 'label': 'Date', 'doctype': 'DocField'}, {'fieldname': 'title', 'fieldtype': 'Data', 'label': 'Title', 'doctype': 'DocField'}, {'fieldname': 'amended_from', 'fieldtype': 'Link', 'label': 'Amended From', 'no_copy': 1, 'options': 'EDI File... db_modified_timestamp = datetime.datetime(2024, 5, 13, 2, 29, 45, 159513) is_db_timestamp_latest = True File "apps/frappe/frappe/modules/import_file.py", line 239, in import_doc doc.insert() docdict = {'autoname': 'naming_series:', 'creation': '2022-05-08 20:33:33.615799', 'doctype': 'DocType', 'editable_grid': 1, 'engine': 'InnoDB', 'fields': [{'fieldname': 'edi_connection', 'fieldtype': 'Link', 'label': 'EDI Connection', 'options': 'EDI Connection', 'read_only': 1, 'doctype': 'DocField'}, {'fetch_from': 'edi_connection.edi_type', 'fieldname': 'edi_type', 'fieldtype': 'Data', 'in_list_view': 1, 'label': 'EDI Type', 'read_only': 1, 'doctype': 'DocField'}, {'default': 'ME.######', 'fieldname': 'naming_series', 'fieldtype': 'Select', 'label': 'Naming Series', 'options': 'ME.######', 'doctype': 'DocField'}, {'fieldname': 'column_head', 'fieldtype': 'Column Break', 'doctype': 'DocField'}, {'fieldname': 'date', 'fieldtype': 'Datetime', 'in_list_view': 1, 'label': 'Date', 'doctype': 'DocField'}, {'fieldname': 'title', 'fieldtype': 'Data', 'label': 'Title', 'doctype': 'DocField'}, {'fieldname': 'amended_from', 'fieldtype': 'Link', 'label': 'Amended From', 'no_copy': 1, 'options': 'EDI File... data_import = False pre_process = None ignore_version = True reset_permissions = True path = 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/edi_file/edi_file.json' controller = <class 'frappe.core.doctype.doctype.doctype.DocType'> doc = File "apps/frappe/frappe/model/document.py", line 315, in insert self.run_post_save_methods() self = ignore_permissions = None ignore_links = None ignore_if_duplicate = False ignore_mandatory = None set_name = None set_child_names = True d = File "apps/frappe/frappe/model/document.py", line 1128, in run_post_save_methods self.run_method("on_update") self = File "apps/frappe/frappe/model/document.py", line 962, in run_method out = Document.hook(fn)(self, *args, kwargs) self = method = 'on_update' args = () kwargs = {} fn = <function Document.run_method..fn at 0x7fe961f9d260> File "apps/frappe/frappe/model/document.py", line 1322, in composer return composed(self, method, *args, kwargs) self = args = () kwargs = {} hooks = [<function build_domain_restriced_doctype_cache at 0x7fe98dd38860>, <function clear_doctype_notifications at 0x7fe961fe1800>, <function process_workflow_actions at 0x7fe96200d1c0>, <function attach_files_to_document at 0x7fe98d0b4cc0>, <function apply at 0x7fe96200ff60>, <function update_due_date at 0x7fe962018040>, <function apply_permissions_for_non_standard_user_type at 0x7fe962019760>] method = 'on_update' doc_events = {'': {'on_update': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions', 'frappe.core.doctype.file.utils.attach_files_to_document', 'frappe.automation.doctype.assignment_rule.assignment_rule.apply', 'frappe.automation.doctype.assignment_rule.assignment_rule.update_due_date', 'frappe.core.doctype.user_type.user_type.apply_permissions_for_non_standard_user_type'], 'after_rename': ['frappe.desk.notifications.clear_doctype_notifications'], 'on_cancel': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions', 'frappe.automation.doctype.assignment_rule.assignment_rule.apply'], 'on_trash': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions'], 'on_update_after_submit': ['frappe.workflow.doctype.workflow_action.workflow_action.process_w... handler = 'frappe.core.doctype.user_type.user_type.apply_permissions_for_non_standard_user_type' composed = <function Document.hook..compose..runner at 0x7fe961f9d580> compose = <function Document.hook..compose at 0x7fe961f9d1c0> f = <function Document.run_method..fn at 0x7fe961f9d260> File "apps/frappe/frappe/model/document.py", line 1304, in runner add_to_return_value(self, fn(self, args, kwargs)) self = method = 'on_update' args = () kwargs = {} add_to_return_value = <function Document.hook..add_to_return_value at 0x7fe961f9d440> fn = <function Document.run_method..fn at 0x7fe961f9d260> hooks = (<function build_domain_restriced_doctype_cache at 0x7fe98dd38860>, <function clear_doctype_notifications at 0x7fe961fe1800>, <function process_workflow_actions at 0x7fe96200d1c0>, <function attach_files_to_document at 0x7fe98d0b4cc0>, <function apply at 0x7fe96200ff60>, <function update_due_date at 0x7fe962018040>, <function apply_permissions_for_non_standard_user_type at 0x7fe962019760>) File "apps/frappe/frappe/model/document.py", line 959, in fn return method_object(*args, kwargs) self = args = () kwargs = {} method_object = <bound method DocType.on_update of > method = 'on_update' File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 531, in on_update self.run_module_method("on_doctype_update") self = allow_doctype_export = False File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 629, in run_module_method module = load_doctype_module(self.name, self.module) self = method = 'on_doctype_update' load_doctype_module = <function load_doctype_module at 0x7fe98dd3a2a0> File "apps/frappe/frappe/modules/utils.py", line 254, in load_doctype_module raise ImportError(msg) from e doctype = 'EDI File' module = 'ERPNextSwiss' prefix = '' suffix = '' app = 'erpnextswiss' key = **** module_name = 'erpnextswiss.erpnextswiss.doctype.edi_file.edi_file' msg = "Module import failed for EDI File, the DocType you're trying to open might be deleted.
Error: cannot import name 'create_new_folder' from 'frappe.core.doctype.file.file' (apps/frappe/frappe/core/doctype/file/file.py)" builtins.ImportError: Module import failed for EDI File, the DocType you're trying to open might be deleted.
Error: cannot import name 'create_new_folder' from 'frappe.core.doctype.file.file' (apps/frappe/frappe/core/doctype/file/file.py) frappe@b2be2f4c07fc:~/frappe-bench$

Observed in (version)

running in docker on a windows machine using this image (https://github.com/vibeconn/erpnext-custom?tab=readme-ov-file) v15 - erpnext master - erpnextswiss

Steps to reproduce

(fill in)

chaosgmd3 commented 5 months ago

similar here - v15 - erpnext

Installing erpnextswiss... Updating DocTypes for erpnextswiss : [========================== ] 65%An error occurred while installing erpnextswiss: Module import failed for EDI File, the DocType you're trying to open might be deleted.
Error: cannot import name 'create_new_folder' from 'frappe.core.doctype.file.file' (/home/c-sys/frappe-bench/apps/frappe/frappe/core/doctype/file/file.py) Traceback with variables (most recent call last): File "apps/frappe/frappe/commands/site.py", line 445, in install_app _install_app(app, verbose=context.verbose, force=force) context = {'sites': ['cencorship'], 'force': False, 'verbose': False, 'profile': False} apps = ('erpnextswiss',) force = True _install_app = <function install_app at 0x7f508048a840> filelock = <function filelock at 0x7f508047bd80> exit_code = 0 site = 'cencorship' app = 'erpnextswiss' err = ImportError("Module import failed for EDI File, the DocType you're trying to open might be deleted.
Error: cannot import name 'create_new_folder' from 'frappe.core.doctype.file.file' (apps/frappe/frappe/core/doctype/file/file.py)") File "apps/frappe/frappe/installer.py", line 301, in install_app sync_for(name, force=force, reset_permissions=True) name = 'erpnextswiss' verbose = False set_as_patched = True force = True sync_jobs = <function sync_jobs at 0x7f508029a200> sync_for = <function sync_for at 0x7f508029b060> sync_customizations = <function sync_customizations at 0x7f5080448720> sync_fixtures = <function sync_fixtures at 0x7f508029b380> app_hooks = {'after_install': ['erpnextswiss.setup.install.after_install'], 'app_color': ['#92d050'], 'app_description': ['ERPNext application for Switzerland-specific use cases'], 'app_email': ['info@libracore.com'], 'app_icon': ['fa fa-diamond'], 'app_include_js': ['/assets/erpnextswiss/js/swiss_common.js', '/assets/erpnextswiss/js/iban.js', '/assets/erpnextswiss/js/email.js'], 'app_license': ['AGPL'], 'app_name': ['erpnextswiss'], 'app_publisher': ['libracore (https://www.libracore.com)'], 'app_title': ['ERPNextSwiss'], 'app_version': ['1.23.3'], 'doc_events': {'Contact': {'on_update': ['erpnextswiss.erpnextswiss.nextcloud.contacts.send_contact_to_nextcloud'], 'on_trash': ['erpnextswiss.erpnextswiss.nextcloud.contacts.delete_contact_from_nextcloud']}}, 'doctype_js': {'Item': ['public/js/item.js'], 'Quotation': ['public/js/quotation.js'], 'Sales Order': ['public/js/sales_order.js'], 'Sales Invoice': ['public/js/sales_invoice.js'], 'Purchase Invoice': ['public/js/purchase_invoice.js'], 'Fiscal Ye... installed_apps = ['frappe', 'erpnext', 'payments'] File "apps/frappe/frappe/model/sync.py", line 111, in sync_for import_file_by_path( app_name = 'erpnextswiss' force = True reset_permissions = True files = ['apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/carryover_and_payouts/carryover_and_payouts.json', 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/payment_proposal_expense/payment_proposal_expense.json', 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/specification_document_specification/specification_document_specification.json', 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/nextcloud_settings/nextcloud_settings.json', 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/zugferd_default_value/zugferd_default_value.json', 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/payment_proposal_salary_slip/payment_proposal_salary_slip.json', 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/calibration_test_set/calibration_test_set.json', 'apps/erpnextswiss/erpnextswi... module_name = 'scripts' folder = 'apps/erpnextswiss/erpnextswiss/scripts' l = 102 i = 67 doc_path = 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/edi_file/edi_file.json' File "apps/frappe/frappe/modules/import_file.py", line 146, in import_file_by_path import_doc( path = 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/edi_file/edi_file.json' force = True data_import = False pre_process = None ignore_version = True reset_permissions = True docs = [{'autoname': 'naming_series:', 'creation': '2022-05-08 20:33:33.615799', 'doctype': 'DocType', 'editable_grid': 1, 'engine': 'InnoDB', 'fields': [{'fieldname': 'edi_connection', 'fieldtype': 'Link', 'label': 'EDI Connection', 'options': 'EDI Connection', 'read_only': 1, 'doctype': 'DocField'}, {'fetch_from': 'edi_connection.edi_type', 'fieldname': 'edi_type', 'fieldtype': 'Data', 'in_list_view': 1, 'label': 'EDI Type', 'read_only': 1, 'doctype': 'DocField'}, {'default': 'ME.######', 'fieldname': 'naming_series', 'fieldtype': 'Select', 'label': 'Naming Series', 'options': 'ME.######', 'doctype': 'DocField'}, {'fieldname': 'column_head', 'fieldtype': 'Column Break', 'doctype': 'DocField'}, {'fieldname': 'date', 'fieldtype': 'Datetime', 'in_list_view': 1, 'label': 'Date', 'doctype': 'DocField'}, {'fieldname': 'title', 'fieldtype': 'Data', 'label': 'Title', 'doctype': 'DocField'}, {'fieldname': 'amended_from', 'fieldtype': 'Link', 'label': 'Amended From', 'no_copy': 1, 'options': 'EDI Fil... calculated_hash = '8539097b26cd75f111468d02c7e62b1d' doc = {'autoname': 'naming_series:', 'creation': '2022-05-08 20:33:33.615799', 'doctype': 'DocType', 'editable_grid': 1, 'engine': 'InnoDB', 'fields': [{'fieldname': 'edi_connection', 'fieldtype': 'Link', 'label': 'EDI Connection', 'options': 'EDI Connection', 'read_only': 1, 'doctype': 'DocField'}, {'fetch_from': 'edi_connection.edi_type', 'fieldname': 'edi_type', 'fieldtype': 'Data', 'in_list_view': 1, 'label': 'EDI Type', 'read_only': 1, 'doctype': 'DocField'}, {'default': 'ME.######', 'fieldname': 'naming_series', 'fieldtype': 'Select', 'label': 'Naming Series', 'options': 'ME.######', 'doctype': 'DocField'}, {'fieldname': 'column_head', 'fieldtype': 'Column Break', 'doctype': 'DocField'}, {'fieldname': 'date', 'fieldtype': 'Datetime', 'in_list_view': 1, 'label': 'Date', 'doctype': 'DocField'}, {'fieldname': 'title', 'fieldtype': 'Data', 'label': 'Title', 'doctype': 'DocField'}, {'fieldname': 'amended_from', 'fieldtype': 'Link', 'label': 'Amended From', 'no_copy': 1, 'options': 'EDI File... db_modified_timestamp = datetime.datetime(2024, 5, 23, 21, 29, 26, 849932) is_db_timestamp_latest = True File "apps/frappe/frappe/modules/import_file.py", line 239, in import_doc doc.insert() docdict = {'autoname': 'naming_series:', 'creation': '2022-05-08 20:33:33.615799', 'doctype': 'DocType', 'editable_grid': 1, 'engine': 'InnoDB', 'fields': [{'fieldname': 'edi_connection', 'fieldtype': 'Link', 'label': 'EDI Connection', 'options': 'EDI Connection', 'read_only': 1, 'doctype': 'DocField'}, {'fetch_from': 'edi_connection.edi_type', 'fieldname': 'edi_type', 'fieldtype': 'Data', 'in_list_view': 1, 'label': 'EDI Type', 'read_only': 1, 'doctype': 'DocField'}, {'default': 'ME.######', 'fieldname': 'naming_series', 'fieldtype': 'Select', 'label': 'Naming Series', 'options': 'ME.######', 'doctype': 'DocField'}, {'fieldname': 'column_head', 'fieldtype': 'Column Break', 'doctype': 'DocField'}, {'fieldname': 'date', 'fieldtype': 'Datetime', 'in_list_view': 1, 'label': 'Date', 'doctype': 'DocField'}, {'fieldname': 'title', 'fieldtype': 'Data', 'label': 'Title', 'doctype': 'DocField'}, {'fieldname': 'amended_from', 'fieldtype': 'Link', 'label': 'Amended From', 'no_copy': 1, 'options': 'EDI File... data_import = False pre_process = None ignore_version = True reset_permissions = True path = 'apps/erpnextswiss/erpnextswiss/erpnextswiss/doctype/edi_file/edi_file.json' controller = <class 'frappe.core.doctype.doctype.doctype.DocType'> doc = File "apps/frappe/frappe/model/document.py", line 315, in insert self.run_post_save_methods() self = ignore_permissions = None ignore_links = None ignore_if_duplicate = False ignore_mandatory = None set_name = None set_child_names = True d = File "apps/frappe/frappe/model/document.py", line 1128, in run_post_save_methods self.run_method("on_update") self = File "apps/frappe/frappe/model/document.py", line 962, in run_method out = Document.hook(fn)(self, *args, kwargs) self = method = 'on_update' args = () kwargs = {} fn = <function Document.run_method..fn at 0x7f5050fc42c0> File "apps/frappe/frappe/model/document.py", line 1322, in composer return composed(self, method, *args, kwargs) self = args = () kwargs = {} hooks = [<function build_domain_restriced_doctype_cache at 0x7f50815640e0>, <function clear_doctype_notifications at 0x7f505f1ce3e0>, <function process_workflow_actions at 0x7f505f1e6020>, <function attach_files_to_document at 0x7f508022c860>, <function apply at 0x7f505f204e00>, <function update_due_date at 0x7f505f204ea0>, <function apply_permissions_for_non_standard_user_type at 0x7f505f2065c0>] method = 'on_update' doc_events = {'': {'on_update': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions', 'frappe.core.doctype.file.utils.attach_files_to_document', 'frappe.automation.doctype.assignment_rule.assignment_rule.apply', 'frappe.automation.doctype.assignment_rule.assignment_rule.update_due_date', 'frappe.core.doctype.user_type.user_type.apply_permissions_for_non_standard_user_type'], 'after_rename': ['frappe.desk.notifications.clear_doctype_notifications'], 'on_cancel': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions', 'frappe.automation.doctype.assignment_rule.assignment_rule.apply'], 'on_trash': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions'], 'on_update_after_submit': ['frappe.workflow.doctype.workflow_action.workflow_action.process_w... handler = 'frappe.core.doctype.user_type.user_type.apply_permissions_for_non_standard_user_type' composed = <function Document.hook..compose..runner at 0x7f5050fc71a0> compose = <function Document.hook..compose at 0x7f5050fc4400> f = <function Document.run_method..fn at 0x7f5050fc42c0> File "apps/frappe/frappe/model/document.py", line 1304, in runner add_to_return_value(self, fn(self, args, kwargs)) self = method = 'on_update' args = () kwargs = {} add_to_return_value = <function Document.hook..add_to_return_value at 0x7f5050fc4220> fn = <function Document.run_method..fn at 0x7f5050fc42c0> hooks = (<function build_domain_restriced_doctype_cache at 0x7f50815640e0>, <function clear_doctype_notifications at 0x7f505f1ce3e0>, <function process_workflow_actions at 0x7f505f1e6020>, <function attach_files_to_document at 0x7f508022c860>, <function apply at 0x7f505f204e00>, <function update_due_date at 0x7f505f204ea0>, <function apply_permissions_for_non_standard_user_type at 0x7f505f2065c0>) File "apps/frappe/frappe/model/document.py", line 959, in fn return method_object(*args, kwargs) self = args = () kwargs = {} method_object = <bound method DocType.on_update of > method = 'on_update' File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 531, in on_update self.run_module_method("on_doctype_update") self = allow_doctype_export = False File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 629, in run_module_method module = load_doctype_module(self.name, self.module) self = method = 'on_doctype_update' load_doctype_module = <function load_doctype_module at 0x7f5080448d60> File "apps/frappe/frappe/modules/utils.py", line 254, in load_doctype_module raise ImportError(msg) from e doctype = 'EDI File' module = 'ERPNextSwiss' prefix = '' suffix = '' app = 'erpnextswiss' key = **** module_name = 'erpnextswiss.erpnextswiss.doctype.edi_file.edi_file' msg = "Module import failed for EDI File, the DocType you're trying to open might be deleted.
Error: cannot import name 'create_new_folder' from 'frappe.core.doctype.file.file' (apps/frappe/frappe/core/doctype/file/file.py)" builtins.ImportError: Module import failed for EDI File, the DocType you're trying to open might be deleted.
Error: cannot import name 'create_new_folder' from 'frappe.core.doctype.file.file' (apps/frappe/frappe/core/doctype/file/file.py)

lasalesi commented 4 months ago

Please make sure you install the v15 compatibility branch:

 $ bench get-app erpnextswiss --branch v15