I’m curious as to the difficulty in getting a handle to the sequence for a particular journal in the console.
>>> Sequence=pool.get('ir.sequence')
>>> Journal = pool.get('account.journal')
>>> od, = Journal.search([('code', '=', 'OD')])
>>> od
Pool().get('account.journal')(10)
>>> od.sequence
>>> od.sequences
(Pool().get('account.journal.sequence')(10),)
>>> JournalSequence = pool.get('account.journal.sequence')
>>> JournalSequence(od.sequences[0]).sequence
Pool().get('ir.sequence')(16)
If I try to access .sequence, it is always None, but sequences is not … which appears to be the intermediate cross table of sorts.
Is there a trick to be able to simply access sequence from a journal object, perhaps by setting a context or something?