For this coming back month, Tryton has still improved for the users by simplifying some usage but also for the developers by providing more tools.
Changes For The User
In addition to the country, the tax rules can now be written using the subdivisions of origin and/or destination. A child subdivision will match the rule based on an upper level subdivision. This is useful for countries that have different tax rates for some subdivisions.
It is now possible to define default values for the customer and supplier tax rules. This can be useful to apply a local tax rule based on subdivision by default.
Now it is possible to configure a sequence for the product code that will be used to be filled at creation time. This may be used to ensure to have a unique code per product, even when it is duplicated.
The product cost price can be used in the price list. It uses the cost price of the company set in the context. This allows to build price lists by defining a margin to apply on the cost.
Changes For The Developer
We added a partial support of TO_CHAR for date and datetime for SQLite Databases. We manage to support only the date and datetime which are the most useful usage and only for formats that can be easily converted into python strftime format. So we can use it now without breaking tests on SQLite.
We added a new function on
Report to format timedelta. It uses the same representation as the clients to format duration field values.
As we now keep a link between the inventory moves and the outgoing moves, we can simplify the synchronization algorithm to use this link. Another advantage is that if the product is changed on the inventory move, the outgoing move is also updated instead of creating a new move.
If you forget to set a context on your RPC calls, Tryton will raise a better error message.
Now we have a
lazy_gettext method which allows to defer the translation by using a
LazyString. It can be used as label or help text of
Fields. This is useful for base
Model classes and
Mixins to limit the duplication of the translation of the same string for each derived class.