# Newsletter June 2018

**URL:** https://discuss.tryton.org/t/newsletter-june-2018/552
**Category:** News
**Created:** [June 1, 2018, 8:00am UTC](https://discuss.tryton.org/t/newsletter-june-2018/552 "2018-06-01T08:00:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [June 1, 2018, 8:00am UTC](https://discuss.tryton.org/t/newsletter-june-2018/552/1 "2018-06-01T08:00:00Z")

</div>

![A Sunny June Iowa Day by Carl Wycoff under CC BY 2.0](https://discuss-cdn.tryton.org/uploads/default/original/1X/fae2e044c31a023ebaf683e3038b99c0c7fe683c.jpg)

# 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](https://bugs.tryton.org/issue7276).

## 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](https://bugs.tryton.org/issue6554). Before there was an issue with this configuration.

## Same input and storage location for customer return shipment

Following similar changes for [customer](https://bugs.tryton.org/issue6155) and [supplier](https://bugs.tryton.org/issue6892) shipments, the [customer return shipments support also to use the same input and storage location](https://bugs.tryton.org/issue7401). In such case, on reception the shipment is directly marked as done.

## URL in web client

The web client _sao_ now [supports URLs](https://bugs.tryton.org/issue7370). 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](https://bugs.tryton.org/issue6677) 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](https://bugs.tryton.org/issue7018) in the [localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Storage/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](https://bugs.tryton.org/issue7325) 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](https://bugs.tryton.org/issue5554) of the screen.

 ![web client with more spaces](https://discuss-cdn.tryton.org/uploads/default/original/1X/fdfbba1db0739974534cdc9360449b458e60bd2c.png)

## Open Many2One and Reference in new web client tab

It is now possible to [open the target record in a new tab](https://bugs.tryton.org/issue7324) 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](https://bugs.tryton.org/issue6075).

## 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](https://bugs.tryton.org/issue7007) 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](https://bugs.tryton.org/issue7462) 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).

 ![tryton-export-csv-predefined](https://discuss-cdn.tryton.org/uploads/default/original/1X/0a420cf495ae26a9883dd7ea02cd7d34e185c60e.png)

## 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](https://bugs.tryton.org/issue7453) 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](https://bugs.tryton.org/issue7266) 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](https://en.wikipedia.org/wiki/Nested_set_model) when available).  
Now all supported databases support the recursive [common table expression](https://en.wikipedia.org/wiki/Hierarchical_and_recursive_queries_in_SQL#Common_table_expression) (CTE), so we could use it as [default implementation](https://bugs.tryton.org/issue7116).  
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](https://bugs.tryton.org/issue7383) 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](https://bugs.tryton.org/issue7375).

## 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](https://bugs.tryton.org/issue7449). 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](https://bugs.tryton.org/issue7451) and use the `@fields.depends` decorator on any method.
