During the last month we focused on fixing bugs, improving the behaviour of things, speeding-up performance issues - building on the changes from our last Tryton Release 7.4. We also added some new features which we would like to introduce to you in this newsletter.
For an in depth overview of the Tryton issues please take a look at our issue tracker or see the issues and merge requests filtered by label.
Changes for the User
Accounting, Invoicing and Payments
Now we compute the maturity date of grouped account move lines per debit/credit.
New Releases
We released bug fixes for the currently maintained long term support series
7.0 and 6.0, and for the penultimate series 7.4 and 7.2.
Changes for the Translators
Now we support plural translations for report
and ir.message
. The other translatable strings are labels
that have no count. The plural rule is a Python expression which returns an integer following the gettext design. For the report, it is possible to use the Genshi i18n:choose
, i18n:singular
, i18n:plural
and for OpenDocument the gettext
and ngettext
methods are added to the evaluation context.
Changes for the System Administrator
Now we can set the decimal precision of default context from the environment variable TRYTOND_DECIMAL_PREC
.
Changes for Implementers and Developers
To provide better feedback to the user, now we also add equivalent domains of SQL constraints.
Now we extract the timesheet cost computation from the _get_cost
method to allow customization e.g. to use a different composition of the costs.
Also we round the work total with currency digits in get_total
method now, to allow extending the computation methods, without rounding too early.
A trytond.model.Model is defined by a python class:
from trytond.model import ModelSQL, fields
class Party(ModelSQL):
"""Party"""
__name__ = 'party.party'
It was needed to define three different identifiers:
- Python
class
name: Party - class doc-string: Party
trytond.model.Model.__name__
: party.party
The translated text string of the model which is shown in the user interface was extracted from the __doc__
(doc-string) of the class
definition.
Now we replaced the class doc-string extraction by parsing the trytond.model.Model.__name__
attribute and try to make it human readable. Changing an existing __name__
attribute usually implies a database migration.
To work-around existing not so useful __name__
values we introduced the new class attribute trytond.model.Model.__string__
which let you define the model string directly.
We also take the chance and clean-up the name-space by renaming
ir.model.name
field intoir.model.string
,ir.model.model
field intoir.model.name
andir.model.field.field_description
intoir.model.field.string
Finally we removed most of the former doc-strings from all the classes, only in some rare cases we add the __string__
attribute.