Skip to content

Item-wise Sales Register Fails When Generating Report Without Customer Filter #56074

@Shahanadxbitz

Description

@Shahanadxbitz

Information about bug

When generating the Item-wise Sales Register report without initially selecting a Customer filter, the report throws an AttributeError: 'NoneType' object has no attribute 'customer_name'. The report should display data for all customers when no customer is specified, but instead it fails.

Image

Steps to Reproduce:

  1. Open the Item-wise Sales Register report.
  2. Set the required filters (Company, Date Range, etc.).
  3. Leave the Customer filter blank to view data for all customers.
  4. Generate the report.

Module

accounts

Version

ERPNext: v15.104.0 (version-15)
Frappe Framework: v15.99.0 (version-15)

Installation method

None

Relevant log output / Stack trace / Full Error Message.

row = {'item_code': 'TAFJW', 'item_name': 'FIBRE JOINT TAPE - 90Mtrs.', 'item_group': 'ACCESSORIES', 'description': 'FIBRE JOINT TAPE - 90Mtrs.', 'invoice': 'AJMCRI-2026-05495', 'posting_date': datetime.date(2026, 5, 29), 'customer': 'AL AMEEN INTERIOR DECORATIONS WORKS', 'customer_name': 'AL AMEEN INTERIOR DECORATIONS WORKS', 'customer_group': 'DEBTORS', 'debit_to': 'DEBTORS - NMRQ', 'mode_of_payment': '', 'territory': 'U.A.E', 'project': None, 'company': 'Namariq', 'sales_order': 'SAL-ORD-2026-14578', 'delivery_note': 'AJMDN-2026-06157', 'income_account': 'CREDIT SALES - NMRQ', 'cost_center': 'Ajman - NMRQ', 'stock_qty': 2.0, 'stock_uom': 'PCS', 'rate': 8.0, 'amount': 16.0, 'vat_5%_rate': 0, 'vat_5%_amount': 0, 'vat_output_account_rate': 5.0, 'vat_output_account_amount': 0.8, 'total_tax': 0.8, 'total_other_charges': 0, 'total': 16.8, 'currency': 'AED'}
      total_tax = 0.8
      total_other_charges = 0
      item_tax = {'tax_rate': 5.0, 'tax_amount': 0.8, 'is_other_charges': 0}
builtins.AttributeError: 'NoneType' object has no attribute 'customer_name'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions