You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When submitting an asset repair with stock_consumption==1 and at least one item in stock_items table, this error prevents form submission even if a project is selected:
The reason for this error is that project is not passed to stock entry items that get's created and submitted when we try to submit asset repair. Accounting Dimension Filter Validations on stock entry submission event throws this error.
To see the error:
1- Create an Accounting Dimension Filter and enter the expense_account of your item to it.
2- In asset repair enter that item in stock_items table with correct warehouse and serial no.
3- Select a project and try to submit the asset repair.
Module
assets
Version
ERPNext v14.4.0
Installation method
No response
Relevant log output / Stack trace / Full Error Message.
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 69, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 55, in handle
returnfrappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 38, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 76, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1457, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/desk/form/save.py", line 22, in savedocs
doc.submit()
File "apps/frappe/frappe/model/document.py", line 1018, in submit
returnself._submit()
File "apps/frappe/frappe/model/document.py", line 1007, in _submit
returnself.save()
File "apps/frappe/frappe/model/document.py", line 310, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 347, in _save
self.run_before_save_methods()
File "apps/frappe/frappe/model/document.py", line 1056, in run_before_save_methods
self.run_method("before_submit")
File "apps/frappe/frappe/model/document.py", line 941, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1261, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1243, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 938, in fn
return method_object(*args, **kwargs)
File "apps/erpnext/erpnext/assets/doctype/asset_repair/asset_repair.py", line 47, in before_submit
self.decrease_stock_quantity()
File "apps/erpnext/erpnext/assets/doctype/asset_repair/asset_repair.py", line 147, in decrease_stock_quantity
stock_entry.submit()
File "apps/frappe/frappe/model/document.py", line 1018, in submit
returnself._submit()
File "apps/frappe/frappe/model/document.py", line 1007, in _submit
returnself.save()
File "apps/frappe/frappe/model/document.py", line 310, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 364, in _save
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1088, in run_post_save_methods
self.run_method("on_submit")
File "apps/frappe/frappe/model/document.py", line 941, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1261, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1243, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 938, in fn
return method_object(*args, **kwargs)
File "apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py", line 141, in on_submit
self.make_gl_entries()
File "apps/erpnext/erpnext/controllers/stock_controller.py", line 71, in make_gl_entries
make_gl_entries(gl_entries, from_repost=from_repost)
File "apps/erpnext/erpnext/accounts/general_ledger.py", line 35, in make_gl_entries
save_entries(gl_map, adv_adj, update_outstanding, from_repost)
File "apps/erpnext/erpnext/accounts/general_ledger.py", line 223, in save_entries
make_entry(entry, adv_adj, update_outstanding, from_repost)
File "apps/erpnext/erpnext/accounts/general_ledger.py", line 234, in make_entry
gle.submit()
File "apps/frappe/frappe/model/document.py", line 1018, in submit
returnself._submit()
File "apps/frappe/frappe/model/document.py", line 1007, in _submit
returnself.save()
File "apps/frappe/frappe/model/document.py", line 310, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 332, in _save
returnself.insert()
File "apps/frappe/frappe/model/document.py", line 291, in insert
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1087, in run_post_save_methods
self.run_method("on_update")
File "apps/frappe/frappe/model/document.py", line 941, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1261, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1243, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 938, in fn
return method_object(*args, **kwargs)
File "apps/erpnext/erpnext/accounts/doctype/gl_entry/gl_entry.py", line 58, in on_update
self.validate_allowed_dimensions()
File "apps/erpnext/erpnext/accounts/doctype/gl_entry/gl_entry.py", line 157, in validate_allowed_dimensions
frappe.throw(
File "apps/frappe/frappe/__init__.py", line 504, in throw
msgprint(
File "apps/frappe/frappe/__init__.py", line 479, in msgprint
_raise_exception()
File "apps/frappe/frappe/__init__.py", line 434, in _raise_exception
raise raise_exception(msg)
erpnext.exceptions.MandatoryAccountDimensionError: <b>Project</b> is mandatory for account <b>98003 - Cost of Sold Items</b>
The text was updated successfully, but these errors were encountered:
Information about bug
When submitting an asset repair with stock_consumption==1 and at least one item in stock_items table, this error prevents form submission even if a project is selected:
The reason for this error is that project is not passed to stock entry items that get's created and submitted when we try to submit asset repair. Accounting Dimension Filter Validations on stock entry submission event throws this error.
To see the error:
1- Create an Accounting Dimension Filter and enter the expense_account of your item to it.
2- In asset repair enter that item in stock_items table with correct warehouse and serial no.
3- Select a project and try to submit the asset repair.
Module
assets
Version
ERPNext v14.4.0
Installation method
No response
Relevant log output / Stack trace / Full Error Message.
The text was updated successfully, but these errors were encountered: