Access to the 'Many2Many' or 'One2many' fields from Flask


When I try to access the ‘Many2Many’ or ‘One2Many’ fields from Flask I have the following error:

website (self):,1
website.default_locale: ir.lang,9
Traceback (most recent call last):
  File "", line 5, in <module>
    from application import app
  File "/home/ccr/Documents/Adiczion/technique/projets/naiad/application/", line 28, in <module>
    print('website:', website.locales)
  File "/home/ccr/Technique/tryton/ate50/trytond/trytond/model/", line 1351, in __getattr__
AttributeError: 'NoneType' object has no attribute 'IN_MAX'

While on the other fields no problem

An idea?


It seems that the decorator ‘@tryton.transaction()’ is mandatory when it is necessary to access this type of field.

It is always necessary to have a transaction when you try to access data from Tryton.