Upgrade from flask_tryton 0.8.0 to flask_tryton 0.9.3

I have migrated from flask_tryton==0.8.0 to flask_tryton==0.9.3

I has a flask app that imports Transaction but in 0.9 it not longer exists.

How it could be used in the last version of flask?

Transaction change to tryton_transaction but not sure how to use it.

Thanks in advance!

I imported Transaction directly from Tryton, it works fine

from trytond.transaction import Transaction

Is there another way to do the same?

Transaction in flask_tryton was never a public thing.
You should always import it from trytond.transaction but you should delay its import after having setup flask_tryton to support 5.6: https://hg.b2ck.com/flask-tryton/rev/25b5aa79590b.

1 Like