Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
5272 Vizualizări

Hello All

I applied query in code for getting values and I received values, but these values came randomly not 'ORDER BY'. So, How to get these values as i defined?

Below is my query and it's o/p:

"""select distinct src, field_description, value from ir_translation, ir_model_fields where module='P2N_Sales' and ir_translation.src = ir_model_fields.field_description and model='sale.mail.wizard' and ir_model_fields.name in ('status','order','customer','pet_name','services', 'amount','msg');"""



Imagine profil
Abandonează
Cel mai bun răspuns

you can just add order by in your query.

eg:

select distinct src, field_description, value from ir_translation, ir_model_fields where module='P2N_Sales' and ir_translation.src = ir_model_fields.field_description and model='sale.mail.wizard' and ir_model_fields.name in ('status','order','customer','pet_name','services', 'amount','msg') order by fields_name asc/desc

Imagine profil
Abandonează
Autor

Hello Hilar, Problem in not fixed yet.

What is your problem, I just the use of ORDER BY. If you cant fetch in order then update the question with the code that you have tried.

On Wed, Jun 6, 2018 at 4:52 PM, Pawan Sharma <pawan.sharma@sunarctechnologies.com> wrote:

Hello Hilar, Problem in not fixed yet.

--
Pawan Sharma

Sent by Odoo S.A. using Odoo.




--
Hilar AK  Python / Odoo Developer

m: +917736617619
e: hilarak@gmail.com
Follow me:
twitteryoutubegithubstack-overflow


Autor

Hello Hilar

I want record according to i assign in query ('status','order','customer','pet_name','services', 'amount','msg')

Related Posts Răspunsuri Vizualizări Activitate
1
mar. 22
14073
13
iul. 24
14216
1
oct. 20
4936
1
feb. 18
4251
2
mai 24
1342