Getting a handle to the sequence from a journal object with trytond-console

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?

You should check that you specified the right company in the context as sequence is a MultiValue field.

How would that be done, above is the complete trytond-console session used.
Thanks in advance

Just like in the tryton code: import Transaction, with Transaction().set_context(…): and you’re set.

Ah, so I cannot use the transaction already going (necessitating transaction.commit(), that is)?