I am working on Odoo 12 trying to sort a table at database level this table is product.supplierinfo
and the column to be sorted is date_start
, but I want to bulk sort the table in ascending order.
It is worth mentioning that I do not want to perform a query with:
SELECT *
FROM product_supplierinfo
WHERE product_tmpl_id = 67247
ORDER BY date_start ASC
If not permanently sort the columndate_start
Here is an image of the table I mentioned:
You can use the _order reserved field for your 'product.supplierinfo' model, like this depending on what you need:
In this way any view or query you make through Odoo (search, browse) will be ordered under the definition of the field
_order
.Hope this answer can help you.