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, =[('code', '=', 'OD')])
>>> od
>>> od.sequence
>>> od.sequences
>>> JournalSequence = pool.get('account.journal.sequence')
>>> JournalSequence(od.sequences[0]).sequence

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)?