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

Attribute error while creating stock entry #2928

Closed
Ramr93 opened this issue Jan 6, 2025 — with Huly for GitHub · 2 comments
Closed

Attribute error while creating stock entry #2928

Ramr93 opened this issue Jan 6, 2025 — with Huly for GitHub · 2 comments
Labels
question Further information is requested

Comments

Copy link

Ramr93 commented Jan 6, 2025

Information about bug

While creating stock entry I getting below server error.
AttributeError: 'StockEntry' object has no attribute 'bill_from_gstin'
Possible source of error: india_compliance (app)

Version

ERPNext: v15.47.5 (version-15)

Frappe Framework: v15.51.1 (version-15)

Frappe HR: v15.37.1 (version-15)

India Compliance: v15.14.7 (version-15)

Payments: v0.0.1 (version-15)

Relevant log output / Stack trace / Full Error Message.

### App Versions

{
	"erpnext": "15.47.5",
	"frappe": "15.51.1",
	"hrms": "15.37.1",
	"india_compliance": "15.14.7",
	"payments": "0.0.1"
}

Route

Form/Stock Entry/MAT-STE-2024-00698

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 114, 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 50, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1726, 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/desk/form/load.py", line 46, in getdoc
    run_onload(doc)
  File "apps/frappe/frappe/desk/form/load.py", line 353, in run_onload
    doc.run_method("onload")
  File "apps/frappe/frappe/model/document.py", line 974, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1334, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1318, in runner
    add_to_return_value(self, f(self, method, *args, **kwargs))
  File "apps/india_compliance/india_compliance/gst_india/overrides/subcontracting_transaction.py", line 161, in onload
    doc.company_gstin = doc.bill_from_gstin
AttributeError: 'StockEntry' object has no attribute 'bill_from_gstin'

Request Data

{
	"type": "GET",
	"args": {
		"doctype": "Stock Entry",
		"name": "MAT-STE-2024-00698"
	},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.form.load.getdoc",
	"request_id": null
}

Response Data

{
	"exception": "AttributeError: 'StockEntry' object has no attribute 'bill_from_gstin'",
	"exc_type": "AttributeError",
	"_exc_source": "india_compliance (app)"
}


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@Ramr93 Ramr93 added the bug Something isn't working label Jan 6, 2025
@vorasmit
Copy link
Member

vorasmit commented Jan 7, 2025

This is a custom field in Stock Entry, most likely not created in your site. This could be because you may not have migrated the site.

Try executing bench migrate in your bench directory.

@Ninad1306 Ninad1306 added query Functional Query question Further information is requested and removed bug Something isn't working query Functional Query labels Jan 7, 2025
@vorasmit
Copy link
Member

We can re-open this if it's a genuine issue after you satisfy our questions.

@vorasmit vorasmit closed this as not planned Won't fix, can't repro, duplicate, stale Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants