Custom Report on Child Table

Hi everyone,

I would like to create a report on a child table (e.g. Packing Slip Item)

The scenario is that I would like to have a different view of the packing slip. I would like to have an aggregation which tells me for today, how many quantity for a particular product are to be packed. That is in contrast with the Packing Slip report which give you a line for each product and each packing slip ID, so you can imagine there can be multiple rows for a particular product.

What I have done is to go into report builder and choose “Ref DocType” as “Packing Slip Item”. However, upon saving, there is an error.

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/”, line 22, in savedocs
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 260, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 283, in _save
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 215, in insert
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 1048, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 1031, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 766, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/report/”, line 43, in before_insert
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/report/”, line 54, in set_doctype_roles
roles = [{‘role’: d.role} for d in meta.permissions if d.permlevel==0]
AttributeError: ‘Meta’ object has no attribute ‘permissions’

I have no issue using report builder on Packing Slip doctype.

Is it because we can’t do report on child tables? If yes, what other way can I do report on child tables?

Thank you!

Have you tried Query Report or Script Report ?