Rationale
The help messages of fields and buttons, which are represented as tooltips in the client, are very useful for new users to discover the application and for old users to refresh their memory.
In some ways, they are better than documentation because they are at the place where the user needs them and they are very close to the code so developers keep them up to date.
But we need clear rules on how to write them, so they are consistent across the whole application and we must take care of possible extensions changing the behavior.
Proposal
Help text answers the question:
What is this field/button for?
The help text that answers this describes the use, result or the impact of the field content or button action, e.g. The help text for the input_location field defined in the stock location model is:
help="Where incoming stock is received."
Help Text Guidelines
- Help text is written in the English language.
- In general when writing and reviewing help text, follow the material style guide
Material Design - Help text is a complete sentence. Start with a capital letter and end with a full stop.
- Try to find some text that provides short additional information.
- If the use of a field or button is obvious by its name, then it may be better to not provide any help text, instead of a negligible one.
- Use
\n
to represent a new line in the client tooltip. - On selection fields donât refer to options. Option names should be self descriptive, and should be reworked, if not.
- Avoid using this or that when referring to values, e.g.: for a field called end_date:
Donât: âPrevent usage after this date.â
Do: âThe last date when the MODEL-NAME can be used.â - Avoid using verbs when describing the contents of relational fields, e.g.
Donât: âEdit where to store the goods.â
Do: âThe moves that put the stock away into the storage area.â - Relational fields can explain the use or impact of the targeted models, e.g.
For the shipment field defined in the stock move model:
help="Used to group several stock moves together."
And the incoming_moves field defined in the stock shipment in model:
help="The moves that bring the stock into the warehouse."
- There are fields which implement general functionality and are used in many places in the same way. Try to avoid custom help text for these fields and instead use one of the convenient templates:
- Name (name): Not normally required.
- Name (rec_name):
The main identifier of the MODEL-NAME.
- Active:
Uncheck to exclude the MODEL-NAME from future use.
- Sequence:
The position of the MODEL-NAME in the list.
- Parent:
Used to add structure above the MODEL-NAME.
- Children:
Used to add structure below the MODEL-NAME.
- Number:
The main identifier for the MODEL-NAME.
- Code:
The internal identifier for the MODEL-NAME.
- Reference:
The external identifier for the MODEL-NAME.
or
The PARTY-TYPEâs identifier for the MODEL-NAME.
wherePARTY-TYPE
is something likesupplier
orcustomer
. - Origin:
The source of the MODEL-NAME.
- Company:
The company that the MODEL-NAME is associated with.
- State:
The current state of the MODEL-NAME.
Quoting
- Always use double quotes for help text, as we use double quotes for human readable text, and tooltips are designed to be read by humans.
Do:
help="Uncheck to exclude party from future use."
Donât:
help='Uncheck to exclude party from future use.'
Long Strings in Source Code Refresher
-
Multi-line strings are concatenated without needing a
+
, e.g.:help="For explaining concatenation "
"no explicit plus is needed."
This is rendered like this when the tooltip is displayed:
For explaining concatenation no explicit plus is needed.
-
When indenting multi line help text all lines should have the same level of indentation, e.g.:
Do:
help="Multi line help text should "
"all have the same level of indentation."
Donât:
help="Multi line help text should "
_____"not be indented like this."
-
Break long strings after a whitespace, e.g.
Do:
help="When explaining using long strings, "
"you should break after a whitespace"
help="When explaining using long strings,\n"
"you should break after a whitespace"
Donât:
help="When explaining using long strings,"
" don't break before a whitespace"
help="When explaining using long strings, "
"\n don't break before a whitespace"
-
Break the line if a sentence ends:
Do:
help="When using multiple sentences. "
"Future code reviews will be easier like this."
help="When using multiple sentences.\n"
"Future code reviews will be easier like this."
Donât:
help="When using multiple sentences. Future code "
"reviews will be harder like this."
Task Overview
- Put your name against the module you are starting to add help text to.
- Create an issue with title:
Add help text for MODULE
- Write the help texts.
- ContributeâŠ
List of Tryton Modules
account
account_asset
account_be
account_credit_limit: @pokoli
account_de_skr03
account_deposit
account_dunning
account_dunning_fee
account_dunning_letter
account_fr
account_invoice
account_invoice_correction
account_invoice_history
account_invoice_line_standalone
account_invoice_stock
account_payment
account_payment_clearing
account_payment_sepa
account_payment_sepa_cfonb
account_payment_stripe
account_product: @pokoli
account_statement
account_stock_anglo_saxon
account_stock_continental
account_stock_landed_cost
account_stock_landed_cost_weight
account_tax_rule_country
analytic_account
analytic_invoice
analytic_purchase
analytic_sale
authentication_sms @pokoli - Nothing to do
bank: @pokoli
carrier @xcodinas
carrier_percentage @xcodinas
carrier_weight @xcodinas
commission @pokoli
commission_waiting @pokoli
company @pokoli
company_work_time
country @pokoli
currency @pokoli
customs
dashboard @dave
google_maps
ir @udono
ldap_authentication @pokoli - Nothing to do
party @ced
party_relationship @ced
party_siret
party_vcarddav
product @nicoe
product_attribute @pokoli
product_classification
product_classification_taxonomic
product_cost_fifo @pokoli - Nothing to do
product_cost_history
product_measurements
product_price_list @pokoli
product_price_list_dates
production
production_routing
production_split
production_work
production_work_timesheet
project
project_invoice
project_plan
project_revenue
purchase
purchase_invoice_line_standalone
purchase_request
purchase_requisition
purchase_shipment_cost
res @udono
sale
sale_advance_payment
sale_complaint
sale_credit_limit
sale_extra
sale_invoice_grouping
sale_opportunity
sale_price_list @pokoli
sale_promotion
sale_shipment_cost
sale_shipment_grouping
sale_stock_quantity
sale_supply
sale_supply_drop_shipment
stock @pokoli
stock_forecast
stock_inventory_location
stock_location_sequence
stock_lot
stock_lot_sled
stock_package
stock_package_shipping
stock_package_shipping_dpd
stock_package_shipping_ups
stock_product_location
stock_split
stock_supply
stock_supply_day
stock_supply_forecast
stock_supply_production
timesheet @pokoli
timesheet_cost @pokoli - Nothing to do
tryton
sao
web_user