Example #1
0
    def __init__(self, user, name, parent=None, depth=0):
        AddUser.__init__(self, user)
        self.name = name

        if parent:
            self.parent = parent
            self.depth = parent.depth + 1
        else:
            self.depth = depth
Example #2
0
    def __init__(self, user, date, name, category, amount, record_id=None, yearly=False):
        AddUser.__init__(self, user)

        self.date = date
        self.name = name
        self.amount = amount
        self.record_id = record_id
        self.yearly = yearly

        if isinstance(category, int):
            self.category_id = category
        else:
            self.category = category
Example #3
0
    def __init__(self, user, name, pattern, category, yearly=False, fixed=None):
        AddUser.__init__(self, user)

        self.name = name
        self.yearly = yearly
        self.fixed = fixed

        if isinstance(pattern, int):
            self.pattern_id = pattern
        else:
            self.pattern_id = pattern.id

        if isinstance(category, int):
            self.category_id = category
        else:
            self.category = category
Example #4
0
    def __init__(self, user, pattern, minimum=None, maximum=None):
        AddUser.__init__(self, user)

        self.pattern = pattern
        self.minimum = minimum
        self.maximum = maximum