As beginner with Odoo, I made the following module:
from openerp import models, fields, api
class myconfig(models.TransientModel):
_name = 'myModule.myconfig'
_inherit = 'res.config.settings'
default_isEnabled = fields.Boolean(
'Enable my module',
default=True,
default_model='myModule.myconfig',
)
Now, inside my report, I would like to check whether my module is enabled and display one image.
Exactly like the external_layout does with " company.logo ", but with my variable " default_isEnabled "
<img t-if="company.logo" ...
<img t-if="default_isEnabled" .... => doesn't work
<img t-if="'myModule.myconfig.default_isEnabled" .... => doesn't work
I probably missed some steps, but I don't know where to find the information.
I am spending time and time... Tried % if, and lot of other stuff, without success...
Many thanks in advance for your help.
You're not specifying the object that you'd like to use. By default you should be able to access it with o.FieldName, so o.default_isEnabled should work.