Tryton Release 5.0

We are proud to announce the 5.0 release of Tryton. This is the first Long Term Support release which means that it will be supported for 5 years.
As usual the migration from previous series is fully supported. Some manual operation may be required, see Migration from 4.8 to 5.0.

Contents:

Notes for users

User Interface

New design

The design of the desktop and web client has been reworked a lot to be more pleasant and less cluttered.
We chose a new set of icons which can be fully shared between desktop and web client. So a user will not get lost when switching from one client to the other. The new icons are based on the Material Design Icons from Google which are simple and clear.
In the web client we moved the field icons inside the input widgets. This spares some extra decorations and makes it look like the desktop client.
For the desktop client we use a new standard base, which allows a better integration into the desktop environment. For example the application menu is rendered in the global toolbar on macOS.


Attachments

In Tryton it is possible to attach files to any document. Until now the toolbar button poped up a dialog with a list of attached files. It required a lot of steps from the user to add a new file or to open an existing one, - even with dragging & dropping the file on the attachment button.
To speed up the tasks we changed the button to show a drop down list of all attached files. When the user clicks on a file, it opens directly. In the drop down list there are two additional operations available:

  • the Add… option which opens a file selector and creates the attachment, and
  • the Manage… option which opens the former popup dialog.

Attachment drop down

Keyboard Shortcuts

The shortcuts between the two clients are now unified as much as possible. In cases where a unification is not possible the web client uses the ALT key. E.g. the desktop client uses CTRL+w to close a tab. This shortcut doesn’t work in the web client, because the browsers would catch it, to close the browser tab with the whole application running inside. So the web client use ALT-w instead. The keyboard shortcuts are listed by pressing F1 on the web client and shown in the form menu of the desktop client.

Web Client

The web client has some missing features compared to the desktop client, as its development started later. Every release we reduce this feature-gap and this release isn’t an exception.
The desktop client has a contextual menu on relation fields which allows to open a record, launch actions and reports etc. Such a contextual menu isn’t available on the web client, but we added an option, to open the relational record in a new tab if the CTRL key is pressed. This gives easy access to all the features in the toolbar.
The file selection widget has been simplified. It does no longer open an intermediate dialog with a file selection button. Now it opens the file selection dialog directly.
The desktop client supports the right-to-left languages since a long time, and now the web client does too.


Moreover it is now possible to toggle the menu on large screens. This allows the user to use the full screen when needed.
We updated the address bar of the browser to correspond to the current tab. The URL in the address bar can be shared to open the same tab by different users, like in the desktop client. Opening a shared URL doesn’t require a re-login, because the browser stores the session as long as it is valid. The user can also use the back and forward buttons of the browser to switch to the previous or next tab. This is useful when the user closes a tab by error.
Similar to the desktop client the web client doesn’t open the same tab twice. It puts the focus on the existing tab instead. In difference to the desktop client there is no extra option to force opening a tab multiple times, because in a browser environment the user is able to open the same URL in multiple new tabs.

Financial Accounting

Accounts Removed from Product

For simplicity and responsibility separation, we removed the accounting definition like the revenue and expense accounts or the taxes from the product form in favor of a unique accounting category. This simplifies the product creation for the product administrators as they do not need any more to care about the accounting properties. The accounting categories now must be managed by accounting administrators only.

Account Evolution

In some countries, the chart of accounts evolve frequently over time. The previous solution based on the logical deletion was not flexible enough because such inactive account should still be active on some fiscal year. Instead it is now possible to define a validity period on accounts and tax codes. The accounts and codes are then visible for all the reports that cross their period.
In case an invalid account was used on a referential document like a party or an accounting category, a replacement account can be defined. This account will be used transparently instead of the original on all operational documents (like sales or purchase). This avoid the need to reconfigure all the parties or categories.

Tax Export for Spain (AEAT)

The Spanish authorities have defined standard files for tax reporting. Tryton generates automatically the files: Modelo 111, Modelo 115 and Modelo 303. This simplifies the submission to the authorities website and helps to prevent errors.

Chorus Export

The French administration requests suppliers to send their invoices for French public entities through the Chorus Pro portal. Tryton can automate this task. It will send every 15 minutes all supplier invoices posted for a party configured for Chorus Pro to the portal.
But the portal requires in addition to the user/password credential, an SSL certificate signed by a recognized authority.
Chorus Pro supports many formats of invoices. We choose to implement the Cross-Industry-Invoice from UN/CEFACT. As this is a standard format, it can be also re-used for other EDI integration.

AEB43 Import Statement

Tryton adds the AEB43 format to the bank statement import functionality. It is a format commonly used in Spain.
With CODA and OFX, this raises the number of supported bank statement formats to 3.
Automating the bank statements is an important benefit of Tryton because it reduces encoding errors and speeds up the update of the receivable and payable accounts.

Write-off and Payment Methods

The default credit and debit accounts on the journal have been removed. They were used only for payment, statement and write-off. We decided that it is better to have methods that define those accounts. So we can now configure write-off methods which can be used for reconciliation but also payment methods which are used to register payments on invoices.
Another advantage is that the new behavior avoids the need to create journals per method.

Dunning

Sometimes customers do not pay even after the last level of the dunning procedure. Instead of losing track of those dunnings which should require manual procedure, Tryton keeps them now under the “Final” tab until they are finally resolved.
In the same idea of supporting a manual procedure, when an email is sent for dunning but the party does not have an email set, Tryton can send the email to a fall-back address. This address may be a secretary for example which will be in charge of forwarding the dunning to the right address.

Date of Asset Depreciation

The depreciation moves can be posted every month or every year. But until now it was at the anniversary of the depreciation start. It is now possible to configure if it should be posted on the first or the last day of the month and at which month of the year. This allows to conform better with the fiscal year of the company.

Sales

Grace Period

Sales now can be configured to have a grace period after the confirmation. This grace period allows to reset the sale order to draft before it will be processed. This is very useful because most of the time the user will notice his mistake just a few seconds after he clicked the confirm button.

Parent on Price List

A frequent feature requests was to have the possibility in a price list to use the price of another price list. This is now possible. If you define a parent list then you can use the parent_unit_price keyword in the formula.
This feature allows to define complex cascading price lists.

Inventory & Stock

Counting Wizard

We provide a new way to make inventories by counting each product in the location.
The wizard starts by asking the product or lot which is counted:

Then it shows the current counting result and asks for the quantity to add (by default 1 for product with unit measure of 1):

It loops over those two steps until the user finishes the wizard. Then the inventory is updated for each product with the result of the count.

Lot Unit

It is now possible to define the maximum quantity of a lot. Tryton will do its best to enforce this constraint. For example, it will not allow a shipment to contain moves of the lot with a sum greater than the quantity of the lot. Or it will not allow to create a move for a quantity greater than the lot.
This new feature can be used to define a lot as a serial number, it just requires to set 1 unit as maximum quantity.

CRM

Attention Name

Sometimes it is needed to store on a party an address that is not the real address of the party. So his name can not be used as the name on the mailbox. So we added an optional “Party Name” on the address which is used to format the address and the name of the party is used as the attention name.

Purchasing

Grace Period

Just like for the sales, the purchases can be configured to have a grace period after the confirmation. This grace period allows to reset the order to draft before it will be processed.

Manufacturing

Outsourcing

It is now possible to outsource production orders. To activate this feature, the routing should have a supplier and production service configured. In this case when the production is set to waiting state, a purchase order to the supplier is created for the configured service with the quantity corresponding to the produced quantity. The purchase costs will be added to the production costs which will be used to update the cost price of the produced product.

Subscription Management

Asset

Some subscription contracts involve the renting of an company’s asset, so on the subscription service, it is now possible to define a list of assets to rent with the service.
Tryton keeps track of which asset is rent per subscription and it ensures that an asset is not rent twice for the same period.

Notes for developers

The major change in this release is the migration of the full code base to Python 3 which means only Python 3.4 or later are supported. We also added support for the new version 3.7 of Python.

Transactional queue

Tryton can be configured to use workers to execute tasks asynchronously. Any Model method can be queued by calling it from the Model.__queue__ attribute. The method must be an instance method or a class-method that takes a list of records as first argument. The other arguments must be JSON-ifiable.
The task posting can be configured using the context variable: queue_name , queue_scheduled_at and queue_expected_at . The queue dispatches the tasks evenly to the available workers and each worker uses a configurable pool of processes (by default the number of CPU) to execute them. The workers can be run on a different machine as long as they have access to the database.
If Tryton has no worker configured, the tasks will be run directly at the end of the transaction.

The processing of sales and purchases have already been adapted to use the queue (see above).

Real-time notification

We added a BUS to Tryton. It allows the server to send messages to the client. It is using long polling as push mechanism.
The first usage is the possibility to send notifications which are short messages with a priority. The web client displays them by using Web Notification and the desktop client by using GNotification which unfortunately is not yet implemented on Windows nor on MacOS.
For now, the bus is disabled by default and must be activated in the configuration.

New session management

The Double session timeout has been implemented. So the session now expires after 30 days. Some operations like posting an invoice or approving a payment requires a fresh session. A fresh session is a session which had no request interruption longer than 5 minutes since its creation.
When a user changes his password, all his active sessions are invalidated. This prevents any attacker who had stolen the password to keep a session active after the password change.

Web client session

The sessions are now stored in the localStorage of the browser. This means that the session per server and database can be shared between tabs and survives a reload of the page.

Improved ModelStorage.copy

The copy method has been extended to have more flexibility on the copy result.
The default dictionary accepts now a callable as value. It will be called for each copied record with a dictionary of the copied values. It must return the new value for the new record.
Also the default dictionary supports the dotted notation for the Many2One keys. In such case, the value will be used as default dictionary to copy the pointed record.

Extending depends on methods

The depends on methods were limited to only on_change or on_change_with methods. But it showed some limitations when trying the share common code between different on_change/_with methods. So we extended and generalized the behavior. Now we can define dependencies on any methods and use the @fields.depends decorator on any method.

Recursive common table expression for child_of/parent_of operators

For the evaluation of the child_of and parent_of domain operator, we used recursive ORM loops (or Modified Preorder Tree Traversal when available).
Now all supported databases support the recursive common table expression (CTE), so we could use it as default implementation.
Regarding performance recursive CTE is not better than MPTT but still avoids many round-trips compared to the recursive ORM loop.

Improve client loading strategy

The strategy has been improved to take into account to eagerly load only the fields that are on the same view. This new strategy is mainly useful when multiple form views are defined.

Improve index creation

It is now possible to create indexes with a SQL expression (instead of only columns) and with a where clause. This allow to create indexes tailored for some specific queries.
There is only one limitation with the SQLite back-end which can not run the creation query if it has parameters. In such case, no index is created and a warning is displayed.

7 Likes

Will Debian packages be available later on?
I ask because 4.8 were not available.
Are other installation methods now preferred, like docker, pip, source?

The Debian packaging is not part of the Tryton project but it is done by Debian developers.
They announced there will be packages for 5.0.

We have always advise to use distribution packages when available. But there are no “preferred” method except the one you are most comfortable with.

1 Like

A post was split to a new topic: Inventory Counting Wizard