Example on how to use sequences?

My use-case is: “Booking” lines are collected in a “journal”. To allow an auditor to verify the list is complete, each line should get an unique number. AFAIU, Sequences are ment for this. (If there is a better solution, I’d be haapy to use that one.)

Is there some How-to or tutorial on Sequences? Otherwise: Which of the existing official modules is the best/simplest example for this?

More detailed requirements:

  • Numbers shall be unique and consecutive per company (more precisely per “journal”, but there is only one journal per company)

The post_number of the accounting move does already that. If you need a sequence per journal, you must extend Period.post_move_sequence_used to work per journal. This can probably be done by adding the journal to the context of the Move.period.

Thanks, I’ll have a look at this.