Skip to content

Sublassing NumericColumn prevents subtotals from working #206

@rsyring

Description

@rsyring
class RevCol(NumericColumn):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, places=0, curr='$', **kwargs)


class DashboardProjects(GridBase):
    subtotals = 'grand'

    NumericColumn('Total', ents.Project.rev_total, group=Revenue, has_subtotal='sum')
    RevCol('Invoiced', ents.Project.rev_invoiced, group=Revenue, has_subtotal='sum')

Something like the above does not work as expected. has_subtotal does not make it to the "new" column instance when its created in Column.new_instance().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions