-
Notifications
You must be signed in to change notification settings - Fork 12
Description
I have this error while installing the app as follow:
Installing optima_payment...
Updating DocTypes for optima_payment: [====================] 100%
An error occurred while installing optima_payment: 'NoneType' object has no attribute 'dict'
Traceback with variables (most recent call last):
File "apps/frappe/frappe/commands/site.py", line 484, in install_app
_install_app(app, verbose=context.verbose, force=force)
context = {'sites': ['latihan'], 'force': False, 'verbose': False, 'profile': False}
apps = ('optima_payment',)
force = False
_install_app = <function install_app at 0x7fcc30b8b420>
filelock = <function filelock at 0x7fcc31f3bce0>
exit_code = 0
site = 'latihan'
app = 'optima_payment'
err = AttributeError("'NoneType' object has no attribute 'dict'")
File "apps/frappe/frappe/installer.py", line 329, in install_app
frappe.get_attr(fn)(name)
name = 'optima_payment'
verbose = False
set_as_patched = True
force = False
sync_jobs = <function sync_jobs at 0x7fcc2ffb7560>
sync_for = <function sync_for at 0x7fcc2ffc44a0>
sync_customizations = <function sync_customizations at 0x7fcc31f92ca0>
sync_fixtures = <function sync_fixtures at 0x7fcc2ffc47c0>
app_hooks = {'after_app_install': ['optima_payment.install.after_app_install'], 'after_app_uninstall': ['optima_payment.uninstall.after_app_uninstall'], 'after_migrate': ['optima_payment.migrate.after_migrate'], 'app_description': ['App For Cheque Status'], 'app_email': ['sales@itsystematic.com'], 'app_include_js': ['/assets/optima_payment/js/optima_payment.js'], 'app_license': ['mit'], 'app_name': ['optima_payment'], 'app_publisher': ['IT Systematic'], 'app_title': ['Optima Payment'], 'boot_session': ['optima_payment.startup.boot.add_optima_payment_setting'], 'doc_events': {'Payment Entry': {'on_submit': ['optima_payment.doc_events.payment_entry.payment_entry_on_submit'], 'on_cancel': ['optima_payment.doc_events.payment_entry.payment_entry_on_cancel'], 'on_trash': ['optima_payment.doc_events.payment_entry.payment_entry_on_trash']}, 'Journal Entry': {'on_cancel': ['optima_payment.doc_events.journal_entry.journal_entry_on_cancel']}}, 'doctype_js': {'Payment Entry': ['public/js/payment_entry.js', 'p...
installed_apps = ['frappe', 'erpnext', 'payments', 'hrms', 'lending', 'webshop', 'frappe_tinymce', 'themes']
app = 'frappe'
required_app = 'frappe'
fn = 'optima_payment.install.after_app_install'
File "apps/optima_payment/optima_payment/install.py", line 15, in after_app_install
create_custom_fields(custom_fields, update=True)
app_name = 'optima_payment'
custom_fields = {'Mode of Payment': [{'fieldname': 'is_payable_cheque', 'fieldtype': 'Check', 'insert_after': 'accounts', 'label': 'Is Payable Cheque', 'default': 0, 'depends_on': "eval: doc.type == 'Cheque' && doc.is_receivable_cheque == 0 ;"}, {'fieldname': 'is_receivable_cheque', 'fieldtype': 'Check', 'insert_after': 'is_payable_cheque', 'label': 'Is Receivable Cheque', 'default': 0, 'depends_on': "eval: doc.type == 'Cheque' && doc.is_payable_cheque == 0 ;"}, {'fieldname': 'cheque_collection_fee', 'fieldtype': 'Float', 'label': 'Cheque Collection Fee', 'insert_after': 'type', 'depends_on': "eval: doc.type == 'Bank' ;"}, {'fieldname': 'cheque_rejection_fee', 'fieldtype': 'Float', 'label': 'Cheque Rejection Fee', 'insert_after': 'cheque_collection_fee', 'depends_on': "eval: doc.type == 'Bank' ;"}], 'Payment Entry': [{'fieldname': 'payee_name', 'fieldtype': 'Data', 'insert_after': 'reference_no', 'label': 'Payee Name', 'no_copy': 0, 'hidden': 0}, {'fieldname': 'cheque_deposit_slip', 'fieldtype': 'Link...
File "apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 339, in create_custom_fields
process_field_update(custom_field)
custom_fields = {'Mode of Payment': [{'fieldname': 'is_payable_cheque', 'fieldtype': 'Check', 'insert_after': 'accounts', 'label': 'Is Payable Cheque', 'default': 0, 'depends_on': "eval: doc.type == 'Cheque' && doc.is_receivable_cheque == 0 ;"}, {'fieldname': 'is_receivable_cheque', 'fieldtype': 'Check', 'insert_after': 'is_payable_cheque', 'label': 'Is Receivable Cheque', 'default': 0, 'depends_on': "eval: doc.type == 'Cheque' && doc.is_payable_cheque == 0 ;"}, {'fieldname': 'cheque_collection_fee', 'fieldtype': 'Float', 'label': 'Cheque Collection Fee', 'insert_after': 'type', 'depends_on': "eval: doc.type == 'Bank' ;"}, {'fieldname': 'cheque_rejection_fee', 'fieldtype': 'Float', 'label': 'Cheque Rejection Fee', 'insert_after': 'cheque_collection_fee', 'depends_on': "eval: doc.type == 'Bank' ;"}], 'Payment Entry': [{'fieldname': 'payee_name', 'fieldtype': 'Data', 'insert_after': 'reference_no', 'label': 'Payee Name', 'no_copy': 0, 'hidden': 0}, {'fieldname': 'cheque_deposit_slip', 'fieldtype': 'Link...
ignore_validate = False
update = True
process_field_update = <function create_custom_fields..process_field_update at 0x7fcc24e1e7a0>
doctypes_to_update = {'Mode of Payment', 'Payment Entry', 'Letter Head', 'Bank'}
doctypes = ('Company',)
fields = [{'fieldname': 'default_insurance_account', 'fieldtype': 'Link', 'label': 'Default Insurance Account', 'options': 'Account', 'insert_after': 'default_bank_account'}, {'fieldname': 'default_receiving_insurance_account', 'fieldtype': 'Link', 'label': 'Default Receiving Insurance Account', 'options': 'Account', 'insert_after': 'default_insurance_account'}, {'fieldname': 'bank_fees_account', 'fieldtype': 'Link', 'label': 'Bank Fees Account', 'options': 'Account', 'insert_after': 'default_receiving_insurance_account'}, {'fieldname': 'lost_expense_Bank_guarantee_account', 'fieldtype': 'Link', 'label': 'Lost Expense Bank Guarantee Account', 'options': 'Account', 'insert_after': 'bank_fees_account'}]
doctype = 'Company'
df = {'fieldname': 'lost_expense_Bank_guarantee_account', 'fieldtype': 'Link', 'label': 'Lost Expense Bank Guarantee Account', 'options': 'Account', 'insert_after': 'bank_fees_account', 'owner': 'Administrator'}
field = None
custom_field = None
original_values = {'doctype': 'Custom Field', 'name': 'Company-bank_fees_account', 'flags': {}, 'meta': <Meta: Custom Field>, '_table_fieldnames': set(), 'creation': datetime.datetime(2025, 5, 28, 11, 47, 5, 905997), 'modified': datetime.datetime(2025, 5, 28, 11, 47, 5, 905997), 'modified_by': 'Administrator', 'owner': 'Administrator', 'docstatus': 0, 'idx': 39, 'is_system_generated': 1, 'dt': 'Company', 'module': None, 'label': 'Bank Fees Account', 'placeholder': None, 'fieldname': 'bank_fees_account', 'insert_after': 'default_receiving_insurance_account', 'length': 0, 'link_filters': None, 'fieldtype': 'Link', 'precision': '', 'hide_seconds': 0, 'hide_days': 0, 'options': 'Account', 'sort_options': 0, 'fetch_from': None, 'fetch_if_empty': 0, 'collapsible': 0, 'collapsible_depends_on': None, 'default': None, 'depends_on': None, 'mandatory_depends_on': None, 'read_only_depends_on': None, 'non_negative': 0, 'reqd': 0, 'unique': 0, 'is_virtual': 0, 'read_only': 0, 'ignore_user_permissions': 0, 'hidden': 0...
existing_custom_fields = {('Expense Claim Detail', 'purchase_invoice'): {'name': 'Expense Claim Detail-purchase_invoice', 'creation': datetime.datetime(2025, 5, 28, 11, 47, 8, 111811), 'modified': datetime.datetime(2025, 5, 28, 11, 47, 8, 111811), 'modified_by': 'Administrator', 'owner': 'Administrator', 'docstatus': 0, 'idx': 0, 'is_system_generated': 1, 'dt': 'Expense Claim Detail', 'module': None, 'label': 'Purchase Invoice', 'placeholder': None, 'fieldname': 'purchase_invoice', 'insert_after': None, 'length': 0, 'link_filters': None, 'fieldtype': 'Link', 'precision': '', 'hide_seconds': 0, 'hide_days': 0, 'options': 'Purchase Invoice', 'sort_options': 0, 'fetch_from': None, 'fetch_if_empty': 0, 'collapsible': 0, 'collapsible_depends_on': None, 'default': None, 'depends_on': None, 'mandatory_depends_on': None, 'read_only_depends_on': None, 'non_negative': 0, 'reqd': 0, 'unique': 0, 'is_virtual': 0, 'read_only': 0, 'ignore_user_permissions': 0, 'hidden': 0, 'print_hide': 0, 'print_hide_if_no_value': 0, 'prin...
updated = True
File "apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 309, in process_field_update
existing_custom_fields[(field.dt, field.fieldname)] = field.dict
field = None
existing_custom_fields = {('Expense Claim Detail', 'purchase_invoice'): {'name': 'Expense Claim Detail-purchase_invoice', 'creation': datetime.datetime(2025, 5, 28, 11, 47, 8, 111811), 'modified': datetime.datetime(2025, 5, 28, 11, 47, 8, 111811), 'modified_by': 'Administrator', 'owner': 'Administrator', 'docstatus': 0, 'idx': 0, 'is_system_generated': 1, 'dt': 'Expense Claim Detail', 'module': None, 'label': 'Purchase Invoice', 'placeholder': None, 'fieldname': 'purchase_invoice', 'insert_after': None, 'length': 0, 'link_filters': None, 'fieldtype': 'Link', 'precision': '', 'hide_seconds': 0, 'hide_days': 0, 'options': 'Purchase Invoice', 'sort_options': 0, 'fetch_from': None, 'fetch_if_empty': 0, 'collapsible': 0, 'collapsible_depends_on': None, 'default': None, 'depends_on': None, 'mandatory_depends_on': None, 'read_only_depends_on': None, 'non_negative': 0, 'reqd': 0, 'unique': 0, 'is_virtual': 0, 'read_only': 0, 'ignore_user_permissions': 0, 'hidden': 0, 'print_hide': 0, 'print_hide_if_no_value': 0, 'prin...
updated = True
builtins.AttributeError: 'NoneType' object has no attribute 'dict'