def _set_number_sequence(self, purpose, *, party=None, value=0):
        if not party:
            party = self.party

        sequence = create_party_sequence(party, purpose, value=value)
        self.db.session.add(sequence)
        self.db.session.commit()
Beispiel #2
0
 def setup_order_number_sequence(self):
     sequence = create_party_sequence(self.party,
                                      PartySequencePurpose.order,
                                      value=4)
     self.db.session.add(sequence)
     self.db.session.commit()