resilient-tech / india-compliance

Simple, yet powerful compliance solutions for Indian businesses
https://indiacompliance.app
GNU General Public License v3.0
152 stars 141 forks source link

Could not find DocType: Purchase Reconciliation Tool errro after india_compliance installation #2646

Closed lalitware closed 2 months ago

lalitware commented 2 months ago

Information about bug

I have installed erpnext using docker on digital ocean linux machine. After installing the India compliance version 15 using below commands an error occurred due to which nothing is coming on the page of Purchase Reconciliation Tool and the India Compliance Account page is also blank. If I go to the GST settings it throws an error Error Invalid "depends_on" expression

Below are the steps to replicate the bug Install the Erpnext using docker: Then install the India compliance version 15 manually using bench:

  1. docker exec -it frappe_docker-backend-1 bash
  2. bench get-app --branch version-15 https://github.com/resilient-tech/india-compliance.git
  3. bench --site frontend install-app india_compliance
  4. bench --site frontend migrate on the site below error is coming on dialog box

Error Invalid "depends_on" expression

Nothing Shows up in Gst settings and Purchase Reconciliation Tool Screenshot from 2024-09-30 13-54-01 Screenshot from 2024-09-30 13-53-32

After this command, the below error shows on the terminal itself

File "apps/frappe/frappe/init.py", line 567, in msgprint _raise_exception() msg = 'Could not find DocType: Purchase Reconciliation Tool' title = None raise_exception = <class 'frappe.exceptions.LinkValidationError'> as_table = False as_list = False indicator = 'red' alert = False primary_action = None is_minimizable = False wide = False realtime = False sys = <module 'sys' (built-in)> _raise_exception = <function msgprint.._raise_exception at 0x7fb662c64d60> inspect = <module 'inspect' from '/usr/local/lib/python3.11/inspect.py'> out = {'message': 'Could not find DocType: Purchase Reconciliation Tool', 'title': 'Message', 'indicator': 'red', 'raise_exception': 1, '__frappe_exc_id': '77d1129d8847df648b2d200e3fc30e6c13d953db0ab6206167432941'} File "apps/frappe/frappe/init.py", line 518, in _raise_exception raise exc exc = LinkValidationError('Could not find DocType: Purchase Reconciliation Tool') inspect = <module 'inspect' from '/usr/local/lib/python3.11/inspect.py'> msg = 'Could not find DocType: Purchase Reconciliation Tool' out = {'message': 'Could not find DocType: Purchase Reconciliation Tool', 'title': 'Message', 'indicator': 'red', 'raise_exception': 1, '__frappe_exc_id': '77d1129d8847df648b2d200e3fc30e6c13d953db0ab6206167432941'} raise_exception = <class 'frappe.exceptions.LinkValidationError'> frappe.exceptions.LinkValidationError: Could not find DocType: Purchase Reconciliation Tool frappe@51fa59820a92:~/frappe-bench$ bench --site frontend list-doctypes

Version

ERPNext: v15.19.1

Frappe Framework: v15.20.0

India Compliance: v15.13.3 (version-15)

Relevant log output / Stack trace / Full Error Message.

frappe@51fa59820a92:~/frappe-bench$ bench --site frontend install-app india_compliance
App erpnext already installed

Installing india_compliance...
Setting up Income Tax...
Setting up GST...
Installation for India Compliance failed due to an error. Please try re-installing the app or report the issue on https://github.com/resilient-tech/india-compliance/issues/new if not resolved.
An error occurred while installing india_compliance: Could not find DocType: Purchase Reconciliation Tool
Traceback with variables (most recent call last):
  File "apps/frappe/frappe/commands/site.py", line 444, in install_app
    _install_app(app, verbose=context.verbose, force=force)
      context = {'sites': ['frontend'], 'force': False, 'verbose': False, 'profile': False}
      apps = ('india_compliance',)
      force = False
      _install_app = <function install_app at 0x7fb666771a80>
      filelock = <function filelock at 0x7fb666762ca0>
      exit_code = 0
      site = 'frontend'
      app = 'india_compliance'
      err = LinkValidationError('Could not find DocType: Purchase Reconciliation Tool')
  File "apps/frappe/frappe/installer.py", line 311, in install_app
    frappe.get_attr(after_install)()
      name = 'india_compliance'
      verbose = False
      set_as_patched = True
      force = False
      sync_jobs = <function sync_jobs at 0x7fb664f5d3a0>
      sync_for = <function sync_for at 0x7fb664f5e200>
      sync_customizations = <function sync_customizations at 0x7fb666703600>
      sync_fixtures = <function sync_fixtures at 0x7fb664f5e520>
      app_hooks = {'accounting_dimension_doctypes': ['Bill of Entry', 'Bill of Entry Item'], 'after_app_install': ['india_compliance.install.after_app_install'], 'after_install': ['india_compliance.install.after_install'], 'after_migrate': ['india_compliance.audit_trail.setup.after_migrate'], 'app_color': ['grey'], 'app_description': ['ERPNext app to simplify compliance with Indian Rules and Regulations'], 'app_email': ['hello@indiacompliance.app'], 'app_icon': ['octicon octicon-file-directory'], 'app_include_css': ['india_compliance.bundle.css'], 'app_include_js': ['india_compliance.bundle.js'], 'app_license': ['GNU General Public License (v3)'], 'app_name': ['india_compliance'], 'app_publisher': ['Resilient Tech'], 'app_title': ['India Compliance'], 'audit_trail_doctypes': ['Accounts Settings', 'Dunning', 'Invoice Discounting', 'Journal Entry', 'Payment Entry', 'Period Closing Voucher', 'Process Deferred Accounting', 'Purchase Invoice', 'Sales Invoice', 'Asset', 'Asset Capitalization', 'Asset Repair',...
      installed_apps = ['frappe', 'erpnext']
      app = 'frappe/erpnext'
      required_app = 'erpnext'
      before_install = 'india_compliance.patches.check_version_compatibility.execute'
      out = None
      after_install = 'india_compliance.install.after_install'
  File "apps/india_compliance/india_compliance/install.py", line 75, in after_install
    raise e
  File "apps/india_compliance/india_compliance/install.py", line 60, in after_install
    setup_gst()
  File "apps/india_compliance/india_compliance/gst_india/setup/__init__.py", line 30, in after_install
    create_property_setters(include_defaults=True)
  File "apps/india_compliance/india_compliance/gst_india/setup/__init__.py", line 67, in create_property_setters
    frappe.make_property_setter(
      include_defaults = True
      property_setter = {'doctype': 'Purchase Reconciliation Tool', 'doctype_or_field': 'DocType', 'property': 'default_email_template', 'value': 'Purchase Reconciliation'}
  File "apps/frappe/frappe/__init__.py", line 1809, in make_property_setter
    ps.insert()
      args = {'doctype': 'Purchase Reconciliation Tool', 'doctype_or_field': 'DocType', 'property': 'default_email_template', 'value': 'Purchase Reconciliation', 'property_type': 'Data'}
      ignore_validate = False
      validate_fields_for_doctype = False
      is_system_generated = True
      doctype_list = ['Purchase Reconciliation Tool']
      doctype = 'Purchase Reconciliation Tool'
      ps = <PropertySetter: unsaved>
  File "apps/frappe/frappe/model/document.py", line 283, in insert
    self._validate_links()
      self = <PropertySetter: unsaved>
      ignore_permissions = None
      ignore_links = None
      ignore_if_duplicate = False
      ignore_mandatory = None
      set_name = None
      set_child_names = True
  File "apps/frappe/frappe/model/document.py", line 930, in _validate_links
    frappe.throw(_("Could not find {0}").format(msg), frappe.LinkValidationError)
      self = <PropertySetter: unsaved>
      invalid_links = [('doc_type', 'Purchase Reconciliation Tool', 'DocType: Purchase Reconciliation Tool')]
      cancelled_links = []
      msg = 'DocType: Purchase Reconciliation Tool'
  File "apps/frappe/frappe/__init__.py", line 602, in throw
    msgprint(
      msg = 'Could not find DocType: Purchase Reconciliation Tool'
      exc = <class 'frappe.exceptions.LinkValidationError'>
      title = None
      is_minimizable = False
      wide = False
      as_list = False
      primary_action = None
  File "apps/frappe/frappe/__init__.py", line 567, in msgprint
    _raise_exception()
      msg = 'Could not find DocType: Purchase Reconciliation Tool'
      title = None
      raise_exception = <class 'frappe.exceptions.LinkValidationError'>
      as_table = False
      as_list = False
      indicator = 'red'
      alert = False
      primary_action = None
      is_minimizable = False
      wide = False
      realtime = False
      sys = <module 'sys' (built-in)>
      _raise_exception = <function msgprint.<locals>._raise_exception at 0x7fb662c64d60>
      inspect = <module 'inspect' from '/usr/local/lib/python3.11/inspect.py'>
      out = {'message': 'Could not find DocType: Purchase Reconciliation Tool', 'title': 'Message', 'indicator': 'red', 'raise_exception': 1, '__frappe_exc_id': '77d1129d8847df648b2d200e3fc30e6c13d953db0ab6206167432941'}
  File "apps/frappe/frappe/__init__.py", line 518, in _raise_exception
    raise exc
      exc = LinkValidationError('Could not find DocType: Purchase Reconciliation Tool')
      inspect = <module 'inspect' from '/usr/local/lib/python3.11/inspect.py'>
      msg = 'Could not find DocType: Purchase Reconciliation Tool'
      out = {'message': 'Could not find DocType: Purchase Reconciliation Tool', 'title': 'Message', 'indicator': 'red', 'raise_exception': 1, '__frappe_exc_id': '77d1129d8847df648b2d200e3fc30e6c13d953db0ab6206167432941'}
      raise_exception = <class 'frappe.exceptions.LinkValidationError'>
frappe.exceptions.LinkValidationError: Could not find DocType: Purchase Reconciliation Tool
frappe@51fa59820a92:~/frappe-bench$ bench --site frontend list-doctypes

Code of Conduct

Huly®: IC-2770

ljain112 commented 2 months ago

Hello,

Maybe there is some issue with your installation.

Installation Steps: https://docs.indiacompliance.app/docs/getting-started/installation

You can refer to already suggested suggestions: