Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field not permitted in query: is_nil_exempt #1523

Closed
1 task done
tsmanagers opened this issue Jan 1, 2024 · 8 comments
Closed
1 task done

Field not permitted in query: is_nil_exempt #1523

tsmanagers opened this issue Jan 1, 2024 · 8 comments

Comments

@tsmanagers
Copy link

tsmanagers commented Jan 1, 2024

Information about bug

At the time of sales invoice creation, we get the error below.

Error: Field not permitted in query: is_nil_exempt

We have 2 companies set up in the same ERPNext instance, one for India and one for the UK. Currently, the same error message comes if we are trying to create an invoice from an Indian or UK company.

Currently we are not able to create any sales invoice.

GST does not apply to UK companies, but we still face issues. Per your documentation, we have updated the tax template and tried various combinations but have yet to be successful.

Version

Installed Apps
ERPNext: v15.8.3 (version-15)
Frappe Framework: v15.7.0 (version-15)
Frappe S3 Attachment: v0.0.1 (master)
Frappe HR: v15.7.1 (version-15)
India Compliance: v15.3.2 (version-15)
Payments: v0.0.1 (version-15)

Relevant log output / Stack trace / Full Error Message.

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@tsmanagers tsmanagers added the bug Something isn't working label Jan 1, 2024
@vorasmit
Copy link
Collaborator

vorasmit commented Jan 1, 2024

Exported customizations in your app may cause existing custom fields to be undone when migrating.
https://frappeframework.com/docs/user/en/guides/app-development/exporting-customizations

To fix this, you need to remove exported customizations for India Compliance app fields and run custom field creation again. You can use the terminal command for re-creating custom fields “bench execute india_compliance.gst_india.setup.create_custom_fields”.

@tsmanagers
Copy link
Author

Still same issue. There is no any customization in custom app related to GST or Account module

@vorasmit
Copy link
Collaborator

vorasmit commented Jan 1, 2024

Can you search for is_nil_rated in your custom app? Does it show as an exported field in your custom app? Fields of India Compliance App should not be exported to Custom App.

If this this not the issue, likely, that you did not migrate the site properly.
Try bench migrate

@tsmanagers
Copy link
Author

I run migration again and still same issue

image

@tsmanagers
Copy link
Author

Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 110, in application
response = frappe.api.handle(request)
File "apps/frappe/frappe/api/init.py", line 49, in handle
data = endpoint(**arguments)
File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 49, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/init.py", line 1715, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
File "apps/frappe/frappe/client.py", line 454, in validate_link
values.update(get_value(doctype, fields, docname))
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
File "apps/frappe/frappe/client.py", line 129, in get_value
value = get_list(
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
File "apps/frappe/frappe/client.py", line 66, in get_list
validate_args(args)
File "apps/frappe/frappe/desk/reportview.py", line 79, in validate_args
validate_fields(data)
File "apps/frappe/frappe/desk/reportview.py", line 104, in validate_fields
raise_invalid_field(fieldname)
File "apps/frappe/frappe/desk/reportview.py", line 165, in raise_invalid_field
frappe.throw(_("Field not permitted in query") + f": {fieldname}", frappe.DataError)
File "apps/frappe/frappe/init.py", line 603, in throw
msgprint(
File "apps/frappe/frappe/init.py", line 575, in msgprint
_raise_exception()
File "apps/frappe/frappe/init.py", line 526, in _raise_exception
raise exc
frappe.exceptions.DataError: Field not permitted in query: is_nil_exempt

@ljain112
Copy link
Collaborator

ljain112 commented Jan 1, 2024

@tsmanagers

In the recent update of the India Compliance App, We have improved workflow around the Item Tax template.

We have removed the field Is Nil Exempt Field and Defined GST Treatment For the same in the ITem Tax Template.

https://docs.indiacompliance.app/docs/developer-guide/migration-guide

Error is raised because it is trying to fetch from item.is_nil_exempt.But this field is deprecated.

There may be exported customisation(Custom Fields) in your custom app for the Sales Invoice Item table which includes is_nil_exempt which we have removed. But due to customisation, it gets synced again on migrate.

To resolve the issue kindly remove exported customisation for India Compliance Related Field from your app.

Hope this helps.

@ljain112 ljain112 removed the bug Something isn't working label Jan 1, 2024
@mohsinalimat
Copy link

@tsmanagers

In the recent update of the India Compliance App, We have improved workflow around the Item Tax template.

We have removed the field Is Nil Exempt Field and Defined GST Treatment For the same in the ITem Tax Template.

https://docs.indiacompliance.app/docs/developer-guide/migration-guide

Error is raised because it is trying to fetch from item.is_nil_exempt.But this field is deprecated.

There may be exported customisation(Custom Fields) in your custom app for the Sales Invoice Item table which includes is_nil_exempt which we have removed. But due to customisation, it gets synced again on migrate.

To resolve the issue kindly remove exported customisation for India Compliance Related Field from your app.

Hope this helps.

Solve my issue.

@ljain112 ljain112 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2024
@nadarvinod
Copy link

Is there a way to export customisations specific to my app only?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants