AttributeError: ‘PurchaseReceipt’ object has no attribute ‘make_batches’

Traceback (most recent call last):
File “/home/sujay/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 750, in submit
self._submit()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 739, in _submit
self.save()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 232, in save
return self._save(*args, **kwargs)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 266, in _save
self.run_before_save_methods()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 784, in run_before_save_methods
self.run_method(“validate”)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 674, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 896, in composer
return composed(self, method, *args, **kwargs)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 879, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 668, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/sujay/frappe-bench/apps/erpnext/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py”, line 54, in validate
self.make_batches(‘warehouse’)
AttributeError: ‘PurchaseReceipt’ object has no attribute ‘make_batches’

Traceback (most recent call last):
File “/home/sujay/frappe-bench/apps/frappe/frappe/app.py”, line 57, in application
response = frappe.handler.handle()
File “/home/sujay/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/sujay/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/sujay/frappe-bench/apps/frappe/frappe/init.py”, line 923, in call
return fn(*args, **newargs)
File “/home/sujay/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 750, in submit
self._submit()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 739, in _submit
self.save()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 232, in save
return self._save(*args, **kwargs)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 266, in _save
self.run_before_save_methods()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 784, in run_before_save_methods
self.run_method(“validate”)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 674, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 896, in composer
return composed(self, method, *args, **kwargs)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 879, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 668, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/sujay/frappe-bench/apps/erpnext/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py”, line 54, in validate
self.make_batches(‘warehouse’)
AttributeError: ‘PurchaseReceipt’ object has no attribute ‘make_batches’

plz help how to fix this

Traceback (most recent call last):
File “/home/sujay/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 750, in submit
self._submit()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 739, in _submit
self.save()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 232, in save
return self._save(*args, **kwargs)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 266, in _save
self.run_before_save_methods()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 784, in run_before_save_methods
self.run_method(“validate”)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 674, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 896, in composer
return composed(self, method, *args, **kwargs)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 879, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 668, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/sujay/frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py”, line 53, in validate
self.make_batches(‘t_warehouse’)
AttributeError: ‘StockEntry’ object has no attribute ‘make_batches’

Traceback (most recent call last):
File “/home/sujay/frappe-bench/apps/frappe/frappe/app.py”, line 57, in application
response = frappe.handler.handle()
File “/home/sujay/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/sujay/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/sujay/frappe-bench/apps/frappe/frappe/init.py”, line 923, in call
return fn(*args, **newargs)
File “/home/sujay/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 750, in submit
self._submit()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 739, in _submit
self.save()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 232, in save
return self._save(*args, **kwargs)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 266, in _save
self.run_before_save_methods()
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 784, in run_before_save_methods
self.run_method(“validate”)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 674, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 896, in composer
return composed(self, method, *args, **kwargs)
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 879, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/sujay/frappe-bench/apps/frappe/frappe/model/document.py”, line 668, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/sujay/frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py”, line 53, in validate
self.make_batches(‘t_warehouse’)
AttributeError: ‘StockEntry’ object has no attribute ‘make_batches’

I am getting this error here also , plz help how to fix this

Hi @surajjahagirdar

Did any local changes?
check make_batches available in the stock controller

When did you pulled latest code?

2 days back sir

same error i got in this also

AttributeError: ‘PurchaseReceipt’ object has no attribute ‘make_batches’
[/quote]

1 Like

ty rohit purchase receipt error is solved, ya some codes r missing now its clear ty