To end the year, here are some changes that focus on simplifying the usage for both users and developers.
During your holidays, you can help translate Tryton or make a donation via our new service provider.
Contents:
Changes For The User
When the shipment tolerance is exceeded, in the error message we now show the quantities involved so that the user understands the reason for the error and can then adjust them as required.
The asset depreciation per year now uses a fixed year of 365 days. This prevents odd calculations when leap years are involved.
By default the web client loads 20 records. If the user wants to see more records, they had to click on a button. Now these records are loaded automatically when the user scrolls to the bottom of the list. (For this to work the browser needs to support the IntersectionObserver
)
If you cancel a move that groups multiple lines, Tryton will warn you. Then ungroup the lines before canceling the move.
When importing OFX statements, if the payee can not be found on the system we add the payee content to the description. This then allows the user to perform a manual search for the correct party.
We reworked the record name of most of the lines. They also now contain the quantity in addition to the product, the order name, etc.
We improved the experience with product attributes. The selection view has been simplified, and when creating a new attribute, the name of the key is automatically deduced from the “string” (label).
Changes For The Developer
We have removed the implicit list of fields in ModelStorage.search_read
. So if you were using this behavior, you must now update your calls to explicitly request the fields otherwise you will only get the ids.
As a by-product of this, we now have a dedicated method that fetches data for actions and is cached by the client for 1 day.
We have dropped support for the skiptest
attribute for XML <data/>
. It was no longer used by any of the standard modules and we think it is always better that the tests actually test the loading of all the data.
When adding instances to a One2Many
field, the system automatically sets the reverse Many2One
for each instance. This helps when writing code that needs to work with saved and unsaved records.
It is now possible to define wizard transitions that do not required a valid form to click on. For example, the “Skip” button on the reconcile wizard does not need to have a valid form.
We re-factored the code in the group line wizard. It can now be called from code without the need to instantiate the wizard. This is useful when automating workflows that require grouping lines.
We noticed that calling the getter methods on the trytond.config
has a non negligible cost, especially in core methods that are called very often. So we changed some of these into global variables.
Every record/wizard/report has a __url__
attribute which returns the tryton://
URL that the desktop client can open, but we were missing this for the web client. We now also have a __href__
attribute.
In addition to this change, we also added some helpers in trytond.url
like is_secure
, host
and http_host
. They make it easier to compose a URL that points to Tryton’s routes.
We added a slugify tool as an helper to convert arbitrary strings to a “normalized” keyword.