Hi
Iam not able Submit a Purchase Reciept
This is a scenario
I create a purch…ase order for subcontracting
do stock entry - selected subcontract - get items from Purchase order
submit the stock entry
then while recieving the material from subcontract
i create a Purchase Reciept - select Get items from PO
save
**submit ---- it dosent submit**
I get the following error
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 19, in savedocs
doc.submit()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 741, in submit
self._submit()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 730, in _submit
self.save()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 230, in save
return self._save(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 280, in _save
self.run_post_save_methods()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 793, in run_post_save_methods
self.run_method("on_submit")
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 666, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 887, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 870, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 660, in
fn = lambda self, args, **kwargs: getattr(self, method)(args, **kwargs)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py", line 135, in on_submit
self.make_gl_entries()
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/stock_controller.py", line 30, in make_gl_entries
make_gl_entries(gl_entries, from_repost=from_repost)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/general_ledger.py", line 19, in make_gl_entries
save_entries(gl_map, adv_adj, update_outstanding, from_repost)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/general_ledger.py", line 88, in save_entries
make_entry(entry, adv_adj, update_outstanding, from_repost)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/general_ledger.py", line 99, in make_entry
gle.insert()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 192, in insert
self.run_before_save_methods()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 772, in run_before_save_methods
self.run_method("validate")
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 666, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 887, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 870, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 660, in
fn = lambda self, args, **kwargs: getattr(self, method)(args, **kwargs)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/gl_entry/gl_entry.py", line 27, in validate
self.validate_currency()
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/gl_entry/gl_entry.py", line 119, in validate_currency
account_currency = get_account_currency(self.account)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/account/account.py", line 233, in get_account_currency
return frappe.local_cache("account_currency", account, generator)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1284, in local_cache
local.cache[namespace][key] = generator()
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/account/account.py", line 227, in generator
account_currency, company = frappe.db.get_value("Account", account, ["account_currency", "company"])
TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 56, in application
response = frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 21, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 52, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 913, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 19, in savedocs
doc.submit()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 741, in submit
self._submit()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 730, in _submit
self.save()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 230, in save
return self._save(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 280, in _save
self.run_post_save_methods()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 793, in run_post_save_methods
self.run_method("on_submit")
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 666, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 887, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 870, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 660, in
fn = lambda self, args, **kwargs: getattr(self, method)(args, **kwargs)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py", line 135, in on_submit
self.make_gl_entries()
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/stock_controller.py", line 30, in make_gl_entries
make_gl_entries(gl_entries, from_repost=from_repost)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/general_ledger.py", line 19, in make_gl_entries
save_entries(gl_map, adv_adj, update_outstanding, from_repost)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/general_ledger.py", line 88, in save_entries
make_entry(entry, adv_adj, update_outstanding, from_repost)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/general_ledger.py", line 99, in make_entry
gle.insert()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 192, in insert
self.run_before_save_methods()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 772, in run_before_save_methods
self.run_method("validate")
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 666, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 887, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 870, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 660, in
fn = lambda self, args, **kwargs: getattr(self, method)(args, **kwargs)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/gl_entry/gl_entry.py", line 27, in validate
self.validate_currency()
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/gl_entry/gl_entry.py", line 119, in validate_currency
account_currency = get_account_currency(self.account)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/account/account.py", line 233, in get_account_currency
return frappe.local_cache("account_currency", account, generator)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1284, in local_cache
local.cache[namespace][key] = generator()
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/account/account.py", line 227, in generator
account_currency, company = frappe.db.get_value("Account", account, ["account_currency", "company"])
TypeError: 'NoneType' object is not iterable
i use INR as currency
I do not use multicurrency
Regards
Hemanth