frappe / hrms

Open Source HR and Payroll Software
https://frappe.io/hr
GNU General Public License v3.0
1.39k stars 730 forks source link

Options must be a valid DocType for field Final Customer Offer #805

Closed sinhpn92 closed 1 year ago

sinhpn92 commented 1 year ago

Information about bug

I am installing the hrms to my site. But I got error in the stacktrace. I tried to looking for Final Customer Offer field by search:

select * from tabDocField
where idx = 39

But not found any field with name Final Customer Offer. What's wrong there? How can I fix it? Thank you so much

Module

HR

Version

ERPNext: v14.35.2 Frappe Framework: v14.45.0 Frappe HR: v14.10.1

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

Installing hrms...
Updating DocTypes for hrms          : [========================================] 100%
Setting up Frappe HR...
Installation for Frappe HR app failed due to an error. Please try re-installing the app or report the issue on https://github.com/frappe/hrms/issues/new if not resolved.
An error occurred while installing hrms: Company: Options must be a valid DocType for field Final Customer Offer in row 39
Traceback (most recent call last):
  File "apps/frappe/frappe/commands/site.py", line 415, in install_app
    _install_app(app, verbose=context.verbose, force=force)
  File "apps/frappe/frappe/installer.py", line 307, in install_app
    frappe.get_attr(after_install)()
  File "apps/hrms/hrms/install.py", line 21, in after_install
    raise e
  File "apps/hrms/hrms/install.py", line 9, in after_install
    setup()
  File "apps/hrms/hrms/setup.py", line 15, in after_install
    create_custom_fields(get_custom_fields())
  File "apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 224, in create_custom_fields
    create_custom_field(doctype, df, ignore_validate=ignore_validate)
  File "apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 190, in create_custom_field
    custom_field.insert()
  File "apps/frappe/frappe/model/document.py", line 285, in insert
    self.run_post_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1088, in run_post_save_methods
    self.run_method("on_update")
  File "apps/frappe/frappe/model/document.py", line 915, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/document.py", line 1277, in composer
    return composed(self, method, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/document.py", line 1259, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/document.py", line 912, in fn
    return method_object(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 102, in on_update
    validate_fields_for_doctype(self.dt)
  File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 1035, in validate_fields_for_doctype
    validate_fields(meta)
  File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 1464, in validate_fields
    check_link_table_options(meta.get("name"), d)
  File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 1110, in check_link_table_options
    frappe.throw(
  File "apps/frappe/frappe/__init__.py", line 534, in throw
    msgprint(
  File "apps/frappe/frappe/__init__.py", line 502, in msgprint
    _raise_exception()
  File "apps/frappe/frappe/__init__.py", line 451, in _raise_exception
    raise raise_exception(msg)
frappe.core.doctype.doctype.doctype.WrongOptionsDoctypeLinkError: Company: Options must be a valid DocType for field Final Customer Offer in row 39

Code of Conduct

ruchamahabal commented 1 year ago

@sinhpn92

select * from tabDocField

Check your custom fields from tabCustom Field