The development of Tryton is back on the road after the release of the 4.8 series. Here are the major changes of this last month.
The maturity date represents information which has no impact on the accounting but on business only. So it is more flexible to allow to edit it.
When the cost method is on order and the invoice method is on shipment, the shipment cost is only invoiced when a shipment is done. Before there was an issue with this configuration.
Following similar changes for customer and supplier shipments, the customer return shipments support also to use the same input and storage location. In such case, on reception the shipment is directly marked as done.
The web client sao now supports URLs.
This allows users to communicate information by sharing URLs.
The syntax is quite similar to the one of the desktop client since the
index.html' has been removed but uses a
URL-hash instead of the full path due to the single page design.
The URL is updated to correspond to the active tab. The hash part can be
changed by the user (using copy/paste) to open the corresponding tab. This
allows to navigate back in the history of the browser.
The client parses the URL hash on login and launches the corresponding action.
We have improved the navigation bar to provide more spaces to the tab list. We use an icon for the logout instead of a longer text. Now the favorites menu is a drop down of the global search. The toggle menu and Tryton brand are merged. Also it is now possible to toggle the menu for any size of the screen.
It is now possible to open the target record in a new
tab instead of a popup by pressing the
CTRL key when clicking on the "open" button. This gives access to the
actions, relates and reports for this record like the right-click on desktop
Since we have the web client sao, the need of a Windows executable without installation is very low. More over it required administration rights to be run. So we have decided to stop publishing it in future versions.
On windows, the installer required to uninstall previous version before allowing to install a new one. In order to simplify the process, now it asks to uninstall the previous version of the same series. In silent mode, this is done automatically without any required intervention of the user which ease automatic deployment.
The export CSV window has been improved by moving the predefined exports under the buttons that manage them. This way the view is easier to understand and the predefined list is not the default focused widget (which created inconsistent selection state).
Draft documents, that are sent to customer, have not yet a date. For example a sale quotation does not have the sale date filled but the document should have at least the date when it was printed to define when starts the validity of the quotation. So we changed the templates to print the current date if no date is yet filled.
The new method
Field.sql_cast(expression) provides the database specific
cast of the field values in SQL
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 avoid many round-trip compared to the recursive ORM loop.
We added a new Mixin as core feature. It provides all the needed features to manage record names in a tree structure and to check against loops. All the modules having such design have been updated to benefit from this generic implementation that is fully tested.
The Tryton server works on multiple database names (one way to support multi-company). But in shared environment, the list of database names can be very large and can leak information. For that, we added a new feature which allows to filter the list of database names per host name.
Until now, almost all reports were using English as fallback language because
the call to
set_lang required a language code and it was easier to hard-code
'en' than retrieving the default language of the database.
set_lang method allow as argument
None or an instance of
When the value is
None, it uses the default language of the
database. This is a more consistent
behavior with the rest of the application. We have updated all the reports to
use this new feature.
The depends on methods was limited to only
methods. But it showed some limitations when trying the share common code
on_change/_with methods. So we extended and generalized the
behavior. Now we can define dependencies on any
methods and use the
decorator on any method.
Due to a mistake in the process of generating the translations, the initial release of series 4.8 contained some unstranslated strings. We decided to make new set of releases with the correct translations even if it breaks the rule of no database updates for bug fix releases.
If you have already updated your server to the series 4.8, you need to also update the database for this bug fix release. Sorry for the inconvenient.
This release additionaly includes the Spanish Chart of Accounts which has cleaner design and is now available for the 4.8 series.
We are proud to announce the 4.8 release of Tryton. This is the last release that will support Python2, as decided on the last Tryton Unconference, next versions will be only Python3 compatible.
In this way we introduced a new way of dynamic reporting. For now it's only available on sale module, but the plan is to extend it to more modules in newer releases. The effort to make all the Desktop client features available on the Web client has continued on this release. This resulted in fixing many small details and adding some missing features on the web client. Of course this release also includes many bug fixes and performance improvements. We added Persian as an official language for Tryton.
As usual the migration from previous series is fully supported. Some manual operation may be required, see migration from 4.6 to 4.8.
We have pushed many small improvements which fix small jump of elements of the page:
The new account_tax_cash module allows to report taxes based on cash. The groups of taxes to report on cash basis are defined on the Fiscal Year or Period. But they can also be defined on the invoices per supplier.
The implementation of this new module also improved existing modules. The tax lines of closed period are verified against modification. The registration of payment on the invoice is limited to the amount of the invoice.
The module, which was published for the first time in the last series 4.6, needs a deep cleaning. The last changes in the accounting modules raised concerns about choices made for this chart. So it was decided to temporary exclude the module from the release process and to not guarantee a migration path. The work to fix the module has started and we expect to be able to release a fixed version soon.
A cron task has been added that will post automatically the clearing moves after a delay. The delay is configured on the payment journal.
This new module adds the automatic import of OFX file as statement. The OFX format is a common format which is supported in various countries, like the United States.
Reports on aggregated data has been added to the sale module. The report engine allows to browse the Revenue and Number of sale per:
- Country > Subdivision
Those data are over Period, Company and Warehouse. The reports also show a sparkline for the revenue trend which can be drilled down.
This new module allows to create coupons that are used to apply a promotion on the sale. The coupon can be configured to be usable only a specific number of times globally or per party.
The following modules have received tooltips:
To prepare the coming release 4.8, a lot of pending developments have been finalized before the development freeze. The release 4.8 is scheduled for 23rd April. Until there, we are requesting everyone to help us finding and fixing the remaining bugs. The translation process will start the 2nd April until 20th April at 20:00 CEST. You can contribute your translations on Pootle.
To help companies to be compliant with the right to erasure from the GDPR, a new wizard to erase a party has been developed. It erase personal information linked to the party like the name, addresses, contact mechanisms etc. It removes also those data from the history tables. But each module adds check to prevent erasure if pending documents for the party still exist.
All the matching criteria against product categories have been unified between all the modules. Any product category will match against itself or any parent category. This is the chosen behavior because it is the less astonishing.
The sale with the shipment method On Invoice Paid will create the purchase requests and/or drop shipments when the lines are fully paid. Before they were created directly on validation.
The sale modules receive reports on aggregated data. The report engine allows to browse the Revenue and Number of sale per:
- Country > Subdivision
Those data are over Period, Company and Warehouse. The reports also show a sparkline for the revenue trend which can be drilled down.
The new module allows to manage requests for quotation to different suppliers. Each request will collect quotation information from the supplier. The preferred quotation will be used to create the purchase.
The previous API to reconcile lines allowed only to create one reconciliation at a time. But as this can trigger the processing of the invoice for example, it can be a bottleneck if you are reconciling a lot of different lines like a statement can do. So the API has been improved in the most backward compatible way to allow to create many reconciliation at once.
It happens that users need to customize the configuration of the chart of account that comes from a template. Until now, this would prevent any further update without loosing those customization. Now, the records that are synchronised with a template are read-only by default. A check box allows to edit the value and to remove the record from the update process.
Sometimes, user may create by mistake a second chart of account. There are very rare case when such creation is valid. As it is a complex task to correct such mistake, we added a warning when creating a second chart of account.
The module, which was published for the first time in the last series 4.6, needs a deep cleaning. The last changes in the accounting modules raised concerns about choices made for this chart. So it was decided to temporary exclude the module from the release process and to not guarantee a migration path.
The new module account_tax_cash allows to report taxes based on cash. A tax group to report on cash basis are defined on the Fiscal Year or Period. But they can also be defined on the invoices per supplier.
The implementation of this new module also improved existing modules. The tax lines are verified against modification on closed period. The registration of payment on the invoice is limited to the amount of the invoice.
Until now, only one tax code was allowed per tax. This was too restrictive. For some country it was needed to create null children taxes to allow more complex reporting. Now, tax codes are no more defined on the tax but instead they contains a list of tax lines. Those lines can define the base or the amount of the tax. On the report, the lines of each tax code are summed per period.
When there is a very large number of location, the tree Locations Quantity become difficult to use. Especially if you are searching in which location a product is. So we added the option to open this view as a list, this way it is possible to search location by quantity of the product.
We found that there are two different expectation from users about the default behavior of the inventory when the quantity is not explicitly set. Some expect that the product quantity should be considered as 0. And others expect that the product quantity is not changed. So we added an option on the inventory to choose the behavior when an inventory line has no quantity.
Until now, the assignation process was not using children location but this did not work if the location was a view. So now, we assign using the children only if the location is a view.
The supplier shipment support to receive the goods directly in the storage location. This way the invetory steps is skipped.
Until now, only sub-projects having the same party were invoiced. With issue7096, an invoice for each different party will be created.
The email notification skip the recipients if the target field is empty. For example if a notification is defined on the Invoice with the Party as recipient and the Party has not an email address, then the invoice will not be sent. By adding a fallback recipients, the email is sent to specific user email which could be a secretary which will be in charge of sending it or a mailbox for a printer which will print it automatically etc.
For now, it will no more be possible to expand a node that have too much records. This is needed to prevent to consume all the resources of the client. When such case happen, the client will switch to the form view where normally the children will be displayed in a list view.
The group widget can be defined as expandable by adding the attribute expandable. If the value is 1, it starts expanded and if the value is 0, it starts unexpanded. Both clients support it.
Until now, when changes on a record from a pop-up window were cancelled, the client reset it using the stored value from the server or delete it if it was not yet stored. Now, the clients will restore the record to the state it had before opening the pop-up.
We have pushed many small improvements to sao, the web client, which fixes small jump of elements of the page:
The web client receives finally the label that positions the selected record in the list and shows the number of record in the list.
The management of editable list/tree has been completely reworked. Now the full row become editable on the first click. The focus is kept on the line if it is not valid. The edition is stopped when the user click outside the view.
More modules have been reviewed for tooltips:
The clients shows next to the search input a toggle button for all model that can be deactivated. This allows the user to make search against deactivated records and to now that such functionality exists.
The previous API was based on the ORM methods. This makes unnecessary more complicated to implement alternative session manager. So we created a simplified API agnostic to the ORM: new, remove, check and reset.
If the database has the required features (for PostgreSQL: the unaccent function), the ilike search will be performed on unaccented strings per default on all Char. This can be deactivated by setting the attribute Char.search_unaccented to False.
We have added the support for *EXCLUDE* constraints. An EXCLUDE constraint is a kind of extension to the UNIQUE constraint which can be applied on a subset of the rows and on expression instead of only columns. For more information, please read the EXCLUDE documentation of PostgreSQL.
This new constraint has been implemented on party category name to ensure that top level (parent IS NULL) names are also unique.
It has also replaced the unique email of web user to only applies to the active user.
It is now possible for a module to register class only if a specified sets of modules is activated. This replace the silent skip that existed previously. Existing modules that were using this silent skip must be updated to use the depends keyword otherwise they will fail.
Sometimes a module depends optionally on another but it may need to fill in the XML record a field that is defined on the optional module. We added a depends keyword on the field which makes it ignored if the list of modules is not activated.
The clients now support the definition of a specific order and context when searching from a field like Many2One, Reference, One2Many etc. This is useful to have preferred record on top of the list of found records.
A new mixin has been added to add logical suppression to a Model. But also we ensure that the client is aware that the model is deactivatable. All the modules have been updated to use this new mixin.
Since the introduction of context management in proteus, the client library, the context management was taken from different places in an inconsistent way. We changed the library to always use the context and configuration at the time the instance was created. Some testing scenario may need some adjustment as they could rely on the previous behavior.
The Foundation has decided to publish a budget for 2018. This is the result of requests from the community will to know what are the plans of the Foundation. Of course as the revenue of the Foundation relies only on donation, we can not guarantee that every things will be realized. Indeed we have ordered the points by priority. Each point will be activated once we have we reach its donation level.
We will like to thank everyone who donated to the foundation. Here are the donations from past years. Thanks to previous year donations, we started the redesing of the website. The first proposal is now available.
- 500€: Infrastructure (rental and maintenance of servers).
- 750€: Miscellaneous management fees.
- 1300€: Buy a new mac mini for better MacOS support.
- 5300€: Organization of first hackathon by inviting key developers for a week-end.
- 10000€: Organization of a documentation writing hackathon by inviting key developers and end-users for a week-end.
You can help the Foundation by making a donation. We will apreciate to get enought donations before the next tryton release, scheduled for 23th of April, in order to buy a new mac mini so we can improve the MacOS support.
We can see by the number of improvements and issues solved this month that the release 4.8 is approaching quickly,
Sao, the web client, received the support of icon on tab of the forms. Meanwhile on the desktop client, the same icon on tab has been moved on the left of the label.
The stock quantity was only computed per product because it is the column stored in the stock move. But it may be useful for some cases to compute the stock quantity per template. Indeed products from the same template share the same default unit of measure so their quantities can be summed. So issue7068 added on the products_by_location method the possibility to group by product columns like the template, but also a relate action from the template which show quantity per locations.
A malicious hacker could flood the LoginAttempt table by sending failing request for different logins. Even if the size of the record is limited and the records are purged frequently. So the server limits the number of attempt also per IP network. The size of the network can be configured for each version (IPv4 and IPv6). This are only the last level of protection, it is still recommended to use a proxy and to set up IDS.
The web_user implement also the same protection.
The administrator can now reset the password of the user with a simple click. The server will generate a random reset password which is available for 1 day by default and send it by email to the user. This reset password is only valid until the user has set a new password. It is also possible to reset this way the admin password using the trytond-admin command line tool.
Tryton prevents by default to modify records that are part of the setup (which are created by XML file in the modules). This requires to make a query on the ModelData table on each modification or deletion. But usually only a few models have such records, so we could put in memory the list of models that should be checked. So this allows to skip the query for most of the models and thus save some queries.
As the desktop client development has switched to GTK+-3. A cleaning of deprecated features has started:
The PostgreSQL backend uses a pool of connections for performance. During a load test, we has detected a leak of connections from this pool. Some code were not protected by a try/finally to ensure to put always put back the connection used.
Similar to the design of the addresses which can be flagged for invoice or delivery usage, the contact mechanism receive the same feature. So the code may now request a contact mechanism of a type and for a specific usage. For example, it is possible now to define which email address of a party should be used to send the invoices. The modules notification_email has been updated to use this method.
It is often requested to be able to export the FEC on a non-closed fiscal year. So the issue5306 make it possible such export. In this case, the generated file will not have an official name as it is still a draft.
The is the second monthly news for Tryton. The developers have not been idle during the month of January.
The XML style guideline has been updated to remove the constraint of 80 columns. It appeared that this rule did not produce good readable file. Instead we accept to have the opening tag on a single line or one attribute per line.
A new back-end trytond-gis has been added to support geographic types. It works with PostGIS for now but contribution is welcome to add others like SpatiaLite. The tryton ORM support the fields: GEOMETRY, POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON and GEOMETRYCOLLECTION; and the operators = and !=. Of course it is possible to write SQL queries that use other geometric operators thanks to the extensibility of python-sql.
On document like sale, purchase or invoice, there are often constraint that prevent to modify the header once a line has been filled. For example, on the sale it is not allowed to change the currency when there are lines. This is because the unit price computed on the lines depend on the currency selected. But in some cases, the user may really want to change those header fields because he wants to correct a mistake. Now it is possible to edit the header fields thanks to the Modify Header Wizard which takes care of recompute the lines according to the changes.
A cron task has been added that will post automatically the clearing moves after a delay. The delay is configured on the payment journal.
If the customer disputes the payment, a dispute status will be update on the Tryton payment. When the dispute is closed, the payment is updated according if the company win or lose. Some missing charge events has been added. In particular, the refund event which may update the payment amount when it is partial.
The desktop client has a new option to check if new version for the same series has been published. It takes care of the build for Windows and MacOS.
A new mechanism has been introduced by issue4735 which allows to extend with the same Mixin all the existing pool objects that are subclasses of a target. A usage example is to extend the Report.convert method of all existing reports to add support for another engine.
Tryton is able to convert the Open Document generated files by the report engine into any format supported by LibreOffice. The default Docker image does not have the requirements for such conversion because it almost triple the size of the image. But now with issue7054, we will publish also images with the suffix -office which contains all the requirements.
The desktop client had already mnemonic for all button. But with issue2312, they are also added to all field labels. This allow to jumb quickly to any visible field by pressing ALT + <the underlined key>.
We have decided to remove the MySQL backend from the core of Tryton. The back-end was not tested on our continuous integration server and so it has many failures like not supporting Python3. The current code has been move to its own repository. This module will not be part of the release process until some volunteer make it green on the test server.
As new year resolution, we plan to make a monthly post about what happened in the Tryton project.
The annual Tryton Unconference 2017 took place from the 7th to 10th December at Liège. It started with 2 days of talks and finished with 2 days of code sprint. We also celebrated the 10th anniversary of the project with some drinks and cakes. For those who could not attend, the talks have been registered and the video and slides are available here (note: a technical issue prevented to correctly record the sound the first day but it is still watchable). Some pictures of the events have also been published.
The desktop client is supporting since one year both version of GTK+ 2 and 3. It is now time to have only GTK+-3 and thus be able to use new features of this version. The build environment for Windows and Mac has been updated to produce builds with the new version of the library.
A discussion started at the #TUL2017 to have longer term release for Tryton. A new process has been discussed which has a majority of positive feedback. So the series ending by 0 (like 5.0) will be supported for 5 years and the others for 1 year. We will keep the rate of one release every 6 month. The new schema will start with the series 5.0 which will be released the 1st October 2018.
At the #TUL2017, we discussed about when to drop the support for Python 2 for which upstream support ends in 2020. So we must ensure to stop supporting Python 2 for any series that should still be supported in 2020. The result is that 5.0 will be the first release with only Python 3 support for the server side and also for the desktop client.
The description of order lines (sale, purchase, invoice etc.) are no more filled automatically. This prevent to duplicate the content from the product form to each lines. But also simplify and speedup the creation of a line from the code. Moreover the product supplier information can be stored on the purchase line. This information can be used on the purchase line instead of the product information. It allows to search per supplier references and to display on the report as description for the line, the reference of the product from the supplier.
This new module allows to create coupon that are used to apply a promotion on the sale. The coupon can be configured to be usable only a specific number of times globally or per party.
For PYSON domain, the ORM have the simple strategy to validate records to group them per evaluated domain and then make a search per domain. But it is not optimal when evaluated domains are likely to be unique per record because this generate a search per record. A new case has been added to handle this which searches by grouping multiple domains at once and thus reduce the number of queries.
Until now, dialog were created with a smaller size than the parent window. But it had the disadvantage to create quickly too small dialog windows. So this behaviour has been changed to use always the same size as the parent.
The Tryton design for currency rate is a table with the rate and a date from which the rate applies until another row is added for the currency with a later date. A new method has been added Currency.currency_rate_sql which returns a SQL query that produces for each currency the rate, start_date and end_date. This is useful to get a currency rate in a larger SQL query. This method uses the window functions if available on the database back-end to produce optimized query.
Tryton allows to work with standalone lines instead of pre-generated document to follow the grouping method of external sources. But this requires to have enough origin information to select them. So to improve the workflow the supplier stock moves show the purchase order and the invoice lines show their origin.
Some users have the workflow to reconcile the lines of the statement they just validated. For this we added a button on statement to launch the reconciliation wizard for the generated account move lines.
The company m-ds has joined the [list of companies providing services](/services.html) on Tryton.
The work has started to provide to the desktop client notification for bug-fix releases. It is important because the desktop client is the only part of the Tryton suite for which the update needs to be managed by the user. And we often see users not updating it and reporting issues which have already been fixed.
An external backend with support of geographic fields is under review. It will support only PostGIS in a first time but maybe SpatiaLite will be added in the future. The backend adds all the standard geometry type of columns and supports the operator = and != in the domain. More operations can be added by using python-sql.
The first day, 7th December 2017, is dedicated to business oriented talks.
The second day, 8th December 2017, is focused on developer talks.
And don't forget to spread the word! #TUL2017
The 2017 foundation board renewal process has finished. We are happy to anounce that the new board is composed by:
- Axel Braun from Germany
- Jonathan Levy from the United States of America
- Korbinian Preisler from Germany
- Nicolas Évrard from Belgium
- Pedro Luciano Rossi from Argentina
- Sebastián Marró from Argentina
- Sergi Almacellas Abellana from Spain
Congratulations to Nicolas Évrard as he became the second president of the Tryton foundation board.