Tryton News: Newsletter January 2019

@ced wrote:

The last month saw a lot of improvements for the developers. Those improvements follow the same trend of consolidating and unifying the Tryton design.

Contents:

Changes For The User

Since the addition of phone number validation, it requires to put the international prefix. But it is usual that users forget it. So now we try to validate the number using the prefix of the address country of the party or the companies party. Then the first valid prefix is stored with the number.

We have removed country code from all default languages. This eases to reuse them as base language for country specific, thanks to the translation cascading mechanism of Tryton.
– Remember, you can help :heart: translate Tryton on https://pootle.tryton.org/

Changes For The Developer

As search and sort on ModelView-only is not supported, the methods are automatically deactivated to avoid the client to emit calls that would fail and raise an error message to the user.

In account module the tax update from template was improved. When updating the chart from template on replacing taxes, former taxes are now de-activated instead of decoupled from the template.

The shipment reports (e.g. delivery note) now uses the correct moves for shipments.
When the inventory moves are empty, – which happen when the shipment locations are the same, – the other moves field will be used.
When a transit location is used for the internal shipment, the used moves field depends on the state. If it is already shipped, then the incoming moves are used to know where to store products. If it is not yet shipped, then the outgoing moves are used to pick the products.

Normally a party should have only one SEPA identifier but in order to ease extension we removed the unique constraint.

Until now the ModelStorage.read-API allows to read the field of the model but also the fields of Many2One and Reference targets. The API has been extended to read related xxx2Many fields. Reading a xxx2Many field results in a list of dictionaries with the requested values and always the id. The name of the key is suffixed by a dot, to avoid name space collisions. :warning: The former API for Many2One has been changed to stay consistent.

We always try to reduce the gap between web and desktop client. So we have implemented the widget attributes: expand, height and width into Sao.

By convention negative ids are reserved for non stored records. The client uses this convention when calling methods on unsaved records. We have decided to enforce this convention with a SQL constraint on every table which checks that the ID column contains a positive integer.

We changed the fallback unit of measure when calling get_sale_price. Before the default unit of the product was used but now it is the sale unit. This is performance improvement because we can now make a single call and retrieve the prices in the right unit for all the products. Before it would require to make a call per unit of measure. This new behavior is not adapted to the purchase module, because when purchasing it is the supplier which defines the unit of measure and not the buyer.

We finally solved a long standing issue with the error messages. The error messages on Model are replaced by records of the new model ir.message. A message can be retrieved translated and formatted by calling gettext method with the XML-ID.
User errors and warnings are now just exceptions raised with messages as arguments. This allows to create custom exceptions by inheriting the base ones for better control and testing.

We implemented the filtering of available models for the model selection of the Reference field, to fix a bug in domain inversion, when the client validates and forces a value depending on the domain.

Posts: 1

Participants: 1

Read full topic

Planet Python

Tryton News: Newsletter December 2018

@udono wrote:

This month was mainly focused on fixing bugs.
But also it is the month where we finally closed the Google Groups in favor of this forum (users can post in there language thanks to translator plugin). We still manage two mailing lists for announces and commits. The former ones are archived.

Contents:

Changes For The User

Some bugs related to the update of chart of account have been fixed. You may need to re-run the wizard to ensure your chart is in sync with the template.

The form view for the invoices and shipments on the sale and purchase form has been removed. Often the user tried to validate or post them from this view which is not always working due to some constraints from the clients design. Indeed the proper way is to open them using the relate feature which provide access to the complete workflow. The list views on the sale and purchase are just there to provide a quick summary.

After 2,5 years, the support for the series 4.0 ended as planned. If you are still using this series or any older, it is highly advise to upgrade to a supported series (the best choice to day is the LTS 5.0).

The “PieceDate” column of the FEC export has been changed for the move date. Before we used the post date but indeed the move date is closer to the definition.

With the removal in series 5.0 of the default accounts on journal, the journal cash report was broken. It was fixed by basing it on the moves of cash journal between receivable/payable and others accounts.

Now, all the tables are correctly responsive in the web client even when they are hidden behind a tab.

Changes For The Developer

An important security issue has been fixed on all supported versions. It allowed an authenticated user to guess value of fields for which he does not have read access.

In order to simplify and to enforce good practice, ModelStorage.read requires to always list the requested fields. Before if no list was provided, it returned the values of all the readable fields.

The documentation on proteus, the scripting library, is now available on proteus — tryton-proteus latest documentation

The cache is now correctly cleaned even when an exception occurs during a test case.

Posts: 1

Participants: 1

Read full topic

Planet Python