diff --git a/CHANGELOG b/CHANGELOG index a2ff373f02..e71e423138 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Add help text to Dict keys * Update button_action with returned values * Use direct access to backend classes * Add weasyprint support diff --git a/doc/ref/models/models.rst b/doc/ref/models/models.rst index 7caa03274f..d06740ce30 100644 --- a/doc/ref/models/models.rst +++ b/doc/ref/models/models.rst @@ -618,6 +618,11 @@ Class attributes are: The definition of the :class:`trytond.model.fields.Char` field for the string of the key. +.. attribute:: DictSchemaMixin.help + + The definition of the :class:`trytond.model.fields.Char` field used as the + help text for the key. + .. attribute:: DictSchemaMixin.type\_ The definition of the :class:`trytond.model.fields.Selection` field for the diff --git a/trytond/ir/message.xml b/trytond/ir/message.xml index b0a1d622d1..53e6f94d59 100644 --- a/trytond/ir/message.xml +++ b/trytond/ir/message.xml @@ -60,6 +60,9 @@ this repository contains the full copyright notices and license terms. --> String + + Help + Type diff --git a/trytond/model/dictschema.py b/trytond/model/dictschema.py index ad07eede57..d9aaaa9238 100644 --- a/trytond/model/dictschema.py +++ b/trytond/model/dictschema.py @@ -30,6 +30,9 @@ class DictSchemaMixin(object): string = fields.Char( lazy_gettext('ir.msg_dict_schema_string'), translate=True, required=True) + help = fields.Text( + lazy_gettext('ir.msg_dict_schema_help'), + translate=True) type_ = fields.Selection([ ('boolean', lazy_gettext('ir.msg_dict_schema_boolean')), ('integer', lazy_gettext('ir.msg_dict_schema_integer')), @@ -139,6 +142,7 @@ class DictSchemaMixin(object): 'id': record.id, 'name': record.name, 'string': record.string, + 'help': record.help, 'type': record.type_, 'domain': record.domain, 'sequence': getattr(record, 'sequence', record.name),