IRC logs of #tryton for Monday, 2019-12-23 #tryton log beginning Mon 23 Dec 2019 12:00:01 AM CET
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton00:12
-!- thaneor( has joined #tryton02:12
-!- josesalvador( has joined #tryton09:12
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:12
amprxcHello, I'm new with tryton, and i need some help please. I would like to get a list from the tryton database, and then print the list in DESC order in SAO. I tried to put the "oder" parameter in my sql request (product_version_list = Pool().get('product.product').search(['product_name', '=', self.product_name], order=[('version', 'DESC')])), and09:12
amprxcthen I get a list in DESC order, but the printed list in SAO is still in ASC order... Someone told me to look arround "ir.action.act_window", "ModelSQL._order", but I don't get what I have to do or change. I can't find any example of a SAO DESC list on the internet... (my list is a list where you select the value). Thanks for your future help.09:12
amprxcDon't hesitate to ask questions09:12
pokoliamprxc: your server code looks good to me09:12
pokoliamprxc: How you show the list on SAO? using an action window?09:12
pokoliamprxc: an action window is represented as a new tab on SAO09:12
amprxcHello pokoli and thanks for ur answer. The problem isn't my sql request, because when I print the result of my request, the list is in DESC order. But when I print that list in SAO in a list field when you can select the value, the list is in ASC order09:12
pokoliamprxc: you are using a many2one field with a selection value?09:12
pokoliamprxc: or a selection field?09:12
amprxcpokoli a selection field09:12
amprxcUploaded file:
amprxcproduct_version = fields.Function(        fields.Selection(            'on_change_with_product_version',            'Producct version', required=True),     )09:12
pokoliamprxc: then you should set the sort attribute to False. See:
amprxcpokoli with this attribute, the selecion field will be printed in the same order than my sql request ?09:12
pokoliamprxc: if you are using a function to get the selection values yes09:12
pokoliamprxc: otherwise the values are sorted based alfapheticaly on client side09:12
amprxcOk thaks I will try that09:12
amprxcIt's working ! Thanks ! I love u <309:12
-!- nicoe(~nicoe@2a02:2788:54:5a3:7e2a:31ff:fe5e:b25d) has joined #tryton11:12
-!- thaneor( has joined #tryton11:12
-!- josesalvador(~josesalva@ has joined #tryton16:12
-!- thaneor1( has joined #tryton19:12
-!- SimAlbertiBeltra(sim6matrix@gateway/shell/ has joined #tryton20:12
-!- aydiomio( has joined #tryton21:12

Generated by 2.16.0 by Marius Gedminas - find it at!