Add help text to Dict keys
issue8801 review284371002
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -60,6 +60,9 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<record model="ir.message" id="msg_dict_schema_string">
|
||||
<field name="text">String</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_dict_schema_help">
|
||||
<field name="text">Help</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_dict_schema_type">
|
||||
<field name="text">Type</field>
|
||||
</record>
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user