We are proud to announce the 4.6 release of Tryton.
This release is enhanced by the addition of 9 new modules covering many
There has been also an effort in improving the graphical user interface and
the user experience by fixing many small details.
It is also good to note the inclusion of the Spanish charts of accounts which
required some improvements in the standard accounting modules.
Of course it includes many bug fixes and performance improvements.
As usual the migration from previous series is fully supported. Some manual
operation may be required, see migration from 4.4 to 4.6.
Major changes for the user
In addition to the user name, company and currency in the title of the
clients, we have added the profile or the login details. This way, the user
can find faster the right windows.
The order of the toolbar has been reworked to have a more logical order and
grouping. The same logical has been applied also on the toolbars of the
On previous version, the headers of the column were always centered. Now
they use the same alignment as the content following the best practice.
Texts columns aligned on left and numerical columns on right.
Also to improve the discoverability, editable lists have a grid design
instead of just stripped row. This allows the user to know directly if it is
Similar to the redesign of the button on relation field in the release 4.2,
this release improves the design of the Binary and Image widget. Only the
available buttons are shown instead of being disabled. But also before
having the option to upload a new file, the previous file must be cleared.
This prevents confusion to some users.
Under GTK+-3, a default theme has been added for read-only, required and
Also under GTK+-3, it is possible to add in the configuration folder a file
theme.css which will be loaded as user theme.
We have added Tryton's specific selectors: .readonly, .required,
.invalid and .window.profile-<name>. The last one is useful to setup a
different style to the windows depending of the profile.
The web client has now the same keyboard shortcuts as the desktop client.
You can see them with ctrl+h. This make is simple to use without mouse.
A new wizard has been added to renew the fiscal year. It takes the previous
fiscal year and some other parameters to create the new fiscal year
automatically. The sequences can be reset automatically and the same number
of periods are created.
On some countries, it is required to add a legal notice when some taxes are
applied. This legal notice can now be configured on the tax to be included
automatically and so avoid mistakes or oversights.
The tax rule system is the way Tryton configure the taxes to apply on an
invoice for a party. This works by replacing the default tax by the one
defined on the matching rule. Now it is possible to configure the rule to
keep the default tax and add the rule one. It is needed to support tax
mechanism from some countries like the equivalence surcharge for Spanish
The tax description which appear on the invoice is now translatable.
The payable and receivable accounts on party are no more required. This
prevented the creation of parties when no default values was setup even if
the values were not needed. Now, a message will be raised only when the
value is needed for a particular operation.
It is now possible to search the amounts of the general legder. It is useful
for example to get only the accounts with a balance.
The general ledger and the income statement can be computed for a range of
date in addition to the sets of periods.
The configuration wizard allows to configure default receivable and payable
accounts for categories and products.
This is a new module that aims to implement common accounting requirements in
Europe. The first common feature added is the EC sales list.
A new module registers two default charts of account and taxes for Spain:
Plan General Contable Español 2008
Plan Contable para PYMES 2008
The tax identifier of the party invoiced is stored on the invoice. By
default it is the first tax identifier of the party that is chosen but it
can be changed. This is useful for tax reporting and when a party has many
The Belgian chart of accounts has been adapted to configure the taxes for the
EC sales list.
The clearing of payments only worked when paying a specific line. Now it can
also work if an account is defined instead of a line.
The common case is when you register a deposit for which you have no line
but still want to register it once the payment is succeeded.
The manage of payment with Stripe received many
The user can now create manually Stripe payments. Usage showed that it
may be needed and there was indeed no technical reason to prevent.
It is now possible to enter an existing Customer by filling its ID.
Tryton supports now the two steps payment flows. It is just checkbox to uncheck
to activate on this flow. The amount can be changed between the
authorisation and the capture and the capture is just triggered by a
When a statement is cancelled, if the generated move lines were reconciled,
they are now automatically unreconciled. This ease the task of correcting a
statement as it is no more a task to do for the user.
This new module allows to define for a dunning procedure level to send an
email to the party. The template of the email can be different at each level.
The action of sending an email is logged into the system.
It is possible to restrict a location to have only one level of children.
This allows to apply some techniques to improve the performance of the stock
quantity computation and to support chaotic storage which requires to have a
huge number of locations.
In addition to the wizard to split stock move, there is now a wizard to
split a shipment. It asks for the moves to be sent to the new shipment.
This is useful if the default order can be too big for the carrier.
There is a warning raised when a incoming or outgoing move is done without
an origin. Until now, it was raised once for each move but with this release
only one global warning is raised for all moves.
For the perpetual stock accounting, Tryton supports now the reversed drop
In order to register past move, the effective date of move can be set
manually by the user.
In version 3.6, we added a new state 'staging' on move. But the constraint,
that allows to delete only 'draft' or 'cancel' move, was not updated to
allow also 'staging'. This is now corrected with this release.
A check has been added in order to prevent the deactivation of a location if
there are still products in it. This way the conservation of products is
This new module allows to manage consignment stock from supplier in the company
warehouse and at the customer warehouse. The corresponding invoices are
created automatically when products are used from such location.
This new module allows to define some storage location as movable. They can be
moved by an internal shipment. This can be used for example to manage
The Drag and Drop has been
activated on the project and work views.
The backorder of supplier are no more planned. Before they were planned at
the same date as the initial order. But indeed as the supplier has failed
once, the best assumption is to not know when he will fulfill it.
The confirmed purchases are now automatically processed thanks to a cron
The backorder for customer are planned for today. Before they were planned
at the original shipping date. But this date may be already in the past so
it is better to try to fulfill it as soon as possible.
The confirmed sales are now automatically processed thanks to a cron task.
It is now possible to define a default invoice grouping and the default
shipment grouping method for new party.
When the shipment cost is invoiced on order, it is now invoiced only when at
least one shipment is done.
Consumable products are not checked anymore when the quantity check is
activated on sale.
This new module allows to register payments on sale before the creation of any
invoice. When the payments for full amount of the sale are authorized, the
sale is automatically confirmed.
For example, this module is used to manage payment from a e-commerce website.
This new module adds under and over shipment tolerance on the sale.
If the quantity of a sale line is under shipped but inside the tolerance
percentage, then the line will be considered as fully shipped and no
back-order will be created.
If the quantity of a sale line is over shipped more than the tolerance
percentage, then a warning is raised.
This new module adds the generic feature to send email to parties or users of
document based on trigger conditions. The email can embed as attachment any
report of the document.
A common usage for this module is to send automatically the invoice to the
customer when it is posted.
Major changes for the developer
The server supports to have a JSON as
column type instead of TEXT column. To active it, it just require to alter
the column type after the database creation. This is useful if you plan to
use JSON functions or operators on
The SQLite backend receive the alter_type and alter_size feature. This
is implemented by recreating the table with the right types and inserting
the old tuples.
The report engine, thanks to last version of Relatorio, supports Flat OpenDocument.
This is useful for development as the file can be easily inspected and
But of course as it is a format not wildly supported, the result is still
a standard OpenDocument.
Report template can now be defined as working on a single record only.
This means that when it is requested for a list of records, it generate a
zip file which contains each report in a separated file.
This is useful for report like invoice which must be archived as unique
A new method on get_email in trytond.report allows to retrieve an email
instance with the template rendered for a record. The email can be
multilingual and if the template is in HTML a plain text is generated automatically.
The extension for plain text is now txt. This is better for guessing
mimetype using the extension.
To improve the security the session randomness has been increased to 32
The server enforces natively the size of the requests to avoid deny.
The unauthenticated requests are limited to 2MB and the authenticated ones
are limited to 2GB. Of course those values are configurable.
Until now it was recommended to use a reverse proxy for this protection.
application support more configurations (TRYTOND_LOGGING_CONFIG and
TRYTOND_DATABASE_NAMES) from environment variables.
The changes in sequence management of the new PostgreSQL 10 showed that we should move
the queries about sequence to the back-end to provide an API independent of
Just like we have a descriptor on Selection field to retrieved the
translated value, there is now a descriptor for the Reference field.
To be able to use the cache on our new drone for
continuous integration, the tests
infrastructure support the cache for remote PostgreSQL.
The XML loader was missing the possibility to evaluate datetime values.
Some methods can not be called with duplicated ids. But often the developer
does not think about testing this requirement. In order to prevent this
category of issues, all RPC calls are checked
against unique ids. Also the ModelView.button and Workflow.transition
have an assert against duplicate ids to detect wrong call at development
stage but without having performance impact on production.
In order to support testing external back-end, they can register through
entry points specific tests to the standard sets of tests.
A new generic test has been added to check that methods for Function fields
are well defined on the Model.
The trytond-admin command has a new option --install-dependencies which
allow to automatically install the missing dependencies when updating the
When updating module list, trytond-admin will also delete missing modules
The URI for SMTP supports two new parameters localhost_name and timeout.
The ModelView removes automatically empty pages from notebook.
The root user can behave as any company or employee.
The model and record name of Reference fields can be exported.
The sequence field can be set on proteus ModelList by using the new method
As Python 3.3 has reach it end of life, we do not support it anymore, but we
support the new Python 3.6.
The method Move.query_get, which generate the SQL clause from the context,
handles now the from_date and to_date as date range.
The default value of the move line has been greatly simplified. This removes
potential bugs due to the complexity. And most of the features are better
managed with the template move.
The deposit amount on party now shows a positive amount when the party has
All the function fields based on the MissingFunction have been replaced by
The problem with MissingFunction was that it may be triggered for the
wrong record because of the pre-computation design of Tryton. The property
ensure to raise error only for the needed record.
The tax sequence is now used as default values for the invoice taxes
An origin field has ben added to the payment. This allows to link payment to
specific model like the sale in the module sale_payment.
The support for Stripe webhooks has
been added. Some events are handled by default: charge.succeeded,
charge.failed, source.chargeable, source.failed and source.canceled
but more can be added easily in custom module.
A generic wizard which is the common basis to import statement from a file
has been added. It is already used by the account_statement_coda.
To allow to import statement line with partial data, a new model has been
added. The origin shares most of the fields with the statement line but
with minimal constraint. The origin serves as basis to create lines. It
shows the amount still pending to convert into line.
The commission plan does not match any more line for empty product.
The service products are enforced to have only the fixed cost method.
The cost price has been moved from template to product. This allows a finer
grain computation and still compute an average cost for the template.
The performance of the average cost price computation has been greatly
improved. The new algorithm minimize the number of save and take advantage
of the replacement of Property by MultiValue from the previous release.
The constraint that enforce move location to be child of the locations of
the shipment has been relaxed to apply only shipment states on which the
move can be corrected.
In order to easily customize the address to print on the purchase, a python
property report_address has been added on purchase.
The required constraint on the origin of a request has been dropped.
It follows the doctrine that Tryton has only constraint that are
programmatically needed because it eases the customization.
In order to easily customize the address to print on the sale, a python
property report_address has been added on sale.
The sale price can also be computed by the price list even if no customer is
The shipment cost price is rounded using the precision of the field it is
stored on instead of the currency.
As done in trytond, the web user session randomness has been increased to 32
The email used to login is managed as case insensitive. This is the most
common and expected behavior.
From the 7th to 10th of December, the annual Tryton Unconference will come back to its birthplace: Liège.
The conference happens later than usual to occur during the 10th anniversary
of the first commit.
This will be the seventh edition. Users, developers and interested people will
have the opportunity to discover or talk about Tryton.
The two first days will be the proper unconference. A first part will be
dedicated to business oriented talks and a second part focused on developer
talks. Talks can be submitted at email@example.com.
If you want to request a talk on a specific topic, you can send your request to
the Tryton mailing list.
If you have question about the organisation, please contact the foundation at
The 10th December 2017 we will celebrate the 10th anniversary of the first
commit in the Tryton source
That is an important milestone for the project and to celebrate it, the
Tryton Foundation is pleased to announce that this year's Tryton Unconference
will be held in Liège, Belgium. The city were Tryton was born 10 years ago.
Although the exact dates of the unconference are yet to be defined, organizers
will make them match the anniversary. So it's time you make room in your
schedule to ensure you don't miss this exceptional event.
As always, expect experts from all over the world to share their knowledge and
on the field experience on the development and usage of Tryton.
It is already 5 years that our current board is running the Foundation. It is
time to renew it!
The current board has to co-opt
new directors based on candidatures. The candidates must apply here
before the 30th September 2017.
The Foundation needs to be founded to pursue its missions, so do not forget to
checkout our budget for 2017.
Publicat: 2017-05-19 09:00:00+00:00
A bug in the trytond release 4.4.0 has
been found that prevents the server to create foreign key constraint.
This means that database created or updated using this version are missing
those constraints. It is important to upgrade to the new release 4.4.1 and
exceptionally re-run the database update to create the new foreign keys.
We are proud to announce the 4.4 release of Tryton.
This release see many work to make Tryton even more customizable by reusing or
improving common design patterns of existing modules, but still continues to
extend the features with new modules.
There is also a good effort in improving the security of the application.
It contains also many bug fixes and performance improvements.
This release see the removal of the set of DAV modules (webdav, calendar,
party_vcarddav etc.). Those modules were based on the no more maintained
PyWebDAV library and they did not
support Python 3.
The side effect is that now the full server stack is Python 3 compatible.
Of course the migration from previous series is fully supported. Some manual
operation may be required, see migration from 4.2 to 4.4.
Major changes for the user
The URL entry that was set at the button of every tab has been replaced by a
button on the toolbar. The button allow to display the URL and copy it to the
clipboard. This allow to have more vertical space in the client for the lists
and the forms.
A common need, when user customize the report template from the client, is to
encode the new translations. This is now very easy thanks to the addition of
two actions on the report to set and synchronize the translations. A new
relate button allows to open the list of all translations linked to the
report. The same feature is also available for the views.
The desktop client used until now the security model Trust On First Use. But today with the
raise of service like Let's Encrypt, it is very
easy and cheap to have a valid SSL certificate but such certificate are
renewed very often. So it was no more practical to use TOFU model so the
client now validate the certificate of the server using CA of the system or the
one configured. The fingerprint of the server is still used as check to
prevent to fallback to a plain HTTP connection.
The period and the fiscal year can be locked definitively. It was already
possible to close them to prevent to post anything on them but it was always
possible to re-open them. Some countries (like French) has a requirement to
have a mechanism that can not be re-open. This is why we have added the lock.
The invoice sequences have been simplified. They now use a list of extensible
criteria to choose which sequence to use for an invoice. This design is very
flexible and allow to implement the country specific requirements very
It is now possible to mark a supplier has having direct debit access. In this
case its payable lines will not be shown in the list of lines to pay. This
prevents to pay them by mistake while the supplier will issue a direct debit.
Often a company has only one payment journal. In this case now it will be
directly filled in the payment wizard.
To ease the task of reviewing the account entries, the statements put the
line number and description in respectively move and line description.
The analytic accounting has now a rule engine. It allows to apply rules when
posting accounting moves without any analytics. The rules can be based on the
account, the journal and the party, but of course as usual, those criteria
can be easily extended.
This new module allow to correct the price of a posted invoice line. It adds a
new wizard which allow the user to select the line to correct and create a new
invoice with for each line two opposite ones. This way the user can change the
price of the positive line and keep the statistics and the anglo-saxon
This new module adds the support of Stripe as
receivable payment method.
The module support many Stripe accounts, one per payment journal.
It provides checkout method via browser form for payment or to register a party
as Stripe customer.
The processing of the payment is done asynchronously by a cron task.
It is now possible to use product category as criteria to match a commission
The price list has now a new criteria based on the category. It matches
products that are linked to the category (standard or accounting).
This new module adds a start and end date to the price list lines like that the
price list change can be planned in advance. There is a relate from the price
list to open the lines like that the user can use the filter.
A new producible checkbox is added to the product. This allow to restrict the
product that can have a BOM.
The purchase price is now displayed on the product search list from the
It is now possible to edit the delivery date of a purchase line. The
computation from the supplier lead time is not always possible, but often the
supplier can provide an accurate delivery date. So it is good for the supply
planning to have a good accuracy of the planned deliver dates.
It is now possible to see the requests from which a purchase line was
created. This gives more information to the purchaser in case he has to
negotiate the quantity for example.
The sale price is now displayed on the product search list from the sale
line. This allow the salesman to discuss the prices of similar product with
It is allowed now to leave the lead time of a product empty. There are cases
where a company can not define a lead time for selling a product. Then the
generated stock move will not have any planned date.
This new module defines the basics to support subscription of recurring
services. And periodically invoice them based on consumption created recurrence
This new module allows to manage advance payment on the sale. An advance
payment term can be linked to a sale which will create advance invoices when it
is processed. The payment of those advance payments can condition the execution
of the supply and the shipping of the sale. The amount of each invoice is
computed using a formula based the sale amount.
The shipments now record the employee responsible for some states. For
example the employee who received the supplier shipment; the employee who
picked and packed the customer shipment etc.
The internal shipment has now a request state. This allows to have similar
design as for production by creating request long time in advance and
recompute them as far as they stay in request state.
The customer shipment can have the same picking/storage location and output
location. This allows to support more warehouse workflow. For example, using
grouped internal shipment for the picking, this is often known as wave
If an order point exists for a specific type (purchase, production etc.),
this disable the other supply methods.
The internal shipments are now generated recursively because creating an
internal shipment can generate a new need of another internal shipment. Now
the generation is looping as long as it is needed.
All the different wizards that created supply records for each type have been
merged into a single wizard. This allow to ensure that all supply records are
created at once, leaving the system in a coherent state.
The order point has now a maximum quantity. If this quantity is reached by
the location then the extra quantity will be shipped to the defined
Just like there is a warning on the supply wizard for late supplier moves,
there is also now a warning for late customer moves. By default Tryton
consider that customer moves not performed on time, will not be done and so
they are no more supplied. This warning ensure the user will take care of
those late moves by canceling or replanning them before computing the stock
This new module adds the computation of the weight and volume of the shipments
and packages. This is a central place where this computation can be shared
between different modules.
Major changes for the developer
The Property fields have been removed in favor of the MultiValue based on the
MultiValueMixin and ValueMixin. The Property fields were used mainly to
provide multi-company capabilities but the API is based on context attribute
only which makes them very difficult to use without having record rules to
ensure not mixing between company. The new API allows to get values without
using context and this will allow us to remove the multi-company record rule
in future release.
The col attribute in the view can have a negative value to create an
infinite number of column. This is very useful for group that are designed
to get an undetermined number of field.
A new domain has been added to the window action. This domain evaluation is
reevaluated when the context is changed. This creates more dynamic windows.
All the domain computation can be override by a method domain_<field name>
on the Model with until now the exception of the Function fields. This makes
the API more coherent and allow to create more performant SQL query for
Function fields by using for example joins.
Two new capabilities check methods have been added to the Database back-end:
has_select_for which allows to use the SELECT ... FOR to lock specific
rows instead of the all table.
A better independence between the fields and the backend has been implemented
in this version. This allow external modules to define new kind of fields.
For example, a set of GIS fields is
under development based on those improvements.
The fields define now which methods should be configured for RPC
A generic SQL type is defined by the fields and it is on the back-end
responsibility to convert into its specific version.
The order definition for a column support the extra keywords for ordering null values.
The available keywords are: NULLS FIRST and NULLS LAST. For SQL back-end
that does not support the keywords, the order is converted into an equivalent
SQL query thanks to python-sql.
The Many2One fields on ModelSQL can now target just ModelStorage.
Tryton will not try to create a foreign key constraint on the table in that
A new filter attribute has been added to all xxx2Many fields. This filter
is used to limit the records returned by the getter of the fields. So it is
like domain but without being a constraint for the setter. This allows to
replace some Function into plain fields. This review still needs to be done for all modules.
The cache management is automatically done now in the Transaction. This
allows to ensure the consistency and integrity of the cache but also ease the
usage of trytond in Python script.
A new security measure against brute force attack on the login has been
implemented. A new max_attempt parameter in the configuration determine the
number of attempt before the server answers unconditionally Too Many
Requests for new login attempts. This lasts for the timeout period.
Some constraints have been added to the user password to enforce good
security practice. Those constraints are:
a configurable minimal length which is 8 by default.
a list of forbidden password. This list is stored into a file defined in
the configuration. By default there is no list but it is useful for
example to forbid the name of the company etc.
a minimal ratio of non repeated characters.
the password must be different of the login, email and name of the user.
New methods ceil and floor have been added to the Unit of Measure. They
have the same API as round.
For better accuracy of production quantities, the input quantities are ceil
and the output quantities are floored. This reflect better the really than
rounding the quantities.
The default product location uses the MatchMixin pattern now. This makes it
easier to extend with new criteria.
The computation of the maximum lead time has been improved to be more
accurate by summing all the lead times to get the biggest path possible.
It also adds extra lead times like the biggest supplier lead time.
The CVE-2017-0360 allows an
authenticated user with write access to report or icon definition to make the
server open any readable file under any sibling folder of the trytond
installation but only if starts with trytond (for example:
../trytond_suffix). This is a remaining case from CVE-2016-1242