Newsletter June 2018

A Sunny June Iowa Day by Carl Wycoff under CC BY 2.0

Changes for the user

Allow to edit account move maturity date

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.

Invoice shipment costs only, if there is a shipment

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.

Same input and storage location for customer return shipment

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.

URL in web client

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.

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 survive a reload of the page.

Better space management in web client

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.

Open Many2One and Reference in new web client tab

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 client does.

Removal of single windows executable

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.

Uninstall previous version

On windows, the installer required to uninstall previous version before allowing to install a new one. In order to simplify the process, the installer ask 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.

Export CSV

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).

Display current date on document

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.

Changes for the developer

Add sql_cast on Field

The new method Field.sql_cast(expression) provides the database specific cast of the field values in SQL expressions.

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 avoid many round-trip compared to the recursive ORM loop.

Tree Mixin

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.

Limit database per host name

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.

Default language in report

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.
Now the set_lang method allow as argument None or an instance of ir.lang. 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.

Extending depends on methods

The depends on methods was 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.

2 Likes