Proteus scripts no longer save data?

Hi,
After the last code update, the following proteus scripts no longer save the data?

>>> from proteus import Model, config
>>> config.set_trytond()
>>> Lang = Model.get('ir.lang')
>>> lang_fr, = Lang.find([('code', '=', 'fr')])
>>> lang_fr.translatable = True
>>> lang_fr.save()
>>> print([(x.code, x.translatable) for x in Lang.find([('code', '=', 'fr')])])
[('fr', False)] ???

Did I miss something ?

The translatable field is now readonly because there is a button to load translations. This was introduced by Issue 9172: Add language configuration wizard - Tryton issue tracker

You should update your code to use the load_translations button:

>>> from proteus import Model, config
>>> config.set_trytond()
>>> Lang = Model.get('ir.lang')
>>> lang_fr, = Lang.find([('code', '=', 'fr')])
>>> lang_fr.click('load_translations')

This will mark the language as translateable and load the translations for the activated modules.

1 Like

Thank you, I had not measured the implication of this change in Proteus.